| | |
Archive MSaccess data into a different Access DB
Thread Solved |
I have a database (myDB1.mdb) that contains related data in seven tables. Using vb6 existing in a separate application, I would like to find a way to archive this data into a new database (myArchive1.mdb) located in the same location as the main database.
I understand how to use the INSERT INTO method, but I don't know how to get specific data (SELECT * from Table1 WHERE myField = 'XYZ') from one file and put it into another file.
Do I need two connection objects, one for each db?
Is it possible under one SQL statement?
Do I need to have pre-existing tables with the same structure in the destination database?
Any and all help is appreciated.
I understand how to use the INSERT INTO method, but I don't know how to get specific data (SELECT * from Table1 WHERE myField = 'XYZ') from one file and put it into another file.
Do I need two connection objects, one for each db?
Is it possible under one SQL statement?
Do I need to have pre-existing tables with the same structure in the destination database?
Any and all help is appreciated.
•
•
Join Date: May 2007
Posts: 1
Reputation:
Solved Threads: 1
Hi everybody, i created a database with one OLE object as data type using MS Access 2000 and want to display it in VB6 form. There are at least 20 records and i can connect and display only the text in the form but not the pictures. I used ADOdc. The error message is "No compatible source was found for this control, Pls. add an intrinsic DAta control or remote data control to the form". What do ypu mean by this. Any help will be very much appreciated.
I tried also the data control instead of ADO but it always display an error "unrecognized database format"... I also tried the example from microsoft published under Q205635 and displayed the same error.
Help please....
Thank you.
I tried also the data control instead of ADO but it always display an error "unrecognized database format"... I also tried the example from microsoft published under Q205635 and displayed the same error.
Help please....
Thank you.
Thanks to all for your help -
I couldn't get anywhere with the adodc so I pushed forward with the ADO.Command and here's what I came up with:
Private Sub cmdArchive_Click()
Set myConnection = DE1.conTest
myConnection.Open
Dim myCommand As New ADODB.Command
myCommand.ActiveConnection = myConnection
Dim mysql As String
mysql = "INSERT INTO tblFGPlates " & _
"IN 'G:\COMMON\QC\AlphaLIMSArchive.mdb' " & _
"SELECT * FROM tblFGPlates"
myCommand.CommandText = mysql
myCommand.Execute
myConnection.Close
Set myConnection = Nothing
Set myCommand = Nothing
End Sub
I couldn't get anywhere with the adodc so I pushed forward with the ADO.Command and here's what I came up with:
Private Sub cmdArchive_Click()
Set myConnection = DE1.conTest
myConnection.Open
Dim myCommand As New ADODB.Command
myCommand.ActiveConnection = myConnection
Dim mysql As String
mysql = "INSERT INTO tblFGPlates " & _
"IN 'G:\COMMON\QC\AlphaLIMSArchive.mdb' " & _
"SELECT * FROM tblFGPlates"
myCommand.CommandText = mysql
myCommand.Execute
myConnection.Close
Set myConnection = Nothing
Set myCommand = Nothing
End Sub
![]() |
Similar Threads
- Writing to an Access Database (Visual Basic 4 / 5 / 6)
- time to time data updates,to access that data time to time (MySQL)
- C++ and data access (C++)
- showing the form after insertind data (PHP)
- Read data from Access Database through PHP (PHP)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Please Help!
- Next Thread: Please Help how to set CCITT u-Law audio format by using "mciSendStringA" VB6 API.
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





