Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - using macro to export data from access
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

using macro to export data from access

 Post Reply Post Reply
Author
simflex View Drop Down
Groupie
Groupie
Avatar

Joined: 10 November 2002
Location: United States
Status: Offline
Points: 63
Post Options Post Options   Thanks (0) Thanks(0)   Quote simflex Quote  Post ReplyReply Direct Link To This Post Topic: using macro to export data from access
    Posted: 24 September 2003 at 6:23am

Hello friends and helpers,
I have a tasking task.
I need to automate the task of migrating data from access 2002 database to sql server db.
I can do this and have done this several times before using sql server's DTS.
However, what is different about this is that the access db that needs to be migrated sits on a user's desk top.
All information I gathered so far points to using access macro to automate the task of exporting this user's data to a text file in a central location and then finally migrating this data to sql server.
Can someone please help me with the steps of using an access macro to automate the exporting of data to a text file.
Once this part is successfully completed, I can take it from there as far as using dts to migrate it to sql server.
The access help menu for using macro to automate this task has not been that helpful.

If there is any links or articles on how to accomplish this, please let me know
Thanks in advance

Back to Top
Flamewave View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 June 2002
Location: United States
Status: Offline
Points: 376
Post Options Post Options   Thanks (0) Thanks(0)   Quote Flamewave Quote  Post ReplyReply Direct Link To This Post Posted: 24 September 2003 at 9:00am
You can import the data from the access database to the sql database, but this wont copy over any of the keys or indexes, so you will have to set those back up manualy on the sql server.
- Flamewave

They say the grass is greener on the other side, but if you really think about it, the grass is greener on both sides.
Back to Top
simflex View Drop Down
Groupie
Groupie
Avatar

Joined: 10 November 2002
Location: United States
Status: Offline
Points: 63
Post Options Post Options   Thanks (0) Thanks(0)   Quote simflex Quote  Post ReplyReply Direct Link To This Post Posted: 24 September 2003 at 1:44pm

I agree with your comments but I normally use the upsizing wizard which preserves everything from access rules, contraints to pk and auto numbering.

This case is slightly different in the sense that the client's access db is sitting on his desk top.

So trying to export data using DTS to his access db won't work.

What we are trying to do is use access macro to export data to a text file outside of his desktop and then export data from there to our sql server that is sitting on a remote site.

My problem is understanding the steps in using a macro.

So far, having followed the example from the access help menu is causing an error that says I "cannot update the database because it is a readonly db"

I don't understand this error because:

1, I am not updating the access db and

2, I can write to it.

Any additional help would be greatly appreciated.

Back to Top
Flamewave View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 June 2002
Location: United States
Status: Offline
Points: 376
Post Options Post Options   Thanks (0) Thanks(0)   Quote Flamewave Quote  Post ReplyReply Direct Link To This Post Posted: 25 September 2003 at 3:51pm
Ahh, I was under the impression that this was just a one-time deal, not something that you wanted to automate. I'm not very familiar with macros myself, so I'm afraid I can't help you. I'm sure you can do a google search and find something though.
- Flamewave

They say the grass is greener on the other side, but if you really think about it, the grass is greener on both sides.
Back to Top
eksimba View Drop Down
Groupie
Groupie


Joined: 23 April 2003
Location: United States
Status: Offline
Points: 48
Post Options Post Options   Thanks (0) Thanks(0)   Quote eksimba Quote  Post ReplyReply Direct Link To This Post Posted: 25 September 2003 at 3:57pm
Would it be easier to just copy the entire .mdb file to the location off of the user's desktop? That way you have access to the entire database, and not just the text-file extract of it...
- eric
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.