Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DAT File Handling in VB

Status
Not open for further replies.

PrgrmsAll

Programmer
Apr 8, 2003
180
US
PROBLEM:
I currently have a very large .dat file that I ultimately need to get into a SQL Server database table and would like to develop a VB application to handle this.

TECHNICAL ENVIRONMENT:
Visual Basic 6.0 & SQL Server 2000

QUESTION:
Does anyone have advice as to the best way to solve this problem? I was fully expecting that I would need to somehow decrypt it into a text file and then import it into the SQL Server database table from that flat-file.

If there is a better way, or if someone has any general pointers/advice on .dat file decryption, I would greatly appreciate it.

Thank you in advance.
 
I have never heard of a standard .dat file format. I think .dat files can come from many sources and be in may formats (at least from what I've seen). Do you know what the source of the .dat file is? You may want to start there and see if there is any help from the creator of the .dat.
 
The source is the NTIS (National Technical Information Service). It comes monthly with an executable to extract to a text file. However, I need to automate the process.
 
Does the executable that you get accept parameters so you can automate it? How complex is the process of running the executable? If running it using Shell is not an option, I would think your only other option is to find out the format of the .dat file from NTIS and then write your program to read that file.

If you have documentation on the exe that you get, start reading up and see what your options are.
 
yes, i considered (and tried) passing parameters but there is no documentation worth talking about (at least not technical documentation). so i was shooting in the dark. i will try to find out more about the DAT file but since it is government(!) i doubt i will enlightened! thanks again for your posts.
 
How complex is the extraction process? If it's not super complex you could use shell and SendKeys to automate it. I would only do this if is simple... SendKeys can be a bit difficult to work with timing and everything.
 
Also have a look at


Has approx 50 different .dat file definitions.

Are there any other support files loaded in the directory where the .dat is loaded? These may help someone here track down the format of the .dat file ...
 
< It comes monthly with an executable to extract to a text file. However, I need to automate the process.>

Any reason you don't just shell to the supplied executable, then process the resultant text file?


________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
i don't want to shell to the exectuable since it needs to be non-interactive, if possible. i want my executable to grab the dat file, decrypt it and import it to a SQL Server database table. unfortunately, there are no support or descriptive files that ship with the executable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top