Missing Something Obvious Here!

W

Wayne Wengert

I am trying to define the active connection for a command in an ASP page but
I keep getting the error:

---------------------------------------------
ADODB.Command error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.

/LoginControl.asp, line 19

--------------------------------

Line 19 is the "cmdDC.ActiveConnection = myConn" line. The code is as
follows:

====================================

Dim cmdDC, RecordSet
Dim strUserName, strPassword

strUserName = Request.Form("txtName")
strPassword = Request.Form("txtPassword")

'-- Create command object
Set cmdDC = Server.CreateObject("ADODB.Command")
cmdDC.ActiveConnection = myConn

====================================

I use an include file at the start of the ASP page to establish my
connection - the included code is::

====================================

Dim cst, myConn
Sub CreateConnection()
cst = "Provider=SQLOLEDB; Data Source = xx.xx.xx.xx; Initial Catalog =
myDB; User ID = myID; Password=myPW"
set myConn = Server.CreateObject("ADODB.Connection")
myConn.open cst
End Sub

====================================

Any suggestions on what I did wrong here?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top