PDA

Click to See Complete Forum and Search --> : Bang Operator


ssundar
Nov 3rd, 2000, 03:34 PM
Hi,

I am using a ADODB recordset which is connected to a database in SQL server. And I am trying to use the !(bang) operator to access a field value from a recordset. But it is giving a error. ie. Following usage gives a error.

rs!fieldname

But if I replace it with

rs.Fields("fieldname").value

notation it works. I thought both were interchangeable.

Can somebody help me to understand why this problem is occurring?

Bye,
Sundar

ttingen
Nov 3rd, 2000, 03:56 PM
It works fine for me:

lngID = rs!LocationID

ssundar
Nov 3rd, 2000, 04:03 PM
This is the exact statement

dbDiags.Recordset.Fields("diag") = xdiags.Fields("diag").value

The left hand side is a ado data control and declaration of xdiags is as follows

Dim xdiags As ADODB.Recordset.


Thanks,
Sundar