Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
afterburn
Starting Member
28 Posts |
Posted - 2003-08-14 : 11:53:45
|
| I am having issues with SP's in ADO. seems that if I define a sp with the default value of null and only one parameter then it correctly passes null, however if I add parameters to it then it no longer works. ADO throws an error saying that Invalid paramter. But seems to only occur on data types of money,int,float etc. I can pass a varchar or anything else as just @value varchar(10) = nullbut integeral types seem to fail in ADO????With more than one parameters. |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2003-08-14 : 11:58:22
|
| ADO doesn't actually understand parameter names, even though they are named. You have to pass parameters in the correct order, if you want some optional ones, put them at the end.Damian |
 |
|
|
MichaelP
Jedi Yak
2489 Posts |
Posted - 2003-08-14 : 12:17:05
|
If you are using ADO 2.5 (maybe it's 2.6) or higher, you can do this:'VB 6.0 codeDim oCmd as ADODB.COmmandSET oCmd = New ADODB.CommandoCmd.NameParameters = true 'This is what should make it work for ya Let me know if you need more details. If you'd like to post a code sample, that'd work too.Michael<Yoda>Use the Search page you must. Find the answer you will.</Yoda> |
 |
|
|
|
|
|