Copy to a sql sever

A

alvin Kuiper

Hi!
I use this code:
Dim strDestinationMDB As String
Dim dbsData As DAO.Database
strDestinationMDB = "\\server\pcg\pcg.mdb"
Set dbsData = DBEngine.OpenDatabase(strDestinationMDB, _
False, False, ";pwd=1234")
'Export form
'DoCmd.CopyObject strDestinationMDB, "kunder", acForm, "Kunder"
'Export table
DoCmd.TransferDatabase acExport, _
"Microsoft Access", _
strDestinationMDB, _
acTable, _
"kunder", _
"kunder"

Here i Export a table(kunder) from one db another DB
But now i want to export this table to a DB on a sql server
can someone help me here?

regards
alvin
 
S

Stefan Hoffmann

hi Alvin,

alvin said:
But now i want to export this table to a DB on a sql server
can someone help me here?
The easiest method is to create a linked table in Access and copy the
data with a simple query.



mfG
--> stefan <--
 
A

Al McC

If this is a one-time task, the simplest way is to create a new Access
Project Using Existing Data (attached to the target SQL Server database) and
import the table using File=>Get External Data=>Import.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top