lenin
Aug 23rd, 1999, 03:30 PM
hi,
I seem to have a problem ( lack of intelligence ? ) regarding a small function I have. What I require is to call a function passing in an ado recordset, use the recordset in the function and return a different recordset to the call program.
e.g.
Call getCurrentCustomerQueries(lrs_customerID)
Public Function getCurrentCustomerQueries(customerRecords As ADODB.recordSet) As ADODB.recordSet
Dim lrs_results As ADODB.recordSet
If customerRecords.EOF Then
End
Else
Call de.query_no(customerRecords!customer_id, customerRecords!code)
Set lrs_results = de.rsquery_no
getCurrentCustomerQueries = lrs_results
End If
End Function
lrs_customer is a normal adodb.recordset and I want to query an SQL Server database for query numbers ( the second recordset ) that are associated with the customer_id, and return them as an adodb.recordset to thecalling program. However I get an "invalid use of property" error message.
Thanks in advance
Tony.
I seem to have a problem ( lack of intelligence ? ) regarding a small function I have. What I require is to call a function passing in an ado recordset, use the recordset in the function and return a different recordset to the call program.
e.g.
Call getCurrentCustomerQueries(lrs_customerID)
Public Function getCurrentCustomerQueries(customerRecords As ADODB.recordSet) As ADODB.recordSet
Dim lrs_results As ADODB.recordSet
If customerRecords.EOF Then
End
Else
Call de.query_no(customerRecords!customer_id, customerRecords!code)
Set lrs_results = de.rsquery_no
getCurrentCustomerQueries = lrs_results
End If
End Function
lrs_customer is a normal adodb.recordset and I want to query an SQL Server database for query numbers ( the second recordset ) that are associated with the customer_id, and return them as an adodb.recordset to thecalling program. However I get an "invalid use of property" error message.
Thanks in advance
Tony.