473,390 Members | 1,353 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,390 software developers and data experts.

File Import Wizard

Hi All. I'm looking for any help or sample code that can show me how to make a file import wizard in ASP.NET (VB preferred) like the one that MS Access uses. I'm working on a web site where the user has the ability to upload a file (.txt or .csv). The data in the file may be comma delaminated, tab delaminated, fixed width etc (we don't know).

What I'd like to create is something like MS Access uses to import an Excel file into the database. Access has a wizard that walks the user through steps such as - is the first row the header, ignore the first "x" number of rows, is it comma, tab, semi colon etc delaminated, allows you to adjust what data goes in what field etc And then does the import into the database. I need to recreate something exactly like this but web-based. I'd also like the user to be able to store their preferences so that the next time they go to upload the same type of file the can just choose a pre-made preference that knows what to do. The file would then get imported into a database (Access or SQL Server).

Any suggestions on where to start or code samples to look at?

Thanks
Nov 21 '05 #1
1 3992
David:

I don't know your exact familiarity with all the aspects of the import
systems for Access and SQL Server so if you are already familiar with this
information, please understand this.

I built a custom import systems for text and Excel files for both Access and
SQL Server, although not web based. However, the principles should be
similar.

Regarding Access, the TransferText and TransferSpreadsheet methods mimic the
functionality of the wizards you mentioned. Access uses the MSysIMEXSpecs
and MSysIMEXColumns system tables to store import (and export)
specifications used by the TransferText method. When you create and save an
import specification using the wizard, these are the tables that hold the
data. I recreated the wizard form and then customized it to my needs. This
should be straightforward for the web, except for maybe the subform.

For SQL Server, I built a custom DTS package and then executed it. I used a
couple of tables similar to the Access system tables previously mentioned to
hold the import specification information. You can create a sample DTS
package for a text file and then save it as VB code to see how such packages
are created. Obviously, DTS gives you much more flexibility in terms of
transforming data during the import process.

I hope this helps.

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.
"David Berry" <db****@mvps.org> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi All. I'm looking for any help or sample code that can show me how to
make a file import wizard in ASP.NET (VB preferred) like the one that MS
Access uses. I'm working on a web site where the user has the ability to
upload a file (.txt or .csv). The data in the file may be comma
delaminated, tab delaminated, fixed width etc (we don't know).

What I'd like to create is something like MS Access uses to import an Excel
file into the database. Access has a wizard that walks the user through
steps such as - is the first row the header, ignore the first "x" number of
rows, is it comma, tab, semi colon etc delaminated, allows you to adjust
what data goes in what field etc And then does the import into the database.
I need to recreate something exactly like this but web-based. I'd also like
the user to be able to store their preferences so that the next time they go
to upload the same type of file the can just choose a pre-made preference
that knows what to do. The file would then get imported into a database
(Access or SQL Server).

Any suggestions on where to start or code samples to look at?

Thanks
Nov 21 '05 #2

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

Similar topics

2
by: David Berry | last post by:
Hi All. I'm looking for any help or sample code that can show me how to make a file import wizard in ASP.NET (VB preferred) like the one that MS Access uses. I'm working on a web site where the...
1
by: Joshua Ammann | last post by:
Hello, I'm trying to export a query containing contact information, including a field. Some zip codes have one or two leading zeros, for example, San Juan, PR (00927) and Springfield, MA...
11
by: Grim Reaper | last post by:
I am importing a .csv file into Access that has 37 fields. My problem is that sometimes the last field only has data at the end of the column (it looks like when you import a file into Access, for...
1
by: sparks | last post by:
I have never done this and wanted to ask people who have what is the best way. One person said import it to excel, then import it into access table. but since this will be done a lot, I am...
2
by: kuhni | last post by:
Hi everybody, I am totally desperate because I cannot solve a really simple problem: I have a specific text-file which I want to import into an existing database. The problem is that the columns...
3
by: mollyf | last post by:
Hello all-- I'm working on a legacy Access 2000 application which imports a space delimited text file. There's a line of code: DoCmd.TransferText acImportFixed, "ClaimSpecsEDS",...
4
by: Sam K. | last post by:
I have a database file in MS Works that has a .wdb extension. I would like to convert it to use in Access or Excel or Word. Is that possible, and, if so, how do I do it? Thanks in advance. ...
0
by: Philip Kline | last post by:
I am brand spanking new to SQL and just learning all of it's intricacies and pecularities via the OJT route. I'm tring to import a comma delimited file into a table so I can play inquiries with...
8
by: shenkel55 | last post by:
I'm using Access and Excel 2003. Using either the import wizard or code, I have the same problem. This problem only happens with Excel files automatically generated by Corp IT. If I try to do an...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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,...
0
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...
0
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,...

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.