Results 1 to 4 of 4

Thread: SQL Server 2005 Connection String Problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2011
    Posts
    2

    SQL Server 2005 Connection String Problem

    I'm having problem with my connection string .
    I'm trying to connect to the database through my web application of my site but it gives the following error message.

    " [DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connection.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.OleDb.OleDbException: [DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connection. "


    I'm using the following connection string:
    Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connection=False;

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: SQL Server 2005 Connection String Problem

    Two things:
    1) What kind of database are you connecting to?
    2) The reason it fails is because no provider has been declared. OLEDB isn't database specific (like the way ORACLIENT or SQLCLient or MySQLCLient are) so you need to specify what provider to use in order to complete the connection. So this goes back to my #1 point... what kind of database are you trying to connect to?

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2011
    Posts
    2

    Re: SQL Server 2005 Connection String Problem

    i'm using a ms sql server 2005 database. for this i'm using SQLOLEDB.1 provider.

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: SQL Server 2005 Connection String Problem

    Well, first, no you're not... you didn't specify a provider in your connection string. oledbclient doesn't use a provider by default... you need to specify it.

    Secondly: Why? Use the SQLClient namespace instead... It's there for you already to use. It's designed specifically to be used going against SQL Server databases (I wasn't paying attention to the subject line the first time around).

    If you got to the Database FAQ & Tutorials section in the Database Forums, you'll find plenty there to show you how it all goes together.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

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



Click Here to Expand Forum to Full Width