Dear All,
I have been struglling to connect to my database (inventory.mdb) located on "Stock\Admin\inventory.mdb" direcotry.
I have two folders "Admin" and "User". I do not have problem when I run "defaul_adm.asp" under the Admin folder where the .mdb is located, however, if i tried to run "default_usr.asp" under the User folder then I have problem to execute it becuase it search for the "Inventory.mdb" database.
Below is my code, please help me:
Sub Open_Database()
set dbInvent = Server.CreateObject("ADODB.Connection")
dbInvent.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("Inventory.mdb") & ";"
End Sub
Dan
I have been struglling to connect to my database (inventory.mdb) located on "Stock\Admin\inventory.mdb" direcotry.
I have two folders "Admin" and "User". I do not have problem when I run "defaul_adm.asp" under the Admin folder where the .mdb is located, however, if i tried to run "default_usr.asp" under the User folder then I have problem to execute it becuase it search for the "Inventory.mdb" database.
Below is my code, please help me:
Sub Open_Database()
set dbInvent = Server.CreateObject("ADODB.Connection")
dbInvent.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("Inventory.mdb") & ";"
End Sub
Dan