Results 1 to 8 of 8

Thread: Updating an ACCESS 97 DataBase...

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2000
    Location
    LAVAL ( FRANCE )
    Posts
    32

    Question

    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

  2. #2
    Lively Member
    Join Date
    Aug 2000
    Posts
    114

    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?

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2000
    Location
    LAVAL ( FRANCE )
    Posts
    32

    Unhappy

    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...




  4. #4
    Lively Member
    Join Date
    Aug 2000
    Posts
    114

    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.

  5. #5

    Thread Starter
    Member
    Join Date
    Jul 2000
    Location
    LAVAL ( FRANCE )
    Posts
    32

    Unhappy 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

  6. #6
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    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)

  7. #7
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    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]

  8. #8
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    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
  •  



Click Here to Expand Forum to Full Width