Unanswered: SQL Server IGNORES updates. Is it just me?
My framework has a database connection object that encapsulates the details of connecting. So during the time the app is live, the same connection is used. It usually doesn't get closed until the app terminates.
It uses ADO, and mostly Visual Basic 6.0 sp3.
Here's my connection string:
Provider=SQLOLEDB.1;Integrated Security=SSPI;Extended Properties="Server=nugent;Database=Destination";Us e Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=NUGENT;Use Encryption for Data=False;Tag with column collation when possible=False
Here's the problem: When I execute code to modify an existing row, I can see the value change in debug mode. But the change never actually makes it to the database! To add insult to injury, there's no exception or error of any kind noted anywhere. I'm forced to delete the row and recreate it.
In the code below, you can see that I don't start update mode because there's no way to do that anymore using ADO. You can also see at the end that I call .Update before I close the recordset. I've also tried .UpdateBatch (which interestingly enough doesn't raise an exception but also doesn't work), and .MoveNext. None of these cause the change to be reflected in the recordset. It also doesn't care whether the image field is modified or not. Whether I use AppendChunk or just assign an array of bytes--doesn't matter. No matter what happens, my update is ignored without a "why." Does anyone have any ideas? My reputation's starting to slip.
Here's one example (there are others):
SqlStr = "Select * from RunInput Where ID=" & Args.Item("RunInputID")
Set RS = mSqlDataProvider.LinkToQueryObj(SqlStr, adOpenDynamic, adLockPessimistic, adCmdText)
If RS Is Nothing Then
Err.Raise .LastError, , .LastErrorText
RS!RunID = Args.Item("RunID")
.... more field names deleted .....
If Not IsNull(Args.Item("ScalarValue")) Then
RS!ScalarValue = Args.Item("ScalarValue")
RS!ScalarValue = Null
If Not IsNull(Args.Item("StreamedValue")) Then
Bytes = RS!StreamedValue
Bytes = Args.Item("StreamedValue")
If Not IsNull(RS!StreamedValue) Then
RS!StreamedValue = Null
Set RS = Nothing
I love animals. They're delicious.