Re: ADODB to RDO
- From: "John" <goondoo27@xxxxxxxxxxx>
- Date: Fri, 8 Dec 2006 09:49:59 -0600
Ralph,
Thanks for the reply. Yep you guessed right, I have a ADODB.Recordset that I
need to save into an RDO.Resultset. I wrote the code to do it, and with only
about 1000 records it's actually very fast (around 3 seconds).
Note, I removed the error checking and some details for clarity:
Dim rsMy As ADODB.Recordset
Dim rs As rdoResultset
Dim sSql As String
Dim sSql2 As String
'Open the MySQL table
Set rsMy = New ADODB.Recordset
rsMy.Open sSql, oConn, adOpenStatic, adLockOptimistic
rsMy.MoveFirst
'Open the RDO Resultset
Set rs = oRDO.OpenResultset(sSql2, rdOpenDynamic, rdConcurValues,
rdExecDirect)
'Loop through each record in the MySQL table and copy it to RDO
Resultset
Do While Not rsMy.EOF
rs.AddNew
rs.rdoColumns("COL1).Value = rsMy.Fields("a").Value & ""
rs.rdoColumns("COL2").Value = rsMy.Fields("b").Value & ""
rs.Update
rsMy.MoveNext
Loop
rsMy.Close
rs.Close
Thanks,
John
"Ralph" <nt_consulting64@xxxxxxxxx> wrote in message
news:H4qdnQLsfvr1fuXYnZ2dnUVZ_h6dnZ2d@xxxxxxxxxxxxxxx
"John" <goondoo27@xxxxxxxxxxx> wrote in message
news:OFv9SSjGHHA.1188@xxxxxxxxxxxxxxxxxxxxxxx
Ok here's a good one.in
I have an ADODB table that I need to copy into an RDO table. Do I have to
write the code to read each row from the ADODB table and create a new row
the RDO table? Or is there a trick that I can do this without looping
through each row?
Thanks,
John
We need more details. ADO and RDO are data access libraries - they don't
have "tables". They do have record/result objects. So best guess is you
want
to convert an ADODB.Recordset object to a rdoResultset object then the
answer is No.
If you had something else in mind please let us know.
-ralph
.
- Follow-Ups:
- Re: ADODB to RDO
- From: Ralph
- Re: ADODB to RDO
- References:
- ADODB to RDO
- From: John
- Re: ADODB to RDO
- From: Ralph
- ADODB to RDO
- Prev by Date: Re: RunTime Error 3021
- Next by Date: list database users sql server 2000 VB
- Previous by thread: Re: ADODB to RDO
- Next by thread: Re: ADODB to RDO
- Index(es):
Relevant Pages
|