Click to See Complete Forum and Search --> : ADO problem


August 20th, 1999, 03:00 AM
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
===============================================================================

Marco Poincare
September 24th, 1999, 04:41 PM
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 poincare@mail.promobank.net

kieran_rush
October 5th, 1999, 01:47 PM
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
kieran@df1.telmex.net.mx
Hope this helps you
Regards
RSV

October 6th, 1999, 05:18 PM
If this is in ASP then you need to include the file for ado constants in your web asp.
Use the #INCLUDE directive