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

Updating Table in One DB from Table in A Different DB

Status
Not open for further replies.

MichaelRed

Programmer
Dec 22, 1999
8,410
US
I have TWO Ms. Access 2K databases. I can get ADODB connections to BOTH of them. I can get individual fields from Either in the immediate window. I wnat (Need?) to do an Update Query to get the info in one updated from the other.

I Cnnnot.

The line in the code (Ms Access 2K, but I am flexible, actually would PREFER to use the "commented out" ADODB ".Command"):

Code:
'                Set cmdUpdt = New ADODB.Command
'                With cmdUpdt
'                    .ActiveConnection = CurrentProject.Connection
'                    .CommandType = adCmdText
'                    .CommandText = sqlUpDt(Idx)
'                    .Execute lngRowsChanged
'                End With
                DoCmd.RunSQL sqlUpDt(Idx)       'Err "... Cannot find Table or Query 'rsChargeNbr' ... "

Any "help" out there?



MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
I see no one answered you either.
By Now 8/14/01 versus 03/13/01 I assume you have found another way of doing this. I am looking at ADOX & ADODB in the same project to accomplish soomething similiar. SEE POSTING UNDER WARLOCK STREAMS
ADOX will create a NEW database. ADODB will save a recordset as xml. My modifications are made in that format.
Saved again as XML. The Stream object of ADODB somehow allows an automated read of this data into the newly created database. I'm still X(&%$-ing aroung trying to really get this last portion to work. I dont know if the destination database needs a table available or what.

Any answer is better than none !!!!

Try to stream it theres even a load from file method, if you don't mind persisting to file as xml your modifications.
I try not to manipulate too much in SQL. Just give & get with it. LOL

 
WOW. Talk about a blast from the PAST!!! How did you find this thread?

Actually I haven't ever quite gotten this to work. In any manner. What I don't understand is "WHY". ADO is supposed to be just an ODBC wrapper. I can DO THIS with DAO recordsets using any number of soloutions, including ODBC connections, adding the db(s) to the workspace, or just declaring and instantiatiing the various dbs and tables within a simple procedure. I have even gotten the SAME db/Table instantiated with two different "names", one w. ODBC and the other with the declaration and instantiation route. In many (if not ALL) of the above, copying info from A to B is at worst just an exercise in code, and often is easily done with simple queries.

? What is WRONG with ADO?

MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top