473,799 Members | 3,209 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

User Data Import Routine

Hi All,

I need to write an ASP page that will allow users to upload an Excel file,
the contents of which should then be imported into an SQL database.

Problem I am facing is how to do this efficiently. So far I have a page
that
will accept an upload, then display the data from the Excel file, my first
thought was to loop each row, then run an update/insert based on the data
found...Obvious ly this is not going to be very efficient, I'd exepect time
outs often!

Has anyone got any ideas to get round this? I'm not looking for a
solution,
just ideas!

Thanks!
Simon.
----------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 3052 spam emails to date.
Paying users do not have this message in their emails.
Try www.SPAMfighter.com for free now!
Jan 3 '06 #1
6 2147
Simon Harris wrote:
Hi All,

I need to write an ASP page that will allow users to upload an Excel
file, the contents of which should then be imported into an SQL
database.
Problem I am facing is how to do this efficiently. So far I have a
page that
will accept an upload, then display the data from the Excel file, my
first thought was to loop each row, then run an update/insert based
on the data found...Obvious ly this is not going to be very efficient,
I'd exepect time outs often!

Has anyone got any ideas to get round this? I'm not looking for a
solution,
just ideas!

Third-party tool:
http://www.aspfaq.com/show.asp?id=2189
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jan 3 '06 #2
> Third-party tool:
http://www.aspfaq.com/show.asp?id=2189


Thanks Bob, but as mentioned I've done the upload bit...

"So far I have a page that will accept an upload, then display the data
from
the Excel file...."

Problem is how to update/add many rows in the SQL database, based on what
the user enters into the uploaded Spreadsheet.... efficiently.

Simon.
----------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 3052 spam emails to date.
Paying users do not have this message in their emails.
Try www.SPAMfighter.com for free now!
Jan 3 '06 #3
Simon Harris wrote:
Third-party tool:
http://www.aspfaq.com/show.asp?id=2189


Thanks Bob, but as mentioned I've done the upload bit...


Several of these tools include the capability to add the spreadsheets to the
database ...

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jan 3 '06 #4
Assuming you have at least the Excel ODBC drivers installed on the
server, you should be able to do something like this. You may have to
add a column list depending on the format of the table/spreadsheet, and
modify the syntax to suit your needs.

sql = "INSERT " & _
" INTO <your table name> " & _
"SELECT * " & _
" FROM [" & <the name of the sheet or range to import> & "$]
" & _
" IN '' [EXCEL 5.0;DATABASE=" & <fully qualifed name of
the excel workbook> & "]"

then hand this off to the DB.

HTH,

Paul

Simon Harris wrote:
Third-party tool:
http://www.aspfaq.com/show.asp?id=2189


Thanks Bob, but as mentioned I've done the upload bit...

"So far I have a page that will accept an upload, then display the data
from
the Excel file...."

Problem is how to update/add many rows in the SQL database, based on what
the user enters into the uploaded Spreadsheet.... efficiently.

Simon.
----------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 3052 spam emails to date.
Paying users do not have this message in their emails.
Try www.SPAMfighter.com for free now!


Jan 3 '06 #5
> Third-party tool:
http://www.aspfaq.com/show.asp?id=2189


Thanks Bob, but as mentioned I've done the upload bit...

"So far I have a page that will accept an upload, then display the data
from
the Excel file...."

Problem is how to update/add many rows in the SQL database, based on what
the user enters into the uploaded Spreadsheet.... efficiently.

Simon.
----------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 3052 spam emails to date.
Paying users do not have this message in their emails.
Try www.SPAMfighter.com for free now!

Jan 6 '06 #6
Simon Harris wrote:
Third-party tool:
http://www.aspfaq.com/show.asp?id=2189


Thanks Bob, but as mentioned I've done the upload bit...

"So far I have a page that will accept an upload, then display the
data from
the Excel file...."

Problem is how to update/add many rows in the SQL database, based on
what the user enters into the uploaded Spreadsheet.... efficiently.

Oh! I thought you wanted to enter the spreadsheet into an image column in
the database table!
Would it be possible to use a scheduled DTS package? If not, see Paul's
post.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jan 6 '06 #7

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

Similar topics

0
1295
by: Mark | last post by:
Hi, I have created a custom user control that includes a dynamically created drop down list populated with data from a database. The control class contains a BindList routine that is used to populate the dropdownlist. This function works fine and I call it from within the CreateChildControls() routine. I also have another routine which allows a user to delete an item from the list by clicking on a Delete button (Again created...
1
4111
by: Dennis Gavrilov | last post by:
Hi, All! I have two questions: strategic and technical. Technical one first: I need to share an array of objects (implemented as hashes, having references to other objects and hashes, sharing done after blessing) between all of the mod_perl2 threads. The structure can grow quite big - tenths of thousands of array elements. It can grow as system operates (not possible to construct at apache startup). Sharing array is OK, but inserting...
3
358
by: Jason | last post by:
I was given a database that has unique IDs for each record such as: AL00001 AL00002 AL00003 etc The trouble is, I'm going to need to import data from another source that will also have IDs such as this and more than likely there are going to be duplicates. So if I import data that already has an AL00003, how can I get
9
1717
by: cheryl | last post by:
I am relatively new to programming in Access for a multi user environment, and am having trouble figuring out if there is a way to accomplish one of our user requests. I am working on a multi user Access 2002 application. BE db resides on a LAN, FE on each client. The app imports large .csv files containing billing info by date and allows users to run various reports. At a given time, one user may be importing a file into the main...
6
6674
by: Tom Rowton | last post by:
This one has me a bit confused and I'm not finding what I need in the MSDN or by searching these forums, so here goes... I have a rather large, complex code-in-page WebForm (don't ask) and a section of that Form is 4 or 5 ASP:Panels pretending to be a set of Tabs, each with its own section of the form.
18
1477
by: Paul H | last post by:
I have a CSV file that is tab delimited and has no text qualifiers. Normally this would be OK, but the data has tabs in it as well! Is there anyway I can get this data into access? Here is what the data looks like (I have replaced the actual tabs with for illustration purposes): CustomerIDCustomerNotes 0001Likes chocolateHates cheese 0002Likes ApplesHates Pineapple 0003Snores loudlySmokes too much
6
1415
by: =?Utf-8?B?QWRyaWFuIEpvbmVz?= | last post by:
Hi, I need to regularly check an FTP folder for the presence of a file, and if found, run a routine. Given that this is all on our ISP's servers, what is the best way to automate such a routine in ASP.NET? The end target of the routine is likely to be a MySQL database. If we were using SQL Server, I assume I could use DTS to trigger the process, but I'm
7
2986
by: hlubenow | last post by:
Hi, recently there was a thread about hiding the python-script from the user. The OP could use http://freshmeat.net/projects/pyobfuscate/ H.
7
4626
by: bae14 | last post by:
I have been trying to prompt a user for a file name. I'm using the code below but keep getting the message "compile error: Method or data member not found". It is stopping on the Application.FileDialog line. Any help would be greatly appreciated!! Private Sub Command13_Click() Dim myDialog As FileDialog Dim strFile As String Dim strSearchPath As String Dim vrtSelectedItem As Variant Set myDialog =...
0
10490
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10260
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10243
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9078
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7570
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5590
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4146
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.