473,387 Members | 1,495 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Export All MS Access Queries into External Text Files

Does anyone know of a utility or a method (VBA or otherwise)
to be able to export ALL 100+ MS Access Queries from an Access
Table into individual text files perhaps ending with .sql so they can
be parsed and converted by my program into SQL Server sProcs?
I need a Mass Exporter not a one at a time manual equivalent.

Please reply directly to: jf*********@gmail.com

Thanks.

Jun 4 '06 #1
6 9476
jf*********@gmail.com wrote:
Does anyone know of a utility or a method (VBA or otherwise)
to be able to export ALL 100+ MS Access Queries from an Access
Table into individual text files perhaps ending with .sql so they can
be parsed and converted by my program into SQL Server sProcs?
I need a Mass Exporter not a one at a time manual equivalent.
Public Sub QueryList1()
Dim qdf As QueryDef
Dim strFileName As String
For Each qdf In CurrentDb.QueryDefs
If Left(qdf.name, 1) <> "~" Then
'you need to figure out TransferText command. Maybe
'you won't be lazy and expect people to read it to
'you and tutor you on how it works.
strFileName = qdf.Name & ".SQL"
Docmd.TransferText ....
End If
Next qdf
MsgBox "Done"
End Sub

Please reply directly to: jf*********@gmail.com
Why? You to lazy to retrieve responses? I guess you think we're all
your servants. Sorry King, you're the guy that needs and requested our
help, we don't need yours.

Thanks.

Jun 4 '06 #2

salad wrote:
jf*********@gmail.com wrote:
Does anyone know of a utility or a method (VBA or otherwise)
to be able to export ALL 100+ MS Access Queries from an Access
Table into individual text files perhaps ending with .sql so they can
be parsed and converted by my program into SQL Server sProcs?
I need a Mass Exporter not a one at a time manual equivalent.


Public Sub QueryList1()
Dim qdf As QueryDef
Dim strFileName As String
For Each qdf In CurrentDb.QueryDefs
If Left(qdf.name, 1) <> "~" Then
'you need to figure out TransferText command. Maybe
'you won't be lazy and expect people to read it to
'you and tutor you on how it works.
strFileName = qdf.Name & ".SQL"
Docmd.TransferText ....
End If
Next qdf
MsgBox "Done"
End Sub

Please reply directly to: jf*********@gmail.com


Why? You to lazy to retrieve responses? I guess you think we're all
your servants. Sorry King, you're the guy that needs and requested our
help, we don't need yours.

Thanks.
Oh thank you thank you, my liege.
I have posted for years on various SQL tips and techniques
I have just never had the privilege of laboring in the Access 97
and Access 2000 world thank god. And now we are putting to
rest over 50 Access apps by converting them to SQL Server
en masse and putting another Access dude out of business.
It should have been done in SQL Server in the first place.


Jun 5 '06 #3
Hi.
thank god.
That's " . . . thank God." Otherwise, you're addressing Salad as a god.
Perhaps the "Access god"? ;-)
I have posted for years on various SQL tips and techniques
Good thing you finally stopped by an Access newsgroup then. Your SQL
buddies failed to warn you that much of the spam in your Inbox has been due
to the fact that you've been posting your E-mail address in the newsgroups,
where spambots harvest E-mail addresses daily.
And now we are putting to
rest over 50 Access apps by converting them to SQL Server
en masse and putting another Access dude out of business.
And you can thank a bunch of Access dudes for providing you and your cohorts
with this (probably) paid job opportunity, as well as an opportunity to
learn a new skill or to improve one -- data migration from Jet. And
remember that those Access database applications were probably built by
people having various skill levels, so those schemas, constraints, indexes,
triggers, query optimizations, and record lock avoidance techniques need to
be looked at carefully, especially for data insertion and deletion anomolies
and ensured data integrity.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/ex...ributors2.html for contact
info.
<re*****@gmail.com> wrote in message
news:11*********************@i40g2000cwc.googlegro ups.com...
salad wrote:
re*****@gmail.com wrote:
> Does anyone know of a utility or a method (VBA or otherwise)
> to be able to export ALL 100+ MS Access Queries from an Access
> Table into individual text files perhaps ending with .sql so they can
> be parsed and converted by my program into SQL Server sProcs?
> I need a Mass Exporter not a one at a time manual equivalent.


Public Sub QueryList1()
Dim qdf As QueryDef
Dim strFileName As String
For Each qdf In CurrentDb.QueryDefs
If Left(qdf.name, 1) <> "~" Then
'you need to figure out TransferText command. Maybe
'you won't be lazy and expect people to read it to
'you and tutor you on how it works.
strFileName = qdf.Name & ".SQL"
Docmd.TransferText ....
End If
Next qdf
MsgBox "Done"
End Sub
>
> Please reply directly to: re*****@gmail.com


Why? You to lazy to retrieve responses? I guess you think we're all
your servants. Sorry King, you're the guy that needs and requested our
help, we don't need yours.
>
> Thanks.
Oh thank you thank you, my liege.
I have posted for years on various SQL tips and techniques
I have just never had the privilege of laboring in the Access 97
and Access 2000 world thank god. And now we are putting to
rest over 50 Access apps by converting them to SQL Server
en masse and putting another Access dude out of business.
It should have been done in SQL Server in the first place.
>

Jun 5 '06 #4
'69 Camaro wrote:
remember that those Access database applications were probably built by
people having various skill levels, so those schemas, constraints, indexes,
triggers, query optimizations, and record lock avoidance techniques need to
be looked at carefully, especially for data insertion and deletion anomolies
and ensured data integrity.


My first legacy rule: Start Over.

Jun 5 '06 #5
Hi, Lyle.
My first legacy rule: Start Over.
A very wise rule.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/ex...ributors2.html for contact
info.
"Lyle Fairfield" <ly***********@aim.com> wrote in message
news:11**********************@h76g2000cwa.googlegr oups.com... '69 Camaro wrote:
remember that those Access database applications were probably built by
people having various skill levels, so those schemas, constraints,
indexes,
triggers, query optimizations, and record lock avoidance techniques need
to
be looked at carefully, especially for data insertion and deletion
anomolies
and ensured data integrity.


My first legacy rule: Start Over.

Jun 5 '06 #6
jf*********@gmail.com wrote in
news:11*********************@i40g2000cwc.googlegro ups.com:
And now we are putting to
rest over 50 Access apps by converting them to SQL Server
en masse and putting another Access dude out of business.
It should have been done in SQL Server in the first place.


Well, that's obviously a lie, since you can't replace the
application with SQL Server, only the data store.

Idiot.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jun 5 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: ls | last post by:
Hi All, I looking for help with ZODB data export to text file. I have file Data.fs (file becomes from Plone CMS) and I have to display content structure, data like intro, body of article, etc...
3
by: Jorge Cecílio | last post by:
Hi! I would like to export some MS-Access reports output to pdf. However, the only possibility offered by Access (afaik) for me to export formatted output is snp (snapshot) (I use MS-Office...
1
by: smaczylo | last post by:
Hello, I've recently been asked to work with Microsoft Access, and while I feel quite comfortable with Excel, I'm at a complete loss with databases. If someone could help me with this issue I'm...
5
by: bhodgins | last post by:
Hi, I am new on here, and had a newbie question that I am stumped with. I am not new to access, but am new to VB. I am trying to export BLOBs from a field called photo to external jpeg files. I...
1
by: sisieko | last post by:
I have an access adp (MS Access 2003) connecting to a SQL 200 server. From the adp a user generates reports and using the built-in access export wizard can export said reports (which are either...
3
by: jmarcrum | last post by:
I want to export a report (that contains two separate queries, 1. Current year data, and 2. split-year data) from access into excel, but everytime I run my code and export the data to excel, it looks...
17
by: chadh | last post by:
Hello, I'm having some troubles exporting a query to a csv file. I am able to use the doCMD.TransferText to output the query to the csv file, however, I cannot get it to use the Export...
3
by: rebel4ever | last post by:
Ok so here's the problem. I have Table A with some fields, dont matter what fields and Table B with an ID field and a Code field. What i want to do is to use VBA to automaticaly export the XML code...
8
by: iheartvba | last post by:
Hi I am using Access 2007 and am trying to export a query to a fixed length text file. I tried using the following code to export the text file: DoCmd.TransferText acExportFixed, , "qryFFRDeFile",...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...

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.