Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Importing Data From A Outside Source Using ASP to SQL

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-03-16 : 08:21:43
Brian Chase writes "We are working on a project that would allow users to import data from an excel or access file using ASP to write to a SQL 2000 database. Any pointers on even where we ahould start?"

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2004-03-25 : 21:54:46
A couple of suggestions:
- you'll need to create your own procedures to upload data that's posted to an ASP-based web site. This is relatively easy - see http://support.microsoft.com/default.aspx?scid=kb;en-us;q299692, or there are a number of commercially avaiable components out there.
- I'd suggest limiting your customers to uploading CSV/XML data, as this is easier to secure (ie no-one can attach nasty macro's).
- If you must use the Access/Excel route, you can use the corresponding object models to read the data and load it into your db. But your customers must all conform to one set format - easier said than done.
- Importing a CSV into a DB is relatively easy and there's loads of code around on the 'net to help you.

HTH

Tim
Go to Top of Page

lauramayer
Posting Yak Master

152 Posts

Posted - 2004-04-04 : 08:40:38
Tim,

You mentioned using "the corresponding object models to read the data and load it into your db." We have an external handheld that creates a CSV files and from that we use access as the intermediary to transfer it to SQL2K. However the VB script we were using is riddled with bugs and very problematic. I am not familiar with this object model in Access is there a place to get mre info about it? I've been looking for days and haven't had that much luck

Thanks

Laura
Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2004-04-05 : 18:00:53
The way I understood Tim's message was that if the file you are uploading is in Excel or Access format, then there are object models that allow you to manipulate those file types without converting them. I'm assuming that in ASP, you would be using the Office Web Components (OWC) but I've never done that.

Laura, for your handling of CSV files, I don't know of any specific object model for those. Typically when I'm working with those in VB, I just use the FileSystemObject to open and read them in and then use split() commands to parse them into an array that I can more easily manipulate.

--------------------------------------------------------------
Find more words of wisdom at [url]http://weblogs.sqlteam.com/markc[/url]
Go to Top of Page
   

- Advertisement -