I have the strangest error, and wonder if anyone else has seen it. I'm
using ADODB to return a set of SQL Server 2005 records via ODBC. If I
open the recordset this way
With cmd
.CommandType = adCmdStoredProc
.CommandText = "dbo.spMyProc"
Set prm = .CreateParameter("@ID", adInteger,
Value:=plngID)
.Parameters.Append prm
Set prm = .CreateParameter("@A", adBoolean, Value:=pbleA)
.Parameters.Append prm
Set prm = .CreateParameter("@B", adBoolean, Value:=pbleB)
.Parameters.Append prm
.ActiveConnection = mcnn
Set rst = .Execute
'same problem with rst.Open cmd
End With
a date/time field in the resultset is null, or as nullish as can be
determined. If I run the same thing this way
With rst
.Source = "EXEC dbo.spMyProc " & plngID & ", " &
IIf(pbleA, "1", "0") & ", " & IIf(pbleB, "1", "0")
.CursorType = adOpenStatic
.ActiveConnection = mcnn
.Open
End With
the date field is populated properly.
Has anyone else seen a bug like this? I've never seen it before--I use
setups like the first one all the time--and I can't find anything
about it on the internet(s) either.