Question

  Asked: Jul 16 2004   3:25 PM GMT
  Asked by: Icaro2


Error when tried to update the SSOledbGrid connected to with Sybase Server Database


Servers, Sybase EAServer, Sybase, Adaptive Server Enterprise, SQL Anywhere Studio/M-Business Anywhere/Avantgo, Development, ActiveX, Visual Basic, Database, Oracle, DB2

I have a visual basic 6.0 application with connect to Sybase Server 11 with OBDC Driver ?Sybase System 11?.
In VB application use ADO 2.8 for update a table with two fields (Integer, Varchar(10)), the SSOledbgrid return error ?16389? to update or add a register. Show error when I tried to update the varchar field.

My connect String is:

Set cnContacts = New ADODB.Connection
cnContacts.CursorLocation = adUseClient
cnContacts.ConnectionString = "Provider=MSDASQL.1;Extended properties='DSN=WellPadDB Server;SRVR=TEST120;DB=WellPadDB;UID=WellPadAdmin;PWD=AdminWellPad'

Set rsContacts = New ADODB.Recordset
rsContacts.CursorLocation = adUseClient
rsContacts.Open SQL, cnContacts, adOpenStatic, adLockPessimistic, adCmdText

Set Me.SSOleDBGrid1.DataSource = rsContacts
SSOleDBGrid1.Refresh

Thanks for you help

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



What is the error text?
Do you have to use adlockpessimistic or can you use adlockbatchoptimistic or some other type of locking?
  • AddThis Social Bookmark Button

Browse more Questions and Answers on DataCenter, DataManagement and Database.

Looking for relevant DataCenter Whitepapers? Visit the SearchDataCenter.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register