Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run-time error 3011 -- but the object exists!!

Status
Not open for further replies.

dBjason

Programmer
Mar 25, 2005
355
US
I'm trying to import a table from SQL Server 8 into a local Access 2003 database. The code looks like this:

DoCmd.TransferDatabase acImport, "ODBC Database", "ODBC;DSN=TimberlineWarehouse;LANGUAGE=us_english;DATABASE=TimberlineWarehouse;Integrated Security='SSPI'", acTable, "tempAuditFootnote", "tempAuditFootnote"
DoCmd.TransferDatabase acImport, "ODBC Database", "ODBC;DSN=TimberlineWarehouse;LANGUAGE=us_english;DATABASE=TimberlineWarehouse;Integrated Security='SSPI'", acTable, "tempAuditFootnote_Yardi", "tempAuditFootnote_Yardi"

The first TransferDatabase works great (I get a new Access table called 'tempAuditFootnote'. The problem is I keep getting a 3011 (jet can't find the object 'tempAuditFootnoteYardi') on the second. Now when I open up SQL Server, the table 'tempAuditFootnote_Yardi' is right there. I can open it, update it, drop it, etc.. I can't figure out why it can see & transfer one but not the other! Both tables are in the same db, but only one will transfer or be seen by jet!

Any ideas? Please help!!!

Thanks,
Jason

 
Even Better:

It says it can't find the object "tempAuditFootnote_Yardi2", when there's nothing in the code referring to a 'Yardi2'!!!

Please, somebody, help!!
 
You have to make sure you delete any existing objects before you import/transfer any new ones which would be duplicates.

When you import an object and the object name all ready exists, the object is imported but with the name "objectname1". If you import an object again with the same name it is imported with the name "objectname2".

DelCompuSales
 
Hi dBjason,
I have the same problem in MS Access 2002 + SQLBase 7.5.
My code looks similar:

DoCmd.TransferDatabase acImport, "ODBC", _
"ODBC;DSN=sqlXKIP;UID=PIT8;PWD=;" acTable, _
"PIT8BACC", "PIT8B", False

and I become run-time error 3011 (about PIT8B...). Manually import (table-new-import-odbc...) works without problems - I get a new table PIT8B in Access. I have tested this transfer-command with dBase IV, exporting first PIT8B from Access to an external file .DBF. It works. Table PIT8B is a simple table (columns char and dec(8,2)). I don't know, what's wrong. I try compare our problems, but nothing... Do you find an answer?
Grazyna
 
Hi, I know! In my database table PIT8B has a lot of synonyms. When I wrote:
DoCmd.TransferDatabase acImport, "ODBC", _
"ODBC;DSN=sqlXKIP;UID=PIT8;PWD=;" acTable, _
"PIT8.PIT8BACC", "PIT8B", False
the run-time error don't appaears and i get table PIT8B in Access!!!
Maybe the same problem is with your table?
good luck
Grazyna
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top