0

Hi, I am trying to Write web type application and connect my database (Access) with DNSLess Connection like this

Set conn = server.createobject("adodb.connection")
DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtemp=dsntemp & "DBQ=" & server.mappath("Record.mdb")
conn.Open DSNtemp

This is very much like to Connection to Database from VB6, but, I do not know how to include the User name and Password for the above Connection. The above code is correct only for with no Passoword. Can any one tell me.

Also, if any one know whether Connection can be created or not for MySql from VB (This is not MS SQL). I simply know MySql is convenient for php, etc. and not for ASP and VB6. Is this Correct?

kvl

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by Teme64
0

If I remember right, the connection string is following:

"Driver= {MicrosoftAccessDriver(*.mdb)}; DBQ=" & server.mappath("Record.mdb") & "; Uid=Username; Pwd=Password;"

One way to use MySQL in VB6 is to get MySQL ODBC driver (from MySQL site). The connection string is following:

"DRIVER={MySQL ODBC 3.51 Driver}; SERVER=127.0.0.1; DATABASE=MySample; UID=UserName; PWD=Password"

You may find a never ODBC driver than version 3.51 :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.