Re: ADODB to RDO

Tech-Archive recommends: Fix windows errors by optimizing your registry



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.

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
in
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




.



Relevant Pages

  • CR9, RDC and RDO recordset => Crash
    ... All tutorials and documentation i found refers to RDO ... and ADO, but examples are only with ADO. ... Create a simple report file report.rpt based on the above TTX. ... | Dim conn As ADODB.Connection ...
    (microsoft.public.vb.crystal)
  • problem while creating/acessing temp tables through ADO
    ... I have a project in RDO which works fine but i am now trying to ... Dim con As New ADODB.Connection ... Dim sSql As String ... I am able to insert a value and then select it from the temp ...
    (microsoft.public.vb.database.ado)
  • problem while creating/acessing temp tables through ADO
    ... I have a project in RDO which works fine but i am now trying to ... Dim con As New ADODB.Connection ... Dim sSql As String ... I am able to insert a value and then select it from the temp ...
    (microsoft.public.data.ado)
  • Re: querying access tables
    ... Why the heck you use adodb in first place? ... "Jochen Becker" wrote in message ... > WHERE clause is always successful when using DAO, ... > Dim dbs As New ADODB.Connection ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: set warnings
    ... I wrongly assumed that you were using ADO.NET and not ADODB. ... > Dim RsMedlem As ADODB.Recordset ... > Dim cnnToFile As New ADODB.Connection ...
    (microsoft.public.dotnet.languages.vb)