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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Procedure ... IN Parameter problem

Status
Not open for further replies.

Azita79

Programmer
Jan 30, 2003
41
US
Hi All,

1. Is there a max for the number of IN parameters?

2. When passing a DateTime parameter to a sproc, do I need to format it before passing it in VB code?

When I pass a DateTime prameter to my sproc from VB form I get this error:

"The object you entered is not a valid recordset property"

but when I run the exact SQl statement in Query Analyzer, it works fine

Any help is greatly appreciated


Azita
 
1. Is there a max for the number of IN parameters?
Yes, 2100.

2. If you're using ADO from Visual Basic, pass the parameter using the ADDBDate datatype, e.g.

Set adoDate = adoCMD.CreateParameter("adoDate", adDBDate, adParamInput, , txtMyDateControl)


If you're constructing a SQL string, delimit it in single quotes, e.g.

adoCMD.CommandText = "exec myStoredProc '01 Jan 2003', '10 Feb 2003'"





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top