Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO Command object Error

Status
Not open for further replies.

vasah20

Programmer
Feb 16, 2001
559
US
I keep getting the error that the "Parameter Object is improperly defined. Inconsistent or incomplete information was provided."

Here is what my Parameter code looks like:

With cmd
.ActiveConnection = c
.CommandText = "usp_storeInfo"
.CommandType = adCmdStoredProc
.Parameters.Append .CreateParameter("retval", adInteger, adParamReturnValue)
.Parameters.Append .CreateParameter("coName", adVarChar, adParamInput, 256, myCoName)
.Parameters.Append .CreateParameter("coAddr1", adVarChar, adParamInput, 64, myCoAddr1)

If myCoAddr2 = "" Or IsNull(myCoAddr2) Then
.Parameters.Append .CreateParameter("coaddr2", adVarChar, adParamInput, 64, Null)
Else
.Parameters.Append .CreateParameter("coaddr2", adVarChar, adParamInput, 64, myCoAddr2)
End If

.Parameters.Append .CreateParameter("coCity", adVarChar, adParamInput, 64, myCoCity)

'------THE FOLLOWING GIVES ME AN ERROR!!!!!
.Parameters.Append .CreateParameter("coState", adChar, adParamInput, , myCoState)
.Parameters.Append .CreateParameter("coPhone", adChar, adParamInput, , myCoPhone)

cmd.Execute
retVal = CByte(.Parameters("retval"))
End With


thanks in advance
leo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top