Hello,
My table in Access Database has more than 60 fields.
I have client app which calls the function in server app (dll) to carry
out a specific function.
In DLL, if my argument exceeds more than 60, it will give me an error "too
many arguments" cannot pass more than 60 arguments.
Defining UDT will resolve my problem, but i don't clearly understand the
process:
For example, code on a middle-tier application might resemble:
Option Explicit
' This code is in a code module.
'I will define it all UDTs in DLL, correct?
Public Type udtMyType ' Definition of a Public UDT
birthDate As Date
lastName As String
firstName As String
address As String
End Type
Public Function passUDT(myrec As udtMyType) As udtMyType
' Modify the data somehow.
passUDT = myrec ' Return the UDT.
End Function
While code on the client machine that calls the function would be:
Option Explicit
Private myrec As udtMyType
'I am not able to understand how this work.
Private Sub Command1_Click()
Dim x As udtMyType
x = passUDT(myrec) 'In this example what is myrec holding
' Do something with the UDT data.
End Sub
Could somebody please explain me with a better example then the one above,
so i am able to understand the flow of UDT.
Thank you,
Vibha Prajapati