|
-
Aug 16th, 2000, 09:58 AM
#1
Thread Starter
Member
Hi !!
Here's the problem...
I've got a project running with a Access97 DB and I'd like to upgrade it regularely from a *.txt file... is it possible ? and do I have to convert the *.txt into Access (*.mdb) first ?
I'm lost... How can I do ?
Thank you
COSIDUS
-
Aug 16th, 2000, 10:44 AM
#2
Lively Member
text file
What kind of text file is it? Does it have commas seperating the fields, is it tab dilemated, or is it some sort of report?
-
Aug 17th, 2000, 05:35 AM
#3
Thread Starter
Member
Thedee23 :
------------
My *.txt have sometimes commas and sometimes tab to delimitate the fields... but does it have importance to update my Access DB ?
Do u know a solution to my problem ?
JHausmann :
-----------
I don't really understand your answer ( i'm french sorry ) because I'm beginner in VB... so, what is DOCMD and where can I use the two transfer function you tell me ?? in access or in VB ? I'm sorry... could you explain me please...
-
Aug 17th, 2000, 08:03 AM
#4
Lively Member
import
You can do 2 things to update your database from a text file. 1) You can use the built in function that access has. Just open your database then click on File,Get External Data, Import. Then when you get to the Import screen you find your text file. Make sure you select Text File in the Files of Type drop down box. The access wizard will guide you the rest of the way.
2) You could also write a little vb program to read the text file and add that to your database.
-
Aug 17th, 2000, 08:32 AM
#5
Thread Starter
Member
Thanks but...
I'd like that operation to be automatic... I mean the user click on a button in the project and the Access DB upgrade is done automatically...
But only a specific table of my Access DB because it have 5 tables in it and i'd like to upgrade only the "Customers" one... how could i do ??
Please...
COSIDUS
-
Aug 17th, 2000, 12:07 PM
#6
Frenzied Member
If you set your program so that it references the version of Access you intend to use (Menu Project/Referemces...), you will be able to use the object viewer to see the commands. To use the command, you could use the following code:
dim objAccess as Access.Application
Set objAccess = New Access.Application
objAccess.DoCmd.Transferspreadsheet (parms)
-
Aug 17th, 2000, 01:44 PM
#7
Fanatic Member
i believe by using the built in functions, access maintains sync with the txt file, if you change it, it updates in access. That's what i think anyway. I would go with the built in functions in access, like thedee23!
GWDASH
[b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]
-
Aug 17th, 2000, 05:14 PM
#8
Frenzied Member
Nope. The functions only load the data when you execute the functions.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|