Well I kinda figured it out on my own...
I used Pass thru Query and then Dump data from that query into Access table.
If anyone has a better idea ... i am open for any suggestions.
Thanks,
Pawel
Main Topics
Browse All TopicsHi,
I was wondering what is the fastest way to dump data from Sql database into Access using VB.
I would need to dump just a part of a Sql table (certain fields) into an Access table.
It will be done over the network
thanks
Pawel
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I'm going to assume that because you said Access and SQL that you are referring to MS-SQL. I'm also queueing off your reference to VB.
Unless you have a burning need to write code the easiest way is to create a DTS job.
If the data exists the way you want it, then you can just do a Tools/Data Transformation Services/Import or Export.
However, if you need to clean the data up first then write your stored procedure first to do that.
Then go ahead and create your DTS job. This will let SQL Enterprise Manager do the dirty work of making the DTS package, naming it, and getting it in SQL. Pay particular attention to your source and destination table names as these are difficult to change later. Also pay close attention to the export process itself. It's easiest if that is all correct.
After you create it, find the DTS job in Enterprise Manager and right click. choose Properties and it will bring up the DTS package editor. The most useful tool for me is the "sql task" object. You can basically build a high level process in no time flat and create conditional workflow between the objects. This allows you to pre or post process the data in SQL. You can also write VB code and run snippets of code in your DTS package.
Okay, so once you have a DTS package you'll want to automate this. You can automate it from the command line with a batch file. First make a batch file and put it in the Windows scheduler. Windows scheduler lives under programs/accessories if I remember correctly. Create a dos command and then go in and edit the schedule to make it behave the way you want. Advanced schedule features are particulary useful.
You must have Enterprise manager installed on the machine you run the job from. The command is called DTSrun.exe and you can get the switches from it via dtsrun /?
Best of luck and let me know if you need any more help
Business Accounts
Answer for Membership
by: virmaiorPosted on 2004-12-09 at 12:52:52ID: 12787276
SQL database is kind of ambiguous...
but the best way in VB is probably using ADO or DAO recordsets..