473,383 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Check for Flat File

ED
I currently have 2 oracle databases that my access database is going
to gather data from. The IT department wants to give me data snaps in
the form of a flat file. They will FTP the flat file to the location
that I need and I am wondering how I would be able to check to make
sure that the flat file is in the correct location before I
automatically append it to an access table. Basically, I am
attempting to have some automatic validation so that the user of the
system will recieve a message to contact IT if the file is not there.
Any ideas on the process.

Thanks
Nov 13 '05 #1
4 1536
da******@hotmail.com (ED) wrote in
news:ad**************************@posting.google.c om:
I currently have 2 oracle databases that my access database is
going to gather data from. The IT department wants to give me
data snaps in the form of a flat file. They will FTP the flat
file to the location that I need and I am wondering how I
would be able to check to make sure that the flat file is in
the correct location before I automatically append it to an
access table. Basically, I am attempting to have some
automatic validation so that the user of the system will
recieve a message to contact IT if the file is not there. Any
ideas on the process.

Thanks


bFileIsThere = (dir$("drive:\dir\subdir\filename.ext") <> "")
But that won't tell you if it's a new version or the old one,
unless you delete the file after importing..
Bob Quintal
Nov 13 '05 #2
I am assumming that I need to write that in VBA. Use an if statement to
display a message box if the file is not present and if it is present
appened it to the table. I am struggling to write the code. Any help
in pointing in the right direction would be great.

Thanks


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3
Ernie DAmato wrote:
I am assumming that I need to write that in VBA. Use an if statement to
display a message box if the file is not present and if it is present
appened it to the table. I am struggling to write the code. Any help
in pointing in the right direction would be great.

Thanks

Check my response for loading the file

On Error Goto Err_Handler
If Dir("C:\Test\Test.Txt") > "" Then
Docmd.TransferText ....
'keep an archive in C:\Test\Archive...
'if you have an archive directory and want to
'save them
FileCopy "C:\Test\Test.Txt" "C:\Test\Archive\Test.Txt"
'delete the file once transfered
Kill "C:\Test\Test.Txt"
Endif

Exit_Handler:
Exit Sub

Err_Handler:
msgbox Err.Number & " " & Err.Description,,_
"An error occurred. Import incomplete"
Resume Exit_Handler
End sub

Nov 13 '05 #4
Thanks for all the help

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: raykyoto | last post by:
Hi all, I'm sure this is a popular question that comes up every few months here. Indeed, I've looked at some of the past postings, but I would like to ask things differently. Basically, I'm...
1
by: Tim Fierro | last post by:
Hello, I have had many years using flat file databases (File Express from way back) but am now at a company where a relational database is needed and would carry us into the future. Since I...
22
by: Daniel Billingsley | last post by:
Ok, I wanted to ask this separate from nospam's ridiculous thread in hopes it could get some honest attention. VB6 had a some simple and fast mechanisms for retrieving values from basic text...
4
by: Ben | last post by:
So, at my place of employment, we use a national standard to transmit data between certain applications. This standard consists of a fixed width, flat file 4500-some-odd chars wide that contain...
2
by: Neural | last post by:
Hi, I was wondering if anybody knew of any other ways of efficiently parsing a flat file into SQL Server 2000 using C#. The flat files are tab delimited. And the general file size is around 1 GB...
14
by: vunet.us | last post by:
Hi, I would like to use flat file data storage instead of database. Since I am new to it, I am wondering: What text file extension is a safe one to store my data online and how cost- and...
9
by: FFMG | last post by:
In my site I have a config table, (MySQL), with about 30 entries; the data is loaded on every single page load. This is not the only call to the db, (we do a total of about 8 calls to the db). As...
2
by: murthydb2 | last post by:
Hi My requirement is that i have to write a stored procedure in db2 and that will be executed in a batch file . Any system error or validation error that occurs inside the db2 sp during...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.