ADODB.Connection Fails to connect ASP


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: ADODB.Connection Fails to connect ASP

  1. #1
    Join Date
    Jun 2007
    Posts
    1

    ADODB.Connection Fails to connect ASP

    One of our clients is using the following ASP code to connect to the MS Access DB on IIS 5.

    dsn = "dsn=mydb;uid=GOPUser;pwd="""";"
    conn.open dsn

    It works great for a couple of days. Then it dies on the open code. with the following error.

    error '80004005' unspecified error

    To fix the problem I comment out pwd=""""; part from the dsn string and it works again for a while. Until it dies again. I put the pwd part back and we are up and running again.

    I did notice there are a bunch or ADODB.Recordset objects that get created but either not getting closed or not set to nothing. Would that eventually lead to connection failing to open?

    Anyone has any suggestions?

  2. #2
    Join Date
    Dec 2003
    Posts
    2,750
    I would highly recommend using Jet OLEDB instead of ODBC (and the MS Access driver) since the technology is more stable. Below is a connection string example:

    Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

  3. #3
    Join Date
    Feb 2004
    Location
    Sydney, Australia
    Posts
    498
    Paul,

    'I would highly recommend using Jet OLEDB instead of ODBC (and the MS Access driver) since the technology is more stable.'

    What are the symptoms one would see if using ODBC? (am starting to get a little worried - have been using ODBC connection for a long time :-(

    Greg

    BTW - This would allow me to have the user browse to find the d/b (a good thing), and store this info somewhere (typically in the registry) - what would one do for SQL - we have users with SQL and Access using the same .exe

  4. #4
    Join Date
    Mar 2005
    Location
    Los Angeles, Calif. AKA: Gangsta Yoda™
    Posts
    455
    If you are leaving recordsets open and not closing/destroying them then that can potentially lead to database issues especially with Access. Usually they create the database corruptions but other issues are potential too.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer code questions via PMs.
    Microsoft MVP 2006-2009
    Office Development FAQ (VBA, VB6, VB.NET, C#)
    Software Engineer MCP (VB6 & .NET)
    Reps & Rating PostsVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6Outlook Global Address List

Similar Threads

  1. connect Asp Using VB 6.0
    By hid3t0 in forum VB Classic
    Replies: 1
    Last Post: 06-02-2005, 10:57 AM
  2. connect POP3-server via ASP?
    By bart in forum ASP.NET
    Replies: 3
    Last Post: 06-01-2001, 02:29 PM
  3. No Backwards Fetching
    By Brian in forum VB Classic
    Replies: 3
    Last Post: 01-07-2001, 05:14 PM
  4. Winsock32, Connect fails to connect to a peer
    By Chris.G in forum VB Classic
    Replies: 4
    Last Post: 11-13-2000, 03:16 PM
  5. Winsock32, Connect fails to connect to a peer
    By Chris.G in forum VB Classic
    Replies: 0
    Last Post: 11-12-2000, 11:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center