Hi, > -----Original Message----- > From: Stefano Vaccari [mailto:[EMAIL PROTECTED]] > Sent: Sunday, December 09, 2001 3:10 AM > To: [EMAIL PROTECTED] > Subject: VB6 ADO and UPDATE method > > > Hello to everybody. > I have a problem with the "Update" method in the following simple VB6 code: > > Dim MyConn as New ADODB.Connection > Dim MyRs As New ADODB.Recordset > MyConn.ConnectionString = "DSN=test;uid=sa;pwd=;database=test" > MyConn.Open > MyRs.CursorLocation = adUseClient > MyRs.Open "lines", MyConn, adOpenKeyset, adLockOptimistic, adCmdTableDirect > Do While Not MyRs.EOF > MyRs!StartAngle = AngleValues(MyRs!LineId).StartAngle > MyRs!EndAngle = AngleValues(MyRs!LineId).EndAngle > MyRs.Update > MyRs.MoveNext > Loop > > The invocation of the methot MyRs.Update raise an error ( -2147217864 It's > impossible to find the row to update). > Everything works fine if I make the update using the method MyConn.Execute > ("UPDATE lines SET ....) > I've installed the latest releases of MySql and MyOdbc drivers (3.23.46 and > 2.50.39 under win2000) > I just would like to know if the simple moving through records and updating > is supported, or if there is something wrong in my code. > Thank you > Stefano
Change connection string from DSN=test;uid=sa;pwd=;database=test to DSN=test;uid=sa;pwd=;database=test;option=2, then everything will be fine. Regards, Venu -- For technical support contracts, go to https://order.mysql.com __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Mr. Venu <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Developer /_/ /_/\_, /___/\___\_\___/ California, USA <___/ www.mysql.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php