rayxu
June 17th, 2001, 04:37 PM
how to convert(and import) Access db to oracle db? thanks
|
Click to See Complete Forum and Search --> : how to convert(and import) Access db to oracle db? thanks rayxu June 17th, 2001, 04:37 PM how to convert(and import) Access db to oracle db? thanks Iouri June 18th, 2001, 07:26 AM Try this approach INSERT INTO Table1 IN 'ExternalDatabasePath1' SELECT * FROM Table1 IN 'ExternalDatabasePath2'; where externaldatabasepath1 & 2 are something like c:\databases\db1.mdb & c:\databases\db2.mdb (INSERT INTO Table1 SELECT * FROM Table2 IN 'c:/aaa/bbb/Database.mdb') Database, which engine is understood by VB ===================================== You can also add a type to the end of the IN clause such as "dBASE IV" e.g., INSERT INTO Table1 IN 'ExtDB' 'dBASE IV' SELECT * .... 'Another example insert to external db Dim db as database Set db = Workspaces(0).OpenDatabase(app.path & "Biblio.mdb") db.execute "SELECT * INTO [dBase III;DATABASE="C:My Documents].[test] FROM [authors]" By using the brackets and dot operator, you get a completely proper output in the ISAM database type of your choice. Also, if you choose Text as the database type, the statement creates a Schema.ini for you automatically, or adds a new section for your new data file to a Schema.ini already in the path folder. Iouri Boutchkine iouri@hotsheet.com Robert Moy June 22nd, 2001, 10:03 PM Hello: You can try this code: Private Sub Command1_Click() On Error Resume Next Do Until Adodc2.Recordset.EOF If Adodc2.Recordset.BOF Then Adodc1.Recordset.AddNew Adodc1.Recordset.Fields(0).Value = Adodc2.Recordset.Fields(0).Value Adodc1.Recordset.Fields(1).Value = Adodc2.Recordset.Fields(1).Value Adodc1.Recordset.Fields(2).Value = Adodc2.Recordset.Fields(2).Value Adodc2.Recordset.MoveNext Else Adodc1.Recordset.AddNew Adodc1.Recordset.Fields(0).Value = Adodc2.Recordset.Fields(0).Value Adodc1.Recordset.Fields(1).Value = Adodc2.Recordset.Fields(1).Value Adodc1.Recordset.Fields(2).Value = Adodc2.Recordset.Fields(2).Value Adodc2.Recordset.MoveNext End If Loop If Adodc2.Recordset.EOF Then Adodc1.Recordset.AddNew Adodc1.Recordset.Fields(0).Value = Adodc2.Recordset.Fields(0).Value Adodc1.Recordset.Fields(1).Value = Adodc2.Recordset.Fields(1).Value Adodc1.Recordset.Fields(2).Value = Adodc2.Recordset.Fields(2).Value Adodc2.Recordset.MoveNext End If End Sub Good Luck codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |