If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > ADO Visual BAsic Informix

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-19-03, 11:46
kamichie kamichie is offline
Registered User
 
Join Date: Sep 2003
Posts: 3
ADO Visual BAsic Informix

I have a Visual Basic Program that connects ton an Informix Database. I can use Access 2000 to link to the tables through ODBC, but When I use Visual Basic 6.0 with and ADO Connection, Every Recordset I pull Returns no data. I have tried diffrent versions of Informix 7 to 7.3, and Using as DSN Connection and DSN-Less Connection. I have Tried Simple Queries, but none of these seem to work. Below is an Example of the code. Also, I am using MDAC 2.6.

Dim ADO_Rdst As New ADODB.Recordset
Dim ADO_Conn As New ADODB.Connection
Dim ADO_Comm As New ADODB.Command
Dim SQLString As String, rCount As Long, X As Integer

SQLString = "SELECT * From synonyms"
ADO_Conn.ConnectionString ="DRIVER=OpenLink Generic 32 Bit Driver; UID=UserID;PWD=UserPWD;NoLoginBox=Yes; FetchBufferSize=30;ReadOnly=Yes;Host=cmsIP;Protoco l=TCP/IP;ServerType=Informix 7.2;ServerOptions=;Options=;Database=;Server=OpenL ink"



ADO_Conn.Open
With ADO_Comm
.ActiveConnection = ADO_Conn
.CommandText = SQLString
.CommandType = adCmdText
End With


With ADO_Rdst
.CursorType = adOpenForwardOnly
.CursorLocation = adUseClient
.LockType = adLockReadOnly
.Open ADO_Comm
End With
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On