Aaron Liu
|
Posted: 01/09/2004, 12:21 PM |
|
I'm new to web development and would like to try out a CSS generated application on the web. I registered for free asp web hosting at http://www.1asphost.com/ and uploaded the published project. I couldn't get the pages to access the database.
I checked the FAQ provided at http://www.1asphost.com/ and discovered that I needed to add a DSN-less connection string cited below.
Dim Conn
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER=Microsoft Access Driver
(*.mdb);DBQ=" &
Server.MapPath("/USERNAME/database/yourdatabase.mdb")
I can't get this to work with CSS. Please help.
|
|
|
Edd
Posts: 547
|
Posted: 01/09/2004, 4:17 PM |
|
Just change the Common class connection string to match your requirements before you upload into www.1asphost.com.
_________________
Accepting and instigating change are life's challenges.
http://www.syntech.com.au |
|
|
peterr
Posts: 5971
|
Posted: 01/09/2004, 10:32 PM |
|
Aaron,
You can use the following connection string in CCS connection dialog:
Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=" & Server.MapPath("/USERNAME/database/yourdatabase.mdb") & ";Persist Security Info=False
Of course please replace 'USERNAME' and 'yourdatabase.mdb' with values specific to your Website.
To find or learn about additional connection strings please refer to http://www.able-consulting.com/ADO_Conn.htm
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
Aaron
|
Posted: 01/10/2004, 7:46 AM |
|
Peter,
I tried the connection string you provided but without avail I recieved a Data Link Error pop-up message indicating that the Test Connection failed because of provider initialization error and also the string does not conform to the OLE specification.
I did make the right replacements to the provided string.
|
|
|
peterr
Posts: 5971
|
Posted: 01/18/2004, 1:11 PM |
|
This worked OK for me.
In this case your hosting company might've provided you with a wrong connection string. Please use the exact connection string that they gave you and see if it works.
You can search the generated file "Common.asp" for the string "ConnectionString = " , then enter the connection string there.
If it doesn't work then resolve this issue with your hosting company.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|