Results 1 to 3 of 3

Thread: MySql So confused

  1. #1

    Thread Starter
    Hyperactive Member Dinz's Avatar
    Join Date
    Jan 2002
    Posts
    359
    Search for this Driver in google.............myodbc-2.50.19-win95.zip if ur OS is win 95/98 else myodbc-2.50.19-NT.zip for NT........I am having the same if u want I can mail it u..........fter installin the driver u can use this con string:

    strCnn = "driver={MySQL};Server=ipaddress;" & _
    "uid=root;pwd=;database=mydatabase"

    hope this will help u..........

  2. #2
    TheMechanic
    Guest
    Still confused

    Am I correct when I use this

    VB Code:
    1. Option Explicit
    2. Dim cnn As ADODB.Connection
    3. Dim rs As ADODB.Recordset
    4. Private Sub Form_Load()
    5. Set cnn = New ADODB.Connection
    6. Set rs = New ADODB.Recordset
    7.         strCnn = "driver={MySQL};Server=localhost;" & _
    8. "uid=root;pwd=myPass;database=mydatabase"
    9.         cnn.Open = strCnn
    10. End Sub

    The localhost is the MySql Database host name
    But it still does nothing

  3. #3
    Helger
    Guest
    I'm not sure about your connection string. However this line will give you an error

    cnn.Open = strCnn

    replace with

    cnn.open strcnn

    or (better) with

    cnn.connectionstring = strcnn
    cnn.open

    to get a working connection string try the following:

    in 'mycomputer' open that control panel or whatever it's name is in English.

    there you will have 'Data Sources'

    Double click and create a new entry (= DNS)
    the advantage being that you can test the connection and stuff first. after you found it working simply add a dataenvironment to your project. set up a connection with your newly created dns. copy and paste the dns - text from the DE-connection to your original code and delete the Dateenvironment.
    There you go .

    Helger

Posting Permissions

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



Click Here to Expand Forum to Full Width