472,364 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,364 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
Oct 2 '05 #1
2 2904
Hi David,

Welcome to MSDN newsgroup.
From your description, you're wanting to build a file import system which
allow the client user to provide some files (some wellknown format) and
then import the file content as records into the database server, also the
system is web based, yes?

As for such application, I think we can separate it into two parts:

1. In the ASP.NET web page, we provide a wizard like UI to collect
information from the clientuser, also use a <input file ..> element to let
the client user upload file. Then, when the user submit the page, the data
and file will be posted to the server for processing.

2. In the ASP.NET webapp's serverside, we just use our serverside code
logic to parse the uploaded file stream and loop through the text datas in
it and build SQL data execution command to insert data into database. This
is the same as we programmatically import a file into database in winform
or console application, you can make the parsing and accessing database's
code into a separate component.

Currently I haven't found any existing code samples, if you have any
further and more detaild question, we can have some further discussion on
them.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: "David Berry" <db****@mvps.org>
| Followup-To: microsoft.public.dotnet.languages.vb
| Subject: File Import Wizard
| Date: Sun, 2 Oct 2005 11:50:56 -0400
| Lines: 83
| MIME-Version: 1.0
| Content-Type: multipart/alternative;
| boundary="----=_NextPart_000_000A_01C5C747.8CD60990"
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| Message-ID: <#Y**************@TK2MSFTNGP14.phx.gbl>
| Newsgroups:
microsoft.public.dotnet.general,microsoft.public.d otnet.languages.vb
| NNTP-Posting-Host: adsl-64-252-4-30.adsl.snet.net 64.252.4.30
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.languages.vb:108605
microsoft.public.dotnet.general:51140
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| 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
|

Oct 3 '05 #2
Hi David,

How are you doing on this issue. Does the suggestions in my last reply help
a little? If there're anything else we can help, please feel free to post
here.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
--------------------
| X-Tomcat-ID: 56268410
| References: <#Y**************@TK2MSFTNGP14.phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: st*****@online.microsoft.com (Steven Cheng[MSFT])
| Organization: Microsoft
| Date: Mon, 03 Oct 2005 03:51:26 GMT
| Subject: RE: File Import Wizard
| X-Tomcat-NG: microsoft.public.dotnet.general
| Message-ID: <lz*************@TK2MSFTNGXA01.phx.gbl>
| Newsgroups: microsoft.public.dotnet.general
| Lines: 88
| Path: TK2MSFTNGXA01.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.general:51152
| NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
|
| Hi David,
|
| Welcome to MSDN newsgroup.
| From your description, you're wanting to build a file import system which
| allow the client user to provide some files (some wellknown format) and
| then import the file content as records into the database server, also
the
| system is web based, yes?
|
| As for such application, I think we can separate it into two parts:
|
| 1. In the ASP.NET web page, we provide a wizard like UI to collect
| information from the clientuser, also use a <input file ..> element to
let
| the client user upload file. Then, when the user submit the page, the
data
| and file will be posted to the server for processing.
|
| 2. In the ASP.NET webapp's serverside, we just use our serverside code
| logic to parse the uploaded file stream and loop through the text datas
in
| it and build SQL data execution command to insert data into database.
This
| is the same as we programmatically import a file into database in winform
| or console application, you can make the parsing and accessing database's
| code into a separate component.
|
| Currently I haven't found any existing code samples, if you have any
| further and more detaild question, we can have some further discussion on
| them.
|
| Thanks,
|
| Steven Cheng
| Microsoft Online Support
|
| Get Secure! www.microsoft.com/security
| (This posting is provided "AS IS", with no warranties, and confers no
| rights.)
|
|
|
|
|
|
|
|
| --------------------
| | From: "David Berry" <db****@mvps.org>
| | Followup-To: microsoft.public.dotnet.languages.vb
| | Subject: File Import Wizard
| | Date: Sun, 2 Oct 2005 11:50:56 -0400
| | Lines: 83
| | MIME-Version: 1.0
| | Content-Type: multipart/alternative;
| | boundary="----=_NextPart_000_000A_01C5C747.8CD60990"
| | X-Priority: 3
| | X-MSMail-Priority: Normal
| | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| | Message-ID: <#Y**************@TK2MSFTNGP14.phx.gbl>
| | Newsgroups:
| microsoft.public.dotnet.general,microsoft.public.d otnet.languages.vb
| | NNTP-Posting-Host: adsl-64-252-4-30.adsl.snet.net 64.252.4.30
| | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
| | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.languages.vb:108605
| microsoft.public.dotnet.general:51140
| | X-Tomcat-NG: microsoft.public.dotnet.general
| |
| | 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
| |
|
|

Oct 5 '05 #3

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

Similar topics

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",...
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...
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. ...
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...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...

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.