Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing a ADODB.Recordset Field to a function.
Message
From
13/08/2001 12:33:36
 
 
To
All
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Title:
Passing a ADODB.Recordset Field to a function.
Miscellaneous
Thread ID:
00543095
Message ID:
00543095
Views:
65
Is it possible to pass an ADODB.Recordset Field to a function?

Here is what I tried and I am getting a "Compile error: - ByRef argument type mismatch" error. I tried passing the "adoField" in by ref and get the same error.

Dim MyRS As New ADODB.Recordset
Set MyRS = New ADODB.Recordset

... processing logic to put values into the "PolicyNo" field along with others...

Set MyString = WF(MyRS("PolicyNo"))

Private Function WF(adoField As ADODB.Field, TotalWidth As Integer) As String
If adoField.Type = adNumeric Then
WF = PadNumeric(adoField, TotalWidth)
Else
WF = PadSpaces(adoField, TotalWidth)
End If
End Function


Thanking you in advance for your help.
Next
Reply
Map
View

Click here to load this message in the networking platform