Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Install It!  Unspecified error ---> System.Data.OleDb.OleDbException
Previous Previous
 
Next Next
New Post 5/25/2008 11:43 PM
Resolved
User is offline sandeep
64 posts
10th Ranked


Unspecified error ---> System.Data.OleDb.OleDbException 

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 Previous
 
Next Next
  Forum  General DotNetN...  Install It!  Unspecified error ---> System.Data.OleDb.OleDbException
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Efficion Consulting
A premier DotNetNuke consulting firm providing complete DNN services including: custom module development, skinning and design, installation and integration services.
www.efficionconsulting.com
DotNetNuke Training by Engage Software
Specializing in customized training, architecture and module solutions for large scale implementations lead by DNN Core Team Member Christopher Hammond.
engagesoftware.com
Smart-Thinker
DNN Modules for Social Networks for as low as $69 for 6 modules! We also maintain the DotNetNuke Directory - http://DNNDir.com
www.smart-thinker.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP