Database Question

Results 1 to 3 of 3

Thread: Database Question

  1. #1
    Join Date
    Dec 1969

    Default Database Question

    Hello <BR>I am a beginner trying to store the web page entries in database.My host has given me the address "/home/xyz-www/folder1" to store all my files.I have stored my "test.mdb" there.In my code, if i try the physical path directly ,i get an error message "ADODB.Connection.1 error &#039;80004005&#039; -Data source name not found and no default driver specified".So i tried to specify the url like "". It also give the same error message. my code is<BR><BR>&#060;%<BR>username = Request.form("textUserName")<BR> email = Request.form("textEmailAddress")<BR>dim accessdb,strconn<BR>accessdb = ""<BR><BR>strconn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE ="<BR>strconn = strconn & accessdb & ";" <BR>dim conn,rst<BR>set conn=server.createobject("adodb.connection")<BR>co strconn<BR>set rst = Server.CreateObject("adodb.recordset")<BR><BR>rst .open test,strconn,adopenDynamic,adLockoptimistic,adcmdT ableDirect<BR>rst.Addnew<BR>rst.Fields(0) =username<BR>rst.Fields(1) =email<BR>rst.update<BR><BR>rst.close<BR>set rst = nothing<BR>conn.close<BR>set conn = nothing<BR>%&#062;<BR>Could you please help me? <BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default try this:

    try to edit your actual drive path... (notice the back-slash characters)<BR><BR>you can change C:Inetpubwwwroot to what it should be...<BR><BR>accessdb ="C:Inetpubwwwrootfolder1 est.mdb"<BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Database Question

    you always need to use the path not a URL. The path must be from the drive. Here is an example "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:\delta\data\objective.mdb"<BR><BR>You can also use Sever.mappath to have the server look up the path for you. example "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= & server.mappath("data.mdb")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts