473,387 Members | 1,497 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

OLEdb problem

EMW
I use the following function to read an Excel worksheet into a dataset:

Public Function GetDataFromExcel(ByVal FileName As String, ByVal ds As
DataSet) As Boolean
Try
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=" & FileName & "; Extended Properties=Excel 8.0;"
Dim objConn As New System.Data.OleDb.OleDbConnection(strConn)
objConn.Open()
' Create objects ready to grab data
Dim objCmd As New System.Data.OleDb.OleDbCommand("SELECT * FROM
[sheet1$]", objConn)
Dim objDA As New System.Data.OleDb.OleDbDataAdapter
objDA.SelectCommand = objCmd
' Fill DataSet
objDA.Fill(ds)
' Clean up and return
objConn.Close()
Return True
Catch ex As Exception
lblHeading.Text = ex.ToString
Return False
End Try
End Function

When I run my ASPX on my own PC it runs fine and does what it must do.

When I put the page on the server I get this message:

System.Data.OleDb.OleDbException: Unspecified error at
System.Data.OleDb.OleDbConnection.ProcessResults(I nt32 hr) at
System.Data.OleDb.OleDbConnection.InitializeProvid er() at
System.Data.OleDb.OleDbConnection.Open() at
FSsite.FSsite.WebFormSubmit.GetDataFromExcel(Strin g FileName, DataSet ds)

Now I copied to System.Data.OleDb.dll file to the BIN folder at the IIS
webserver, but is there anything else I should do?
Can anyone explain to me what this means, it's a little vage error message?

thanks,
Eric
Jul 21 '05 #1
0 943

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

Similar topics

0
by: Error while executing SP | last post by:
Hi, I am getting an error while executing a sp from Oracle database. Can you let me know what could be the problem? here is the code using(System.Data.OleDb.OleDbConnection cn = new...
3
by: Chris Thunell | last post by:
I have a program where i connect to an access database and get some information out of it. I'm using the oledb.3.51 version, my computer doesn't seem to have the 4.0 version, but the computer that...
1
by: N S S | last post by:
I Get the following Error ================ Error =============================== Procedure 'GetCetgoriesOrProducts' expects parameter '@CategoryID', which was not supplied. Description: An...
4
by: NS | last post by:
Hi, I am trying to execute a prepare statement using oledb provider for DB2. The command.Prepare() statement is giving me an exception " No error information available:...
2
by: Joe | last post by:
Hi All, I am new to using the Access DB and I need some help if someone is able to give it to me. What I want to do is get the names of the columns of certain tables. Not the data in the table...
7
by: aacool | last post by:
Hi, I've been trying to open an Excel connection through OLEDB with the code below: string ConnectString =@"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + fileName.Text +...
9
by: Pam Ammond | last post by:
I need the code to update the database when Save is clicked and a text field has changed. This should be very easy since I used Microsoft's wizards for the OleDBAdapter and OleDBConnection, and...
1
by: EMW | last post by:
I use the following function to read an Excel worksheet into a dataset: Public Function GetDataFromExcel(ByVal FileName As String, ByVal ds As DataSet) As Boolean Try Dim strConn As String =...
3
by: Brian Foree | last post by:
I am developing an ASP.NET application that uses Access 2000 as its backend, and have just started getting the following error on 2 ASP.NET pages that had been working until late last week (and I...
1
by: ErikJL | last post by:
I have a simple webservice that performs a SELECT query against a database, and then an INSERT statement on the same database/table. The problem arises at the time when we create the second OleDB...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...

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.