Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Geting the refreshed version of a file

Posted on 2004-10-29
Medium Priority
Last Modified: 2010-05-02
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.
Question by:fatalk1ll3r
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 14

Expert Comment

ID: 12449500
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 !
LVL 14

Accepted Solution

aelatik earned 750 total points
ID: 12449501
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

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

598 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question