Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Unspecified error ---> System.Data.OleDb.OleDbExceptionUnspecified error ---> System.Data.OleDb.OleDbException
Previous
 
Next
New Post
5/26/2008 2:43 AM
 

Hi All,

       I have a module which uploads the excel file selected to the folder portals. The sample path is as follows C:\Inetpub\wwwroot\sample4.7\Portals\0\import.xls. The file is being uploaded correctly but i get an error when i try to import the data in excel to the database. I have written both functionalities upload and import functionality in the same button clickk event. Code is as follows for the event.

 

Private Sub cmdAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdAdd.ClickTry

 

Dim strFileName As String

 

Dim strExtension As String = ""

 

Dim strMessage As String = ""

 

 

Dim postedFile As HttpPostedFile = cmdBrowse.PostedFile'Get localized Strings

 

strFileName = System.IO.Path.GetFileName(postedFile.FileName)

strExtension = Path.GetExtension(strFileName)

 

Dim strInvalid As String = Services.Localization.Localization.GetString("InvalidExt", Me.LocalResourceFile)If postedFile.FileName <> "" Then

 

 

Select Case FileTypeCase UploadType.File ' content files

strMessage += FileSystemUtils.UploadFile(RootFolder, postedFile,

 

False)End Select

 

Else

strMessage = Services.Localization.Localization.GetString(

 

"NoFile", Me.LocalResourceFile)End If

 

 

 

Dim excelConnection As System.Data.OleDb.OleDbConnectionDim ExcelPath As String = PortalSettings.HomeDirectoryMapPath & postedFile.FileName'Fetch data from excel

 

excelConnection =

excelConnection.Open()

Dim ExcelCommand As New System.Data.OleDb.OleDbCommandNew System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;data source='" & ExcelPath & " '; " & "Extended Properties=""Excel 8.0;HDR=No;IMEX=1""")

etc .. and code to import.

 

But the file is being uploaded correctly and when the excelconnection.open is executed it throws the following error. 

Error: upload is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: Unspecified error ---> System.Data.OleDb.OleDbException: Unspecified error at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at XWD.Modules.XWD_DNN_CompetencyManager.Upload.cmdAdd_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\sample4.7\DesktopModules\XWD_Comp_AdminManager\upload.ascx.vb:line 95 --- End of inner exception stack trace 
 

What might be the problem. The folder has the file and the connection is not being opened.please help its really urgent

Thanks,

Sandeep.M

 

 

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Unspecified error ---> System.Data.OleDb.OleDbExceptionUnspecified error ---> System.Data.OleDb.OleDbException


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out