question on saving file as text

  • Thread starter Thread starter lora
  • Start date Start date
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!
 
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?)
 
(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...
 
Back
Top