CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: ADO problem

  1. #1
    Guest

    ADO problem

    i tried to connect my program to SQL server reside on a server.. but the below error occur.. anyone have idea about it?

    ===============================================================================
    ADODB.Connection error '800a0bb9'

    The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another
    ===============================================================================


  2. #2
    Join Date
    Sep 1999
    Posts
    4

    Re: ADO problem

    You have to check the paramaters you supplied in your connectring string. These
    are:
    1- driver (in case of SQL Server the driver is {SQL SERVER}
    2- server (a valid server name)
    3- Uid (UID) (a valid user ID for example:'sa'
    4- Pwd (a valid password)
    5- database (a database name that really exists in your SQL Server)

    after supplying all information above, you suppose to be able to open the connection with the appropriate connection object.

    If something goes wrong I can be reached at [email protected]


  3. #3
    Join Date
    Jun 1999
    Posts
    42

    Re: ADO problem

    This is the code I use in a module.bas to connect to SQL 7.0

    Option Explicit

    Global Conn As New adodb.Connection
    Global Q As String
    Global rs As adodb.Recordset
    Global Qenter As String

    Public Sub Disconnect()

    Conn.Close

    End Sub

    Public Sub Connection()
    Dim sconnect As String
    On Error GoTo errorlabel

    sconnect = "UID=" & frmlogin.txtusername & ";PWD=" & frmlogin.txtpass & _
    ";DSN=" & frmlogin.txtDSN & ";"

    With Conn
    .ConnectionString = sconnect
    .Open
    End With

    frmLogin.Hide

    Exit Sub

    errorlabel:
    MsgBox "User or Password incorrect, try again", vbCritical, "Error Message"
    Exit Sub

    End Sub

    it works try it, if you have any more questions write me to my email
    [email protected]
    Hope this helps you
    Regards
    RSV


  4. #4
    Guest

    Re: ADO problem

    If this is in ASP then you need to include the file for ado constants in your web asp.
    Use the #INCLUDE directive


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

Featured