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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help Updating a Recordset

Status
Not open for further replies.

kateyez44

Programmer
Mar 22, 2002
5
US
Okay, I am trying to develop a COM+ dll that will do all interactions with a database from an ASP page that I am developing. I am developing the dll, as well as some test code in VB and that's where I am now.

My VB test code calls a Method in my dll that gets a recordset from a database:


Dim rsCurr As ADODB.Recordset

Set rsCurr = m_currObject.LoadClaimantForm


This works beautifully. Now, my problem is with updating the recordset. The form that I'm creating will have over 70 fields on it. It is just not feasible to create a property for each field in the dll and then update the properties so that I can update the recordset. What I would like to do is update the recordset that I use locally on the form with the changed values and then pass this recordset to the dll so that the actual database update occurs from the dll, not the form. I don't know how to do this. This is what I tried, but didn't work:


FROM THE FORM:
m_currObject.SaveClaimantForm(rsCurr)

FROM THE DLL:
Public Sub SaveClaimantForm(rsClaimant As ADODB.Recordset)
Set m_rsCurrRS = rsClaimant

Set m_rsCurrRS.ActiveConnection = m_oCurrConnection
m_rsCurrRS.Update

Set m_rsCurrRS.ActiveConnection = Nothing
End Sub


What am I doing wrong and what should I be doing to make this work? Please help me, I would really appreciate it.
 
OMG, I can't believe the solution was that simple and I have been agonizing over this for so long!! Thank you so much!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top