Re: Ado Recordset Update method an Status fields property




"Dedalus" <ulysse@xxxxxxxx> wrote in message
news:b958357c-0cd3-49d8-9946-f5b52c2e3b27@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have this situation (the example code it is in visual basic 6):

Dim sSqlSelect As String
dim vFields() as variant
dim vValues() as variant
Dim cnn As ADODB.Connection

On Error GoTo ErrorHandler
....
Set cnn = New ADODB.Connection
cnn1.Open aConnectionString
Set rs = New ADODB.Recordset
With rs
.CursorLocation = adUseClient
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
.Open aSqlSelect, cnn
End With

vFields= Array("Field1", "Field2", "Field3", "Field4")
vValues= Array(aValue1,aValue2, aValue3, aValue4)
rs.update vFields,vValues
....

If, for example, the Field3 is a string field with size equals to 2
and aValue3 is a string with lenght 30,
the update method raise an error.
I can find the field that have fired the error?
In other words, my question it may be this: using Ado .Update method
with notation that use 2 arrays, the .Status property in Fields
collection dont is supported?
Ciao

How many times are you going to ask this question?

Enumerate the ADO.Connection.Errors collection to find the exact error.
Run the .Supports method to find out whether your provider/driver and cursor
settings supports this fuctionality.
I'm not sure if the Supports method 'supports' discovery on this obscure
syntax. But you might try it.

-ralph


.



Relevant Pages


Loading