Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Returning a recordset from a dll 1

Status
Not open for further replies.

Smitty020

MIS
Jun 1, 2001
152
US
ok, I have a app that needs to take the selection from a listbox, i.e. "customer" use a dll that takes that customer name, runs a query and returns that recordset to the main app. Any ideas??? I need to return that recordset!

Thanks a bundle!

Smitty
 
Was the dll created using VB? You don't give much info about the dll...do you have any info on it?

You'll need to know the name of the function that accepts the customer name as an argument and returns the recordset. Do you know if the returned recordset is an ADO recordset? Do you need to provide any database connection arguments to the dll?

Once you get some more info on the dll you can start figuring out how to use it.



 
Yes, I created the dll in VB. I need to take each name from the dataset, use the dll make some changes, and then shoot a recordset back to the main app. Basically:

1.Someone will choose a customer from the list box, and when they hit the command it will use the dll (where the SQL is) and return a recordset to display on the main app)

The dll has 1 function, it's ComputeInterest(i) where i is set to the recordset in the main of the customer selected.

So, yes, the returned recordset is an ADO recordset.


Any ideas?

Thank you for your help!

Smitty
 
Have your Method be a function. Have its return type be ADODB.Recordset

for example

Dim rs AS ADODB.Recordset
Dim myObj AS MyLib.Obj ' your clas object here
Set myObj = New MyLib.Obj

.
. 'some processing
.

Set rs = myObj.DoSomething(...) ' your method call that
' returns a recordset

*********************************************

in the dll

Public Function DoSomething(...) AS ADODB.Recordset
DIM rs AS ADODB.Recordset
Set rs = New ADODB.Recordset

.
. 'some processing
.

rs.open "SELECT blah blah blah", conn,...

Set DoSomething = rs
End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top