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 connection strings to connect through ODBC

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-06-03, 20:22
rogerlacson rogerlacson is offline
Registered User
 
Join Date: Feb 2003
Location: California, U.S.A.
Posts: 2
Question ADO connection strings to connect through ODBC

Hi,

I need an example of ActiveX Data Object (ADO) connection strings for connecting from a program that uses ADO to an Informix engine through IBM Informix ODBC.
Reply With Quote
  #2 (permalink)  
Old 06-10-03, 06:44
sunkal sunkal is offline
Registered User
 
Join Date: Jun 2003
Location: UK
Posts: 1
help..

Hi,

Wondering if you found out how the asnwer, as I am looking around for the ADO connection string and want to connect through ODBC.
Reply With Quote
  #3 (permalink)  
Old 06-10-03, 12:46
rogerlacson rogerlacson is offline
Registered User
 
Join Date: Feb 2003
Location: California, U.S.A.
Posts: 2
Re: help..

Quote:
Originally posted by sunkal
Hi,

Wondering if you found out how the asnwer, as I am looking around for the ADO connection string and want to connect through ODBC.
Yes, I'm glad to share this, please see below;

Private Sub cmdOK_Click()
Dim cCmd As New ADODB.Command
Dim rsRow As New ADODB.Recordset
Dim cn As New ADODB.Connection
Dim connectstring As String

Dim strDB As String
Dim strServer As String

rem strDB = CStr(cboDatabase.Text)
rem strServer = CStr(cboServer.Text)

Rem connectstring = "Provider=Ifxoledbc; Data Source=database@server; user id=userid; password=password"
Rem connectstring = "Provider=MSDASQL; DRIVER = {IBM INFORMIX 3.82 32BIT}; SERVER=progen881; UID=userid; PWD=password"
connectstring = "Provider=MSDASQL; DSN=IDS881; DATABASE=yourDatabse; UID=yourUserid; PWD=YourPassword"

cn.Open (connectstring)

Set rsRow = cn.OpenSchema(adSchemaTables)

rsRow.MoveFirst
While (Not rsRow.EOF)
MsgBox rsRow.Fields(0) + " " + rsRow.Fields(1) + " " +
rsRow.Fields(2) + " " + rsRow.Fields(3)
rsRow.MoveNext
Wend

End Sub
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