Foundas
10-18-2005, 09:06 AM
Hey guys,
i have a database in Access 2000 and i wish to change it to MySQL. Supposly i do the transformation, what is the code to open a MySQL database? Currently, for the access, i have this function to open the database:
Sub OpenDataBase (connection)
database="D:\database\db.mdb"
strconn = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source='" & database & "';Jet OLEDB:Database Password='passwordforthedatabase';"
Set connection = Server.CreateObject("ADODB.Connection")
connection.open strconn
If connection.errors.count> 1 then
response.write "Error has occured<br>" & connection.errors(0).description
end if
End Sub
and this code to close it:
sub CloseDatabase(connection)
connection.close
set connection=nothing
End sub
Can you please help me out on this? What are the commands to open and close a mysql database?
thanks in advance,
Foundas
i have a database in Access 2000 and i wish to change it to MySQL. Supposly i do the transformation, what is the code to open a MySQL database? Currently, for the access, i have this function to open the database:
Sub OpenDataBase (connection)
database="D:\database\db.mdb"
strconn = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source='" & database & "';Jet OLEDB:Database Password='passwordforthedatabase';"
Set connection = Server.CreateObject("ADODB.Connection")
connection.open strconn
If connection.errors.count> 1 then
response.write "Error has occured<br>" & connection.errors(0).description
end if
End Sub
and this code to close it:
sub CloseDatabase(connection)
connection.close
set connection=nothing
End sub
Can you please help me out on this? What are the commands to open and close a mysql database?
thanks in advance,
Foundas