MySQL Connection String?

Discussion in 'ASP General' started by Rob Meade, Feb 13, 2004.

  1. Rob Meade

    Rob Meade Guest

    Lo all,

    Little bit puzzled, I have a connection string that I usually use for my
    apps, has worked up until now quite happily.

    I've changed it slightly to work with the MySQL database I am now having to
    connect to.


    objConnection.Open "DRIVER={MySQL ODBC 3.51 Driver}; UID=<user>;
    PASSWORD=<password>; DATABASE=<database>; SERVER=<ip>"

    Set objCommand = Server.CreateObject("ADODB.Command")
    Set RS = Server.CreateObject("ADODB.Recordset")
    objCommand.CommandText = SQL
    objCommand.CommandType = adCmdText
    Set objCommand.ActiveConnection = objConnection
    'RS.Open objCommand,,adOpenKeySet, adLockOptimistic

    Set RS = objConnection.Execute("SELECT <column1>, <column2> FROM <table>"

    In the above I'd usually use the commented line, but I got errors with it,
    so I checked a VERY old connection I used to use on another MySQL database,
    and paste in the last line - this now works....

    Whilst I'm happy to sit back and enjoy it working I was wondering why the
    original one doesn't...

    Is there another way rather than doing connection.execute to do the same
    thing?

    Thanks in advance for any help.

    Regards

    Rob
     
    Rob Meade, Feb 13, 2004
    #1
    1. Advertising

  2. Rob Meade

    Bullschmidt Guest

    Bullschmidt, Feb 16, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JL
    Replies:
    0
    Views:
    1,174
  2. johnny
    Replies:
    1
    Views:
    811
    Jerry Hill
    Dec 8, 2006
  3. Replies:
    3
    Views:
    858
    Samuel R. Neff
    Aug 3, 2007
  4. Wei  Lu
    Replies:
    2
    Views:
    5,960
    Wei Lu
    Feb 16, 2009
  5. Wayne...
    Replies:
    1
    Views:
    193
    [ + 2 0 r p 3 ]
    May 17, 2004
Loading...

Share This Page