Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2003
    Location
    California, U.S.A.
    Posts
    2

    Question Unanswered: 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.

  2. #2
    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.

  3. #3
    Join Date
    Feb 2003
    Location
    California, U.S.A.
    Posts
    2

    Re: help..

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •