473,765 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Preventing mulitple imports of a text file

I do a weekly import of data from two text files, using two schema
files. I have automated the import process that gets the data from the
two files using a macro, and everything works great.

Every week the files are manually replaced by two new files of the
same name.

I would like to put a failsafe to prevent the files from being
imported more than once. Is there an easy way to accomplish this?
Perhaps automatically deleting the file after it is imported?

Thanks in advance.

--Bob
Nov 12 '05 #1
2 1444
DFS
"Bob A" <ro************ @olympus.com> wrote in message
news:b0******** *************** ***@posting.goo gle.com...
I do a weekly import of data from two text files, using two schema
files. I have automated the import process that gets the data from the
two files using a macro, and everything works great.

Every week the files are manually replaced by two new files of the
same name.

I would like to put a failsafe to prevent the files from being
imported more than once. Is there an easy way to accomplish this?
Perhaps automatically deleting the file after it is imported?
That would work. Use the Kill command to delete the text file, or FileCopy
to a new name (eg XXXXX_imported. txt), then Kill the original.

Thanks in advance.

--Bob

Nov 12 '05 #2
"Bob A" wrote
I would like to put a failsafe to prevent
the files from being imported more than
once. Is there an easy way to accomplish this?
Perhaps automatically deleting the file after
it is imported?


If you choose this, be sure to manually verify that the import worked and
didn't fail on some records before you delete the file.

I think, if I were doing this, I'd probably just move the file to a
different folder and append the date to its name (so it wouldn't conflict
with the other history files I was keeping there). See CopyFile, FileCopy,
MoveFile, Kill, and Rename statements in Access VBA Help if you want to
automate in VBA. I use macros so little that I don't attempt to discuss
macro techniques unless they are "patently obvious" to me.

Larry Linson
Microsoft Access MVP
Nov 12 '05 #3

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

Similar topics

4
5037
by: Diane Selby | last post by:
Hi- I am developing an ASP.NET application that can take a few seconds to process the request from the user. We are looking for a client-side solution that will prevent users from resubmitting the page multiple time in their irrational impatience. There are a few posts on this group which suggest that we use JavaScript hooked up to the page's OnSubmit event to catch mulitple submissions. See postings by Craig Deelsnyder et alia.
3
1666
by: | last post by:
I'm picking up an 'IMPORTS' error for a simple database insert based on two input entry boxes in my form? It says an 'Imports' statement must preceede any declarations....... is this perahps the '@' symbol?? Any help appreciated! Thanks Jason
5
1667
by: moondaddy | last post by:
I'm writing an winforms app in vb.net 1.1 and am having trouble referencing a strongly typed dataset in the UI project. The dataset's source is behind a web service and the data project (client side) gets a reference to the dataset schema and all that comes with strongly typing a dataset via a reference to the web service. The business tier which depends on the data tier and also imports the namespace of the data project can reference...
14
1776
by: Dave Rahardja | last post by:
Hi all, Is it possible to prevent _at compile or link time_ the mulitple instantiation of a templated function? In other words, if there exists a function template <typename Tvoid fn(); I want to prevent the user from doing this: int main()
0
1658
by: Silly Milly | last post by:
Calling ALL SSIS GURUS I am trying to import identical MDBs (Access Database) columns into SQL Server 2005 using foreach loop in SSIS. The data and file name of the MDBs are not the same; however the structure (column) is. I do need to capture part of the file name and insert it into the destination column (i.e. Year). I've used the foreach loop with the flat file connection manager, and was able to capture any part of a text file name and...
1
3876
by: budyerr | last post by:
All, I am trying to build a email submission form using asp.net. I currently have a web form page that will upload to my webhosting server, attach to email then delete the file after sending. This works great with one attachment. I am requiring that a file be attach before submitting. Now I am trying to add the ability to add multiple attachments and I am able to create this however, it will error out if all of the attachment is not...
0
1399
by: Kay Schluehr | last post by:
Since their introduction in Python 2.5 I only reviewed the new "relative import" notation briefly by reading the "What's new in Python 2.5" article. Now I wanted checkout if I get comfortable with them. Opening the tutorial I found following notice ( 6.4.2 ): "Note that both explicit and implicit relative imports are based on the name of the current module. Since the name of the main module is always "__main__", modules
3
1827
by: Mohamed Yousef | last post by:
Hello , The problem I'm asking about is how can imported modules be aware of other imported modules so they don't have to re-import them (avoiding importing problems and Consicing code and imports ) Take Example :- in A.py :- import B print dir() # no problems we can see B which contain re module and C module
1
1364
by: TheNewBoy | last post by:
Hi All. I am new to this forum... Don't know how to start but here it goes.... I am writing in VB.net a program with one form, yet mulitple textboxes. the data appears in each text box as A1, A2, A3, A4, A5 The database CANDYSHOP has a table CANDYSHOP with each column as
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9951
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7378
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5275
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2805
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.