If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

How does this happen?

Here's the code:
' This function is in a COM .dll, there are no statements between
' the client calling Addrecord, and the execution of this function in
the COM.
Public Function AddRecord(colCollection As Collection) As Collection
Dim blnHolder As Boolean
' Right now, rsRecordset contains the contents of colCollection as
the
' first record!!!!!!! E.G. ? rsRecordSet.fields(1) returns the
value contained
' in colCollection. Doing a watch on rsRecordSet shows the
"value" as coming
' from colCollection, and the "underlying value" as the original
value in the rs
' Update the class copy of the recordset
rsRecordSet.AddNew
blnHolder = FillRecordSet(colCollection)
' Update Database
If blnHolder Then
rsRecordSet.Update
Set AddRecord = colCollection
....

I don't see how the contents of the collection colCollection could
possibly get into rsRecordset, and
the private mrsRecordset by just calling this function. rsRecordset
does not exit in the client. Nothing
bound to anything.

I've worked on this for three days, and can't figure out how this
could possibly happen.

Re: How does this happen?

Looks to me like FillRecordSet(colCollection) is taking the collection and
adding it to the recordset. Note unless it completes correctly (blnHolder)
it doesn't update the recordset. You might want to look at FillRecordSet()

...joe

"S" <bangorme@NoSpamhotmail.com> wrote:
>Here's the code:
>' This function is in a COM .dll, there are no statements between
>' the client calling Addrecord, and the execution of this function in
>the COM.
>Public Function AddRecord(colCollection As Collection) As Collection
> Dim blnHolder As Boolean
> ' Right now, rsRecordset contains the contents of colCollection as
>the
> ' first record!!!!!!! E.G. ? rsRecordSet.fields(1) returns the
>value contained
> ' in colCollection. Doing a watch on rsRecordSet shows the
>"value" as coming
> ' from colCollection, and the "underlying value" as the original
>value in the rs
> ' Update the class copy of the recordset
> rsRecordSet.AddNew
> blnHolder = FillRecordSet(colCollection)
> ' Update Database
> If blnHolder Then
> rsRecordSet.Update
> Set AddRecord = colCollection
>....
>
>I don't see how the contents of the collection colCollection could
>possibly get into rsRecordset, and
>the private mrsRecordset by just calling this function. rsRecordset
>does not exit in the client. Nothing
>bound to anything.
>
>I've worked on this for three days, and can't figure out how this
>could possibly happen.
>
>Any insight, or even guesses would be helpful
>
>Thanks
>Scott
>