Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Connection does'nt work when uploaded


Message #1 by mark@w... on Thu, 18 Oct 2001 12:55:46
I am using the following code in a file called Datastore.asp  to connect 

to my access database (it works fine on my personal web server):

<%

  Dim strDatabaseType



  'Choose one of the following two lines, and comment out the other 

  strDatabaseType = "Access"



 

  'Now we use this selection to specify the connection string

  If strDatabaseType = "Access" Then

    strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _

                 "Data 

Source=C:\Inetpub\wwwroot\golive\config\databases\Shoplist.mdb;" & _

                 "Persist Security Info=False"

  Else

    strConnect = "Provider=SQLOLEDB;Persist Security Info=False;" & _

                 "User ID=sa;Initial Catalog=Movie;" & _

                 "Initial File Name=golive/config/databases/Shoplist.mdb"

  End If 

%>



After changing the DataSource address to:



"Data 

Source=http://www.mydomain.com/golive/config/databases/Shoplist.mdb;" & _

                 "Persist Security Info=False"



I upload to a web server and when I run my ASP I get the following error 

message:



Adding a New Record



Microsoft JET Database Engine error '80004005'



Not a valid file name.



/AddNew.asp, line 20







Any ideas what my DataSource address should be when uploaded to the server?

Is that the problem anyway?

  Return to Index