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

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 :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.