Connection string

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paradigm

    #1

    Connection string

    I am using the following code in Access 2k to establich a connection to a
    MYSQL database

    Dim conn As ADODB.Connectio n

    Set conn = New ADODB.Connectio n

    conn.Connection String = "DRIVER={My SQL ODBC 3.51 Driver};DESC=;U SER=" &
    myUsername_
    & ";DATABASE= " & mySQLDatabase_
    & ";SERVER=" & myServer_
    & ";PASSWORD= " & myPassword_
    & ";PORT=;OPTION= ;STMT=;" ';TABLE=" & myTable
    conn.Open

    I get a Catostrophic failure error on the conn.Open line

    This seems to work on one of my computers but not on the other. Both Windows
    2K
    Can anyone please help.
    Alex


  • Pieter

    #2
    Re: Connection string

    On Tue, 25 Jan 2005 22:30:12 GMT, "Paradigm" <alecjames1@hot mail.com> wrote in 23 Lines :
    [color=blue]
    >I am using the following code in Access 2k to establich a connection to a
    >MYSQL database
    >
    >Dim conn As ADODB.Connectio n
    >
    >Set conn = New ADODB.Connectio n
    >
    >conn.Connectio nString = "DRIVER={My SQL ODBC 3.51 Driver};DESC=;U SER=" &
    >myUsername_
    > & ";DATABASE= " & mySQLDatabase_
    > & ";SERVER=" & myServer_
    > & ";PASSWORD= " & myPassword_
    > & ";PORT=;OPTION= ;STMT=;" ';TABLE=" & myTable
    >conn.Open
    >
    >I get a Catostrophic failure error on the conn.Open line
    >
    >This seems to work on one of my computers but not on the other. Both Windows
    >2K
    >Can anyone please help.
    >Alex
    >[/color]

    The best way is to check in your Visual basic screen if on both computer the reference object are the same.
    Can be that on one computer the reference to ' Microsoft ActiveX Data Object 2.1 library ' is not there.




    Comment

    • Paradigm

      #3
      Re: Connection string

      ActiveX data objects is in the references.
      I have checked the computers and they have the same list of references.
      Alex

      "Pieter" <P.dfm@wsx.nl > wrote in message
      news:4mefv0hcs3 ucg2tjjo0jvdnt0 2o9atesgb@4ax.c om...[color=blue]
      > On Tue, 25 Jan 2005 22:30:12 GMT, "Paradigm" <alecjames1@hot mail.com>[/color]
      wrote in 23 Lines :[color=blue]
      >[color=green]
      > >I am using the following code in Access 2k to establich a connection to a
      > >MYSQL database
      > >
      > >Dim conn As ADODB.Connectio n
      > >
      > >Set conn = New ADODB.Connectio n
      > >
      > >conn.Connectio nString = "DRIVER={My SQL ODBC 3.51 Driver};DESC=;U SER=" &
      > >myUsername_
      > > & ";DATABASE= " & mySQLDatabase_
      > > & ";SERVER=" & myServer_
      > > & ";PASSWORD= " & myPassword_
      > > & ";PORT=;OPTION= ;STMT=;" ';TABLE=" & myTable
      > >conn.Open
      > >
      > >I get a Catostrophic failure error on the conn.Open line
      > >
      > >This seems to work on one of my computers but not on the other. Both[/color][/color]
      Windows[color=blue][color=green]
      > >2K
      > >Can anyone please help.
      > >Alex
      > >[/color]
      >
      > The best way is to check in your Visual basic screen if on both computer[/color]
      the reference object are the same.[color=blue]
      > Can be that on one computer the reference to ' Microsoft ActiveX Data[/color]
      Object 2.1 library ' is not there.[color=blue]
      >
      >
      >
      >[/color]


      Comment

      Working...