473,804 Members | 4,217 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DoCmd.TransferD atabase

I am trying to Import a simple dbase file into my Ak2 TABLES.
If I do this manually, it works fine. I get a new table called DBASE with
all the data looking good.
If I try and do this using VBA code (see below) I get a path is not valid
for "C:\Databases\d base.dbf". I know it's valid and have tried putting it on
the C root and still same error message. I am running Wk2 on single
wstation. Any help on this will be much appreciated
D.
----------------------------
DoCmd.TransferD atabase acImport, "dBase III", _
"C:\Databases\d base.dbf", acTable, "dbasefile" , _
"TempFile"
---------------------------

Nov 13 '05 #1
2 14620
AccessStarters wrote:
I am trying to Import a simple dbase file into my Ak2 TABLES.
If I do this manually, it works fine. I get a new table called DBASE with
all the data looking good.
If I try and do this using VBA code (see below) I get a path is not valid
for "C:\Databases\d base.dbf". I know it's valid and have tried putting it on
the C root and still same error message. I am running Wk2 on single
wstation. Any help on this will be much appreciated
D.
----------------------------
DoCmd.TransferD atabase acImport, "dBase III", _
"C:\Databases\d base.dbf", acTable, "dbasefile" , _
"TempFile"
---------------------------


Here is an example that may work for you.

DoCmd.TransferD atabase acImport, "dBase III", "C:\Databas es", acTable, _
"dbase.dbf" , "TempFile"

Nov 13 '05 #2
thanks very much.
Definately helps. I was expecting it to overwrite the destination file
but keeps adding a new with number on the end. I think all I need to do
now is write code to delete the destination file first - so it imports
with exactly the same name.
The help files were a bit missleading (pasted below)
-----
databasename: A string expression that's the full name, including the
path, of the database you want to use to import, export, or link data.
-------

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1664
by: KJones | last post by:
Here is the setup There are three Machines all running Access97 & XP Pro \\readingtill1 \\redingback \\redingtill2 on a LAN And four dbs
2
1942
by: Pachydermitis | last post by:
Hi all, I am trying to use transferdatabase to link tables to a shared backend. If someone is already using the back end, transferdatabase tries to lock the table and causes an error. Is there another way to control locking on transferdatabase since no data is in question? Is there any other way to link tables other than ADOX? Thanks Pachydermitis
1
12491
by: Jens Hofmeier | last post by:
Hello, i want to transfer a table from database sourceMDB to a password protected database named destMDB. I was not able to figure out where to specify the required password ind the parameters of TransferDatabase. Can anyone help? Thanks, Jens
0
1371
by: astro | last post by:
I'm trying to copy some ODBC linked tables from one access2k mdb to another. This is an example of the code i'm using: DoCmd.TransferDatabase acExport, "Microsoft Access", (strPath & strTemp), acTable, "woCost", "woCost", False, True I do not have to provide login information when I open the link in my 'home' mdb file (I've used the 'save password' check when I originally setup the link).
1
4595
by: amitkumar19 | last post by:
hello dear when i use this statements in vb6 for transfer data to one another DoCmd.TransferDatabase acImport, "dBase III", "C:\Data", acTable, _ "Test112A.dbf", "TempFile" then give a error msg " this operation required open data base. whats the reason can i open databse connection or not i used refrence like
1
1840
by: amitkumar19 | last post by:
hello dear when i use this statements in vb6 for transfer data to one another DoCmd.TransferDatabase acImport, "dBase III", "C:\Data", acTable, _ "Test112A.dbf", "TempFile" then give a error msg " this operation required open data base. whats the reason can i open databse connection or not i used refrence like
0
3326
by: Cuaracao | last post by:
This is my code: Code1: 'DoCmd.OpenTable "tblImport" 'DoCmd.TransferDatabase acExport, "dBASE IV", strOutputDir,acTable,"sel_TblImport", strDbfName & ".dbf", False ' DoCmd.Close acTable, "tblImport" ======================================================== Code2:
3
2591
by: chris.spano | last post by:
I'm running Access 2003 on an XP machine, and there are multiple developers who are working on different "assignments" of our large database project. We all work on a local copy and export changes made to various objects. Version controlling is becoming more of an issue, so we've developed a real basic version control system that tracks "exports" to the primary DB (which is then version-controlled prior to distribution to the client--which...
10
49621
by: Dean | last post by:
My client has a db I am working that uses temp tables. During an update procedure, I had the code If fTableExists(tempTblName) = True Then DoCmd.DeleteObject acTable, tempTblName Then I thought of using: If fTableExists(tempTblName) = True Then CurrentDb.Execute "DROP TABLE " & tempTblName Is there an advantage to either? What really be cool is DROP TABLE deleted the table and I didn't have to compact the db so much.
0
9707
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9585
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10082
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9161
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6856
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.