Database Error-Access

Results 1 to 5 of 5

Thread: Database Error-Access

  1. #1
    Vishal World Guest

    Default Database Error-Access

    Sir,<BR>I have problems with AdoDB, I have created a File dsn & placed in c:inetpubwwwrootmotmail
    ew.dsn. Now when i try to access & display the records in the web page syntax-&#062;<BR>&#060;%<BR>Dim oc,os<BR>set oc = Server.CreateObject("ADODB.Connection")<BR>Set os = Server.CreateObject("ADODB.Recordset")<BR>oc.Open "new.dsn","",""<BR>Os.Open "Select item name from item",oc<BR>%&#062;<BR>&#060;Select size=10&#062;<BR>&#060;%Do while Not os.EOF%&#062;<BR>&#060;option&#062;&#060;%os("item name")%&#062;&#060;/option&#062;<BR>&#060;%<BR>Os.MoveNext<BR>loop<BR> %&#062;<BR>&#060;/Select&#062;<BR>I get a message:<BR>Error Type:<BR>Microsoft OLE DB Provider for ODBC Drivers (0x80004005)<BR>[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified<BR>/motmail/Welcome.asp, line 16<BR>I do not know whats wrong<BR>Please advice<BR>Awaiting<BR>

  2. #2
    Join Date
    Dec 1969

    Default Try

    replace oc.Open "new.dsn","","" <BR>with :<BR>oc.Open "fileDSN=c:inetpubwwwrootmotmail

  3. #3
    Join Date
    Dec 1969

    Default You could

    Try creating a system dsn instead of a file dsn

  4. #4
    Ducht Guest

    Default even better is not using...

    ..a DSN at all. However the difference is minimal on a relatively quit site, OLEDB is an better way to connect to an DB. For example the OLEDB syntax for connecting to an SQL server db would be:<BR><BR>connstring = "Provider=sqloledb.1;Data Source=[your servername];Initial Catalog=[db name];User Id=xxx;Password=xx;"<BR>Set objConn = Server.CreateObject("ADODB.Connection")<BR>objConn .Open connstring<BR><BR>more info at<BR><BR>Peter<BR>

  5. #5
    Join Date
    Dec 1969

    Default RE: even better is not using...

    and for access <BR>"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:datadb.mdb; etc. etc." <BR><BR><BR><BR>

Posting Permissions

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