Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing a ADODB.Recordset Field to a function.
Message
De
13/08/2001 12:33:36
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Titre:
Passing a ADODB.Recordset Field to a function.
Divers
Thread ID:
00543095
Message ID:
00543095
Vues:
64
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform