Garth,
This may be so easy that you have tried it but we attempted the same kinds
of things with vbNullstring etc
and found that for Oracle (which expects a string) we have the best
results using the word "Null" itself as in:
with cmdStoredproc
If IsNull(rs!SHIP_DATE) Then
.Parameters.Append .CreateParameter("inShipDate", adVarChar, adParamInput, 50, Null)
Else
.Parameters.Append .CreateParameter _
("inShipDate", adVarChar, adParamInput, 50, DefaultDateFormat(rs!SHIP_DATE))
End If
> -----Original Message-----
> From: Schulte, Garth [SMTP:GSchulte@b...]
> Sent: Friday, May 25, 2001 11:03 AM
> To: professional vb
> Subject: [pro_vb] passing nulls while using the "connection.stored_procedure" trick
>
> Greetings people,
> i havn't been in need of a newsgroup in a while. ironically enough,
> a day after finally accomplishing every microsoft cert, mishaps are blooming
> all over the network. i've been using stored procedures as methods of the
> connection object since ado 2.1. Has been working without a hitch in all of
> our production systems. Quick, easy, no type conversion necessary. Works
> like so...
>
> objConnection.stored_proc_to_run [varParam1], [...][, rstDataset]
>
> pass in the parameters seperated by commas, if you'd like a recordset
> returned, the last param must be a recordset.
>
> Here's my issue, passing in nulls to a date input param. Tried it all...from
> defaults in the sprocs, to vbnullstrings in the client. Doesn't want to eat
> it. Works if i set the date as the last input param in the sproc with a
> default of null, while in vb leaving out the last param entirely, but i need
> a recordset. Kills that workaround...
>
> If anyones dealt with this vague undocumented area, let me know ;]
> thanks,
> -gcs
>