Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 Pass adodc.recordset between function

views
     
TSychwang
post Feb 21 2006, 03:52 AM, updated 20y ago

Little *
*******
Senior Member
4,607 posts

Joined: Jan 2003
From: Malaysia
How to pass adodc.recordset between function?
I use the methods below but I got type misMatch Error


CODE


Function F1(RCS as adodc.recordset)
     ................

end function


function F2()
   public RCS as new adodc.recorset
   call F1(RCS)

end function

nxfx
post Feb 21 2006, 08:19 AM

Enthusiast
*****
Senior Member
979 posts

Joined: Jan 2003


Try passing adodc only.

Function F1(RCS as adodc)

TSychwang
post Feb 21 2006, 11:18 AM

Little *
*******
Senior Member
4,607 posts

Joined: Jan 2003
From: Malaysia
Still got Error
"expected User Define Type, Not Project"

Eventless
post Feb 21 2006, 02:58 PM

Look at all my stars!!
*******
Senior Member
2,643 posts

Joined: Jan 2003
The first problem you are facing is due to the fact that you are using a function but you are not handling the return value from the function. If there's no return value, don't use a function.

The prefix that you should be using for the recordset is adodb not adodc.

Example:
CODE

dim RCS as new adodb.recordset


This post has been edited by Eventless: Feb 21 2006, 03:01 PM

 

Change to:
| Lo-Fi Version
0.0154sec    1.15    5 queries    GZIP Disabled
Time is now: 23rd December 2025 - 11:48 PM