-
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
===============================================================================
-
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]
-
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
-
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