Help! Visual Basic + ODBC.
Posted in 1993
Dear netters! Could anybody help us? We've got a problem when we try to update a record within Visual Basic. We use OnLine 4.10, Star 4.10 at the server (486, Interactive Unix SVR3.2 version 4.0), Visual Basic 3.0 and Q+E ODBC and Net PC 4.10 at the client (486, Windows 3.1, FTP PC/TCP 2.2). Our problem is: We try to update a record in the screen form by editing a text field. When we try to move to the next record, Basic tells us "Can't perform the operation: It's Illegal !". We think ODBC works correctly because it is possible to update a record by issuing 'ExecuteSQL(""update ..."")' statement. We have a simple form with Data Control named DataCtl and one text editing control named TextEdit bound to the DataCtl. This edit control displays a char field from the database residing on server. Pressing < and > buttons on DataCtl works OK - TextEdit displays records. But when we try to change this field and then advance to the next record the message box appears with the abovementioned error message. We've discovered that the Updatable property of the DataCtl.Recordset is set to False and individual attributes of the Field objects are also set to 0 ( i.e. not changeable ). But the SQL UPDATE statements are executed properly!! Any hints are appreciated! Thanks in advance! --------------------------------------------------------------- Andrew Yu. Grachyov | Phone +7 (095) 928-6078 A/O TERN, Moscow, Russia | +7 (095) 925-1785 andy@tern.msk.su | Fax +7 (095) 280-3870