473,795 Members | 2,968 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 14619
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
1941
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
12490
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
1369
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
4594
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
1839
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
3324
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
2588
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
49619
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
10439
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10215
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...
0
9043
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...
1
7541
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6783
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();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
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.