[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 173
  • Last Modified:

Geting the refreshed version of a file

Hi All.

First, sorry for my bad english.

How I can get the refreshed version of a file ?

I'm running the sqlldr command from oracle client app to insert data into my database.

I have a batch file that has the following code:

sqlldr userid=comuser/eqfpcom08@pcom2.world control=\dbm\ldr\prd.ldr log=\dbm\log\prd.log

then I execute the shell visual basic command:

shell "batchfile.bat > output.txt"

the sqlldr updates the file when ir runs.

With sqlldr running I goto the windows explorer, I open the file and I can see the output.txt contents.

But if in my code i make this:

Open "output.txt" for input access read as #1
line input #1, strString

strstring will be "".

Cand someone help me ?

Thx in advance.
0
fatalk1ll3r
Asked:
fatalk1ll3r
  • 2
1 Solution
 
aelatikCommented:
Try this instead :

Dim strstring As String
    strstring = FileLen("output.txt")
Open "output.txt" For Binary Access Read As #1
    Get #1, 1, strstring
Close #1

note : strstring will contain the entire file !
0
 
aelatikCommented:
Oops, forgot to define SPACE.

Dim strstring As String
    strstring = Space(FileLen("output.txt"))
Open "output.txt" For Binary Access Read As #1
    Get #1, 1, strstring
Close #1
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now