transferdatabase

T

tthoang

I am using MS Access 2003. When using transferdatabase function to export
tables in an access database to Oracle. I get an error message sayin "type
mismatch". The code I type in as follows:

DoCmd.TransferDatabase "acExport", "ODBC Datababe", "ODBC;DSN=fdr1;
UID=hoant; PWD=hoant; Database=Oracle", acTable, "Source=PRB_BASIN_HEADER",
"Destination=PRB_BASIN_HEADER", "StructureOnly = False", "StoreLogin = True"

Can you help me to locate the mismatch type or if you have a working
example. Please allow me to share.
 
D

Douglas J. Steele

Try removing the Source=, Destination=, Structure= and StoreLogin= bits from
your code (and take the boolean values out of the quotes):

DoCmd.TransferDatabase "acExport", "ODBC Database",
"ODBC;DSN=fdr1;UID=hoant;PWD=hoant;Database=Oracle", acTable,
"PRB_BASIN_HEADER", "PRB_BASIN_HEADER", False, True

If you want named arguments in your call, you need the names to be outside
of the quotes and you need to use :=, not =

DoCmd.TransferDatabase "acExport", "ODBC Database",
"ODBC;DSN=fdr1;UID=hoant;PWD=hoant;Database=Oracle", acTable,
Source:="PRB_BASIN_HEADER", Destination:="PRB_BASIN_HEADER",
StructureOnly:=False, StoreLogin:=True
 
T

tthoang

I cut and paste your suggested code into my code. I still get the same error:
"Type Mismatch". Any idear ???
 

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