.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

upload excel file to sql table

Posted By:      Posted Date: October 21, 2010    Points: 0   Category :ASP.Net

i tired a lot of correction, in the end i end up fully used the completely same code and guide of this link.


that was a well step-by-step guide through.

the error i get was, i found out it didnt save the file into table.
from the table under the file column
it show

if i click on download the file
error code shown,
There is no row at position 0.

Source Error:
Line 111:        Dim bytes() As Byte = CType(dt.Rows(0)("file1"), Byte())

can anyone teach me? thanks..

View Complete Post

More Related Resource Links

Insert Excel Data via File Upload into sql server database???

Hi all, I have requirement that User can Upload the Excel Sheet Data to sql server Database at once. How i do that Any Article or hint is apperciated.   Regards 

Upload millions of file records to a table

I have six input files having millions of record. I need to upload these data to my table. How can I upload the details in the most efficient way. Any help on this will be greatly appreciated.

Can i upload file to database table using AsyncFileUpload ?



can i upload my pdf or word file to oracle/SqlServer database table ?

How ? 

Insert Data to table from excel file


guys, i am new to sql development

my question is how do i import data from an excel table,

i was trying to do it via a query and just paste the values, but received a syntax error. thanks

data structure is:


download ms access table to an excel file


Is there a way to give users the capability to download an on-line table produced via gridview to an excel file (other than by copy/paste)?

Connection time out + excel file upload + ajax async as a fix?


Thank you in advance for taking the time to read this.

I have a C# ASP.NET page that allows users to select 2 excel files from their machine and click a button to compare and look for differences.  Any difference is output to a gridview for them to review.  The code works brilliantly on my machine, on other machines inside our network, ect but when we try to access this page from outside the network and use excel file sizes around 1mb a piece, we're seeing a connection timed out error in IE (v6 and v7).

Due to limitations beyond my control, I can not save the files to the server first and then do my comparison code.  Instead I have to read the files to memory and am using a .dll found here, http://exceldatareader.codeplex.com/.  It basically reads the excel files into datasets, which are then passed on to my comparison method.

What appears to happen is that the comparison code takes some time, depending on the file size.  For example, 20kb Excel files net results with no errors in just a few seconds.  200kb files take longer but still succeed.  1mb files, though, get the connection timed out but only in IE and only outside our network.

So my thought was that perhaps the browser isn't getting the results back from the server fast enough and issues the connecti

Upload Text File data to SQL table Using SSIS

I have a text File with following format  (  HED - Header Row, CL-Data (Sample 3 Rows) , TRL-Trailer Row)


CL 012352908607309000014090 2010-03-04 16:12:53.077000000 Inserted / Log ICode Action on Order Number / 33949591 / with / I-Code / IDEC/ / Memo: / cci questions about alert/

CL 012352958107309000020378 2010-04-14 10:20:03.340000000 Inserted / Log ICode Action on Order Number / 36992594 / with / I-Code / ISRB,INEW,ILKD/ / Memo: / cci to cxl, saved with benefits and gave her instructions to move account online/

CL 012353013807309000021681 2009-11-24 17:09:05.973000000 Inserted / Log Customer Info Change Action CL 012353013807309000021681 2009-11-24 17:09:05.973000000 Updated / Log Customer Info Change Action

TRL201008240001PCMCL 0000007349

I have to Import The above Mentioned data in to Following Table

CREATE TABLE [dbo].[Log]

[Type] [varchar

Table to new excel file destination



I have a table and I need to dump those columns into the new excel file...how can I ..?? 

How to upload a file to web server in asp.net and store file path into database table?

This article describe how to upload a file into web server folder using asp.net file upload control and store the file information into sql server database.

Export Visio Database Table Names to Excel

If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

Upload Multiple File using JQuery in asp.net

In this article I have explained how to upload multiple files using file upload control. I have used jQuery plugin for uploading multiple files.

I have also explained how to check for file type, file maximum size limit using jQuery & also using server side validation code.

Creating Excel file from C#

I used below coding for create a excel sheet.I got from on web site.
In below coding there is no problem.Its create the excel file.If i run second time,its ask to overwrite the current excel file.If I said "Yes" then it ok ,but If I select cancel button,its generate the Error message.The exception is

Upload a File to a SharePoint Document Library - Part I

The following helper class demonstrates a few techniques that allow documents to be uploaded to a SharePoint document library programmatically without using the API or a custom web service. You don't need to specify a document library name, and it will create any folders specified in the URL as required. File meta data will be updated if any properties are passed.

Multi File Upload Using JQuery!

Everyone knows about the file upload in .NET. But the multi file upload is some what difficult in .NET. For that purpose we can have some AJAX or JQuery!. Jquery is the latest advanced version. It will give some animated upload. You can try it for your own!!!!

Import XML File to SQL Table

Here is a brief example of importing an XML file into SQL Server table. This is accomplished by using the BULK option of OPENROWSET to load the file, and then utilizing the XQuery capabilities of SQL Server to parse the XML to normalized table format. This example requires SQL server 2005 or SQL Server 2008.

First, the following XML is saved to XML file C:\Products.xml.

file upload in chunks or not buffering in memory before writing to disk?


What are the options for handling file uploads to reduce the memory footprint?  Is there a way to upload in chunks?  Is there a way to stream upload directly to disk instead of loading entire file in server memory?


upload file not working



iam using masterpage and ajax update panel, i have child page called  fileupload.aspx,i try to upload the file

but its not working , can i use updatepanel in child page , pls very urgent

looking forward for answer.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend