Cannot connect to database - ODBC Drivers error

Results 1 to 2 of 2

Thread: Cannot connect to database - ODBC Drivers error

  1. #1
    Join Date
    Dec 1969

    Default Cannot connect to database - ODBC Drivers error

    Hi<BR><BR>I am trying to break away from FrontPage 2000 and create my own<BR>database connection (so I have more control).<BR><BR>At the moment I have a web site up and running that uses ASP and FP server extensions, with Access.<BR><BR>I having been trying for over a week now to get a connection to work. I have tried all different methods from various sources.<BR><BR>The web site that is online uses a connection called: Database1<BR>I want to open up a test database on the live site called:<BR>TEST/mytest1.mdb (the TEST folder is located after the domain name i.e.<BR><BR>On my desktop (XP home) I have included Database1 on the User DSN - but still no joy.<BR><BR>I thought because the Access database is already up and running on the live site, I would be able to reference it for test purposes.<BR><BR><BR>This is the error:<BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80004005&#039; <BR><BR>[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified <BR><BR>/ad9.asp, line 5<BR><BR><BR>This is the only code on my .asp page;<BR><BR> &#060;%<BR>ConnectionString = "DSN=Database1"<BR><BR>set conn = server.createobject("adodb.connection")<BR>conn.op en ConnectionString<BR>%&#062;<BR><BR>&#060;%<BR>Conn .close<BR>Set conn = nothing<BR>%&#062;<BR><BR>Thanks in advance - Stephen<BR>

  2. #2
    Join Date
    Dec 1969

    Default Have you set up the DSN for...

    ...the mytest1.mdb? If not, it won&#039;t find it. How to set it up depends on how your site is hosted. My hosting company offers me an on-line control panel where I can do it.<BR><BR>Otherwise, use DSN-less connections. Check out the website or<BR><BR>Also, you seem to be putting your database within your web pages. This is VERY DANGEROUS. A clever hacker could figure out the web address for the mdb file and download it - easy, peasy. I STRONGLY advise you to store the mdb in a folder OUTSIDE your web root (i.e. outside your website folder structure) and put it there. Again you should find info on either of the sites above.<BR><BR>Oliver.

Posting Permissions

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