export data from local txt file to .mdb file on server 
Author Message
 export data from local txt file to .mdb file on server

I have created an .mdb file on our server and created a DSN and have
made a connection to the database.  What needs to happen is a user
needs to use the browse button to find their txt file and then I need
to take the information from the txt file (it is in columns that match
the database) and import it into the access database for use by other
webpages.  I have a created an asp page that allows a user to browse
and find a txt file (Input Type = File name=textfile). The user will
click a submit button and the information from the txt file will be
exported to the .mdb file.  Is it possible to get the information from
a local txt file into a .mdb file on the server?  If so, how?!?
Any help would be great.

Catherine



Tue, 11 Nov 2003 03:43:13 GMT  
 export data from local txt file to .mdb file on server
You're wanting to do three things here, the first of which it sounds like
you've got:

1. find client side text file
2. upload client text file to server
3. process file on server to add to database

There are a number of ways to do part two, I recommend a file uploading
control you can install on the server, usually costs money (someone probably
knows of a good free one though) but it's simpler than doing it without. I
like SA-FileUp ( http://www.*-*-*.com/ ) some
other people use AspUpload from Persits Software, Inc
( http://www.*-*-*.com/ ).  Your mileage may vary.

It is possible to upload a file with straight asp, without any com object,
but I've never done it. I suppose it works or the article wouldn't still be
there. where? here:   http://www.*-*-*.com/

The next step is parsing your file into records in the database. There might
be a way to access accesses import functionality, but that would require
access to actually be installed on the server (which I personally do not
condone, there's no reason for it to be there) and it's probably a lot of
work. If we broke down step three (process file on server to add to
database) into two more steps, it might be easier:

3a. open and read file
3b. open and write rows in database

If you can open a file and read it in asp, you've got 3a done. If not, read
all about the file system object at http://www.*-*-*.com/ ;.

I see you can open a database in asp, but can you write records to the
tables in it? If not, you've got more learning to do... you could start at
http://www.*-*-*.com/ :) Hope this
helps!

By the way, if this is going to support more than a handful of users, you
should probably s{*filter*}the whole approach I just laid out, and move to an
n-tier design. Single-tier stuff like this doesn't go very far, but then
again, neither does using MS Access as a back end! :)

(I did a thing similar to this just a few months ago as a prototype, then
scrapped all the code and re-did the entire thing in ISAPI and many com
objects with SQL 2000 for the data store. It supports about 500 simultaneous
users now.)


Quote:
> I have created an .mdb file on our server and created a DSN and have
> made a connection to the database.  What needs to happen is a user
> needs to use the browse button to find their txt file and then I need
> to take the information from the txt file (it is in columns that match
> the database) and import it into the access database for use by other
> webpages.  I have a created an asp page that allows a user to browse
> and find a txt file (Input Type = File name=textfile). The user will
> click a submit button and the information from the txt file will be
> exported to the .mdb file.  Is it possible to get the information from
> a local txt file into a .mdb file on the server?  If so, how?!?
> Any help would be great.

> Catherine



Fri, 14 Nov 2003 13:29:07 GMT  
 export data from local txt file to .mdb file on server
Almost forgot- check out the not-well-known-about split() function if you're
parsing a comma-delimited file. It's very helpful in times like these... ;)

http://msdn.microsoft.com/scripting/default.htm?/scripting/VBScript/d...
tSplit.htm

Jeremy


Quote:
> I have created an .mdb file on our server and created a DSN and have
> made a connection to the database.  What needs to happen is a user
> needs to use the browse button to find their txt file and then I need
> to take the information from the txt file (it is in columns that match
> the database) and import it into the access database for use by other
> webpages.  I have a created an asp page that allows a user to browse
> and find a txt file (Input Type = File name=textfile). The user will
> click a submit button and the information from the txt file will be
> exported to the .mdb file.  Is it possible to get the information from
> a local txt file into a .mdb file on the server?  If so, how?!?
> Any help would be great.

> Catherine



Fri, 14 Nov 2003 13:33:35 GMT  
 export data from local txt file to .mdb file on server
Catherine-
How do you go about implementing the browse button? I need to do the same
thing and it looks like I'll be using SA-FileUp for the actual upload since
that's what is provided by the webhost.

Stefan
www.horseshowtime.com


Quote:
> I have created an .mdb file on our server and created a DSN and have
> made a connection to the database.  What needs to happen is a user
> needs to use the browse button to find their txt file and then I need
> to take the information from the txt file (it is in columns that match
> the database) and import it into the access database for use by other
> webpages.  I have a created an asp page that allows a user to browse
> and find a txt file (Input Type = File name=textfile). The user will
> click a submit button and the information from the txt file will be
> exported to the .mdb file.  Is it possible to get the information from
> a local txt file into a .mdb file on the server?  If so, how?!?
> Any help would be great.

> Catherine



Fri, 14 Nov 2003 13:37:43 GMT  
 export data from local txt file to .mdb file on server
Stefan-

I think you'll like the ease of use that SA-FileUp provides. And if the ISP
has already paid for it, all the better!

You'll find a good example I think here:

http://www.learnasp.com/sa/uploadsimple.asp

-Jeremy


Quote:
> Catherine-
> How do you go about implementing the browse button? I need to do the same
> thing and it looks like I'll be using SA-FileUp for the actual upload
since
> that's what is provided by the webhost.

> Stefan
> www.horseshowtime.com



> > I have created an .mdb file on our server and created a DSN and have
> > made a connection to the database.  What needs to happen is a user
> > needs to use the browse button to find their txt file and then I need
> > to take the information from the txt file (it is in columns that match
> > the database) and import it into the access database for use by other
> > webpages.  I have a created an asp page that allows a user to browse
> > and find a txt file (Input Type = File name=textfile). The user will
> > click a submit button and the information from the txt file will be
> > exported to the .mdb file.  Is it possible to get the information from
> > a local txt file into a .mdb file on the server?  If so, how?!?
> > Any help would be great.

> > Catherine



Fri, 14 Nov 2003 15:32:46 GMT  
 export data from local txt file to .mdb file on server
Stefan-

I think you'll like the ease of use that SA-FileUp provides. And if the ISP
has already paid for it, all the better!

You'll find a good example I think here:

http://www.learnasp.com/sa/uploadsimple.asp

-Jeremy


Quote:
> Catherine-
> How do you go about implementing the browse button? I need to do the same
> thing and it looks like I'll be using SA-FileUp for the actual upload
since
> that's what is provided by the webhost.

> Stefan
> www.horseshowtime.com



> > I have created an .mdb file on our server and created a DSN and have
> > made a connection to the database.  What needs to happen is a user
> > needs to use the browse button to find their txt file and then I need
> > to take the information from the txt file (it is in columns that match
> > the database) and import it into the access database for use by other
> > webpages.  I have a created an asp page that allows a user to browse
> > and find a txt file (Input Type = File name=textfile). The user will
> > click a submit button and the information from the txt file will be
> > exported to the .mdb file.  Is it possible to get the information from
> > a local txt file into a .mdb file on the server?  If so, how?!?
> > Any help would be great.

> > Catherine



Fri, 14 Nov 2003 15:35:29 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Exporting Data to *.txt file

2. Copy data from MDB on LAN to MDB on web server

3. Export MDB file into text file

4. Adding .TXT files to a VB program without the .TXT file

5. Accessing .MDB file from remote file server thru slow LAN

6. Split layout and data in export data to file

7. Export data from mdb to a new mdb with ADO

8. Users can't find local mde/mdb file

9. Import large txt file to mdb?

10. Exporting a txt file

11. Help with export to .txt-file

12. Export a view to a txt o excel File

 

 
Powered by phpBB® Forum Software