question on saving file as text

L

lora

Hello all,

I'm running some database tools on my Windows 2k PC and would like to
automate these tasks.

Currently, I'm using a database tool to generate a sql file. The issue
is that I need to manually open this sql file in WordPad and save as
text before I import it into the target database.

Is there a way to automate the ability to open a generated sql file in
wordpad and save as text?

I would be using a batch file with dos commands.

Thanks for your assistance!
 
P

Piet Linden

Hello all,

I'm running some database tools on my Windows 2k PC and would like to
automate these tasks.

Currently, I'm using a database tool to generate a sql file. The issue
is that I need to manually open this sql file in WordPad and save as
text before I import it into the target database.

Is there a way to automate the ability to open a generated sql file in
wordpad and save as text?

I would be using a batch file with dos commands.

Thanks for your assistance!

You could open a text file in code and stuff the text into it...

Dim MyIndex, FileNumber
For MyIndex = 1 To 5 ' Loop 5 times.
FileNumber = FreeFile ' Get unused file
' number.
Open "TEST" & MyIndex For Output As #FileNumber ' Create file
name.
Write #FileNumber, "This is a sample." ' Output text.
Close #FileNumber ' Close file.
Next MyIndex

(Is it just me, or does the incredibly bad programming style of the
online help make anyone else cringe?)
 
J

John W. Vinson

(Is it just me, or does the incredibly bad programming style of the
online help make anyone else cringe?)

Oh, I almost never cringe.

Groan, snarl, and pound the desk occasionally...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top