Re: Need suggestion: importing data into SQL Express
- From: "VB Programmer" <donotemailme@xxxxxxxxxxxxx>
- Date: Mon, 4 Sep 2006 15:17:53 -0400
Thanks Gregory. I'll take a look at these...
"Cowboy (Gregory A. Beamer)" <NoSpamMgbworld@xxxxxxxxxxxxxxxxxx> wrote in
message news:uKZHdGF0GHA.2072@xxxxxxxxxxxxxxxxxxxxxxx
1. Create a table that has columns that match the Excel spread*** (data
type, length, etc.)
2. Create a DataSet from the table (empty)
3. Fill the DataSet from the Excel spread***
4. Attach to SQL with the Adapter
5. Fire Update
6. Run a stored proc to move the data to permanent tables
7. Empty the temp table
Another option is Integration Services (formerly DTS). I believe the base
implementation ships with Express.
SQL Bulk Load is another option to get it into the table. You can wrap the
Bulk Load in a Process object and fire it off. You then run the clean and
move operations (#6 above).
The point here? Moving the data and cleaning it up into permanent tables
are two different steps. I would pretty much ALWAYS do the clean and move
separate from the import into temp tables. Overall, I would prefer the
Integration or Bulk Load method, but it has a steeper learning curve.
Sucking into a DataSet and firing Update is fairly simple.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
*************************************************
Think outside the box!
*************************************************
"VB Programmer" <donotemailme@xxxxxxxxxxxxx> wrote in message
news:ub4mKsE0GHA.5048@xxxxxxxxxxxxxxxxxxxxxxx
I have an ASP.NET 2.0 website with a SQL Express database. I also have an
excel spread*** with alot of data on it. (If need be I can save it as a
CSV, XML, or whatever...)
I want the user to be able to import the data into an SQL Express
database (existing table) via a button on my ASPX page.
Do you recommend importing the data as XML into like a dataset, then
updating the SQL Express table with this dataset? If so, what's the
easiest way to update a table with an existing dataset? Additional
recommendations/suggestions appreciated...
Thanks!
.
- References:
- Need suggestion: importing data into SQL Express
- From: VB Programmer
- Re: Need suggestion: importing data into SQL Express
- From: Cowboy \(Gregory A. Beamer\)
- Need suggestion: importing data into SQL Express
- Prev by Date: Re: Need suggestion: importing data into SQL Express
- Next by Date: Re: Need starting advice...
- Previous by thread: Re: Need suggestion: importing data into SQL Express
- Next by thread: Re: Need suggestion: importing data into SQL Express
- Index(es):