View Full Version : please help
anhinternat
12-18-2003, 03:45 AM
I am using an asp page to display data from Access database.But i have not being able to connect to my Access Database. I need the proper connection string. i used:
MyConn.Open "Provider=Microsoft.Jet.Oledb.4.0;data source=www.anhinternationaltransfers.com\anhintern at\_database\Ahn.mdb"
where:
www.anhinternationaltransfers.com is the name of my site.
anhinternat is the name of my directory.
_database is where my data base file is.
Ahn.mdb is the name of the database.
But i can't still connect to my database as am having errors. Pls i need someone's urgent attension. I need to get this job done b4 d weekend. cheers
Look in your Control Panel Account Information section for your full path. Alternatively you can also use Server.MapPath.
anhinternat
12-18-2003, 04:52 AM
[b]quote:Originally posted by dasp
Look in your Control Panel Account Information section for your full path. Alternatively you can also use Server.MapPath.
</blockquote id="quote"></font id="quote">
i have done somthing like this:
MdbFilePath = Server.MapPath("Anh.mdb")
MyConn.Open "FILEDSN=anhinternat_franky.dsn"
but i still did not get the really result.
i created a dsn called frank.dsn but i still didn't get a result. pls i need a straight answer as i have looked through the contol panel and i don't have a result yet.
cheers
anhinternat
12-18-2003, 04:53 AM
[b]quote:Originally posted by dasp
Look in your Control Panel Account Information section for your full path. Alternatively you can also use Server.MapPath.
</blockquote id="quote"></font id="quote">
i have done somthing like this:
MdbFilePath = Server.MapPath("Anh.mdb")
MyConn.Open "FILEDSN=anhinternat_franky.dsn"
but i still did not get the really result.
i created a dsn called frank.dsn but i still didn't get a result. pls i need a straight answer as i have looked through the contol panel and i don't have a result yet.
cheers
steurm
12-18-2003, 05:18 AM
[b]quote:Originally posted by anhinternat
MyConn.Open "Provider=Microsoft.Jet.Oledb.4.0;data source=www.anhinternationaltransfers.com\anhintern at\_database\Ahn.mdb"
where:
www.anhinternationaltransfers.com is the name of my site.
anhinternat is the name of my directory.
_database is where my data base file is.
Ahn.mdb is the name of the database.
But i can't still connect to my database as am having errors. Pls i need someone's urgent attension. I need to get this job done b4 d weekend. cheers
</blockquote id="quote"></font id="quote">
you need the fysical file location of your database. In the control panel, under Account Management > Account information, you find the path to your webapplication-root (Server path), i.e. something like e:\web\anhinternat\htdocs\.
You should be able to open your connection as follows:
[quote]MyConn.Open"Provider=Microsoft.Jet.Oledb.4.0;datasource=e:\web \anhinternat\htdocs\_database\Ahn.mdb"
</CODE>
Good luck !
--
Steurm
www.steurm.net/steurm
anhinternat
12-18-2003, 06:10 AM
hey,
i got it at last. Thanks Steurm and the other guy for your contributions.
cheers
julia
vBulletin® ©Jelsoft Enterprises Ltd.