Table already exists (#1050) error

xlabuchi

New member
Local time
Today, 09:06
Joined
Jan 11, 2014
Messages
1
Hello,
I want export my table from access to mysql by button click.

Here my code:

DoCmd.TransferDatabase acExport, "ODBC Database", _
"ODBC;DSN=bw base to mysql BannyworksDB;UID=###;PWD=###;LANGUAGE=us_english;" _
& "DATABASE=BannyworksDB", acTable, "bazaT", "bazaT"

It is fine work, but if I click button again shortly it put out error:
Table already exists (#1050)

Furthermore I set in ODBC driver settings Ininitial Statement: DROP TABLE IF EXISTS `bazaT`;


Any help?
Please
 
It would appear that your
Furthermore I set in ODBC driver settings Ininitial Statement: DROP TABLE IF EXISTS `bazaT`;
is not working.
Can you test it somehow?
 
I have the same problem - what can i do

or is it possible to drop the mysql tab over vba access
 
I can't answer questions specific to MySQL as I don't use it.
However, rather than drop the table then recreate it, by not link the MySQL table in Access, then empty it and repopulate it using delete and append queries.

Welcome to AWF as well. In general you would do better to start your own thread rather than piggy back onto one that is 5 years old
 
no idea what you meant by that

my main prob is that i send by odbc an table to my webserver it works fine - if i do it once again than i get the failure - table already exists -

Code:
DoCmd.RunSavedImportExport "Abfrage1"

in the odbc settings i already i type in by initial statemant: DROP TABLE IF EXISTS `Reservierungen Abfrage2`; - but it does not work - if i wait i.e. one day than it works
 
no idea what you meant by that

my main prob is that i send by odbc an table to my webserver it works fine - if i do it once again than i get the failure - table already exists -

Code:
DoCmd.RunSavedImportExport "Abfrage1"

in the odbc settings i already i type in by initial statemant: DROP TABLE IF EXISTS `Reservierungen Abfrage2`; - but it does not work - if i wait i.e. one day than it works

Sorry but you've no idea about which part of my answer?
And you still didn't say which error you get.
I gave you an alternative method which would mean you don't need to drop the table as you wouldn't keep creating a new copy each time
 
Last edited:
i get this failure message
- table already exists -

can you send me an code example
 
Last edited:

Users who are viewing this thread

Back
Top Bottom