Community
Showing results for 
Search instead for 
Do you mean 
Reply

ACT 2012 and Microsoft.Jet error in a plugin

Bronze Super Contributor
Posts: 1,231
Country: USA

ACT 2012 and Microsoft.Jet error in a plugin

I have a strange one…

 

This code below is in our import engine and was working fine at a client until they installed ACT 2012.

 

Dim strConnectionString As String

strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strFilePath & ";Extended Properties=""Excel 8.0;HDR=No;"""

Dim cnCSV As New OleDb.OleDbConnection(strConnectionString)

cnCSV.Open()  ' THIS LINE ERRORS - SEE STRACK BELOW

 

Error: Unspecified error

 

I can not get it to fail on our dev PCs or VMs with ACT 2012.  They have tried ACT! 2012 with Office 2003, office 2007 and office 2010 with the same error. If they downgrade to ACT! 2011 it works under all three version of MS Office. All VMs are Win 7/32.

 

I took this code and created a stand alone exe and it runs OK at the client when not a plugin.  

 

What could ACT! 2012 be doing under the hood to cause this error?
 

Any suggestions would be helpful.

 

Thanks

-- Jim Durkin

 

 

 

TARGET:        .ctor

TYPE:          System.Data.OleDb.OleDbException

MESSAGE:       Unspecified error

SOURCE :       Microsoft JET Database Engine

PLUGIN:        Microsoft JET Database Engine

VERSION:       Microsoft JET Database Engine

ACT:           14.0.572.0

SOURCE:        Microsoft JET Database Engine

VERSION:       2.0.50727.3053 (netfxsp.050727-3000)

STACK:         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 Durkin.Common.ImportEngine.frmImporter.getDataFromXLS(String strFilePath, String strSheetName)

 

TIME:          10/4/2011 3:04:54 PM

ACT NAME:      ActSage, Version=14.0.572.0, Culture=neutral, PublicKeyToken=ebf6b2ff4d0a08aa

MACHINE        ACT-TESTVM

IP             192.168.1.42

USER           ACT-TESTVM\ACTTest

 

%0A

---- Stack Trace ----%0A

%0A Stack:0:    Durkin.Common.Utilities.LogError.EnhancedStackTrace()

       ActSage.exe: N 00059

%0A Stack:1:    Durkin.Common.Utilities.LogError.Write(myException As Exception, sRoutine As String, sPluginName As String, sPluginVersion As String, sEmailFromAddress As String, sFromFullName As String)

       ActSage.exe: N 03495

%0A Stack:2:    Durkin.Common.Utilities.LogError.Write(myException As Exception, sDescription As String)

       ActSage.exe: N 00054

%0A Stack:3:    Durkin.Common.ImportEngine.frmImporter.getDataFromXLS(strFilePath As String, strSheetName As String)

       ActSage.exe: N 00926

%0A Stack:4:    Durkin.Common.ImportEngine.frmImporter.WizardPage3_NextButtonClick(sender As Object, e As EventArgs)

       ActSage.exe: N 00602

%0A Stack:5:    System.ComponentModel.CancelEventHandler.Invoke(sender As Object, e As CancelEventArgs)

       ActSage.exe: N 00000

%0A Stack:6:    DevComponents.DotNetBar.WizardPage.OnNextButtonClick(e As CancelEventArgs)

       ActSage.exe: N 00029

%0A Stack:7:    DevComponents.DotNetBar.WizardPage.1ON(AFO As CancelEventArgs)

       ActSage.exe: N 00011

%0A Stack:8:    DevComponents.DotNetBar.Wizard.NavigateNext()

       ActSage.exe: N 00069

%0A Stack:9:    DevComponents.DotNetBar.Wizard.1O3(AF6 As Object, AF7 As EventArgs)

       ActSage.exe: N 00005

%0A Stack:10:    System.Windows.Forms.Control.OnClick(e As EventArgs)

       ActSage.exe: N 00112

%0A Stack:11:    DevComponents.DotNetBar.ButtonX.OnClick(e As EventArgs)

       ActSage.exe: N 00407

%0A Stack:12:    DevComponents.DotNetBar.ButtonX.OnMouseUp(e As MouseEventArgs)

       ActSage.exe: N 00145

%0A Stack:13:    System.Windows.Forms.Control.WmMouseUp(m As Message&, button As MouseButtons, clicks As Int32)

       ActSage.exe: N 00655

%0A Stack:14:    System.Windows.Forms.Control.WndProc(m As Message&)

       ActSage.exe: N 02181

%0A Stack:15:    DevComponents.DotNetBar.PopupItemControl.WndProc(m As Message&)

       ActSage.exe: N 00101

%0A Stack:16:    System.Windows.Forms.ControlNativeWindow.OnMessage(m As Message&)

       ActSage.exe: N 00016

%0A Stack:17:    System.Windows.Forms.ControlNativeWindow.WndProc(m As Message&)

       ActSage.exe: N 00049

%0A Stack:18:    System.Windows.Forms.NativeWindow.Callback(hWnd As IntPtr, msg As Int32, wparam As IntPtr, lparam As IntPtr)

       ActSage.exe: N 00090

%0A Stack:19:    System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(msg As MSG&)

       ActSage.exe: N 00000

%0A Stack:20:    System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(dwComponentID As Int32, reason As Int32, pvLoopData As Int32)

       ActSage.exe: N 00590

%0A Stack:21:    System.Windows.Forms.ThreadContext.RunMessageLoopInner(reason As Int32, context As ApplicationContext)

       ActSage.exe: N 00375

%0A Stack:22:    System.Windows.Forms.ThreadContext.RunMessageLoop(reason As Int32, context As ApplicationContext)

       ActSage.exe: N 00097

%0A Stack:23:    System.Windows.Forms.Application.RunDialog(form As Form)

       ActSage.exe: N 00051

%0A Stack:24:    System.Windows.Forms.Form.ShowDialog(owner As IWin32Window)

       ActSage.exe: N 00883

%0A Stack:25:    Durkin.UI.Impact.ImpactforACT.OpenImport(Text As String)

       ActSage.exe: N 00062

%0A Stack:26:    Act.UI.ActApplication.ExecuteCommand(command As String)

       ActSage.exe: N 00056

%0A Stack:27:    Act.UI.ActApplication.BarItemClick(sender As Object, e As EventArgs)

       ActSage.exe: N 00036

%0A Stack:28:    DevComponents.DotNetBar.DotNetBarManager.90(2H1 As BaseItem)

       ActSage.exe: N 00039

%0A Stack:29:    DevComponents.DotNetBar.BaseItem.RaiseClick()

       ActSage.exe: N 00480

%0A Stack:30:    DevComponents.DotNetBar.BaseItem.InternalMouseUp(objArg As MouseEventArgs)

       ActSage.exe: N 00274

%0A Stack:31:    DevComponents.DotNetBar.PopupItem.InternalMouseUp(objArg As MouseEventArgs)

       ActSage.exe: N 00036

%0A Stack:32:    DevComponents.DotNetBar.ButtonItem.InternalMouseUp(objArg As MouseEventArgs)

       ActSage.exe: N 00645

%0A Stack:33:    DevComponents.DotNetBar.MenuPanel.OnMouseUp(e As MouseEventArgs)

       ActSage.exe: N 00028

%0A Stack:34:    System.Windows.Forms.Control.WmMouseUp(m As Message&, button As MouseButtons, clicks As Int32)

       ActSage.exe: N 00655

%0A Stack:35:    System.Windows.Forms.Control.WndProc(m As Message&)

       ActSage.exe: N 02181

%0A Stack:36:    DevComponents.DotNetBar.MenuPanel.WndProc(m As Message&)

       ActSage.exe: N 00024

%0A Stack:37:    System.Windows.Forms.ControlNativeWindow.OnMessage(m As Message&)

       ActSage.exe: N 00016

%0A Stack:38:    System.Windows.Forms.ControlNativeWindow.WndProc(m As Message&)

       ActSage.exe: N 00049

%0A Stack:39:    System.Windows.Forms.NativeWindow.Callback(hWnd As IntPtr, msg As Int32, wparam As IntPtr, lparam As IntPtr)

       ActSage.exe: N 00090

%0A Stack:40:    System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(msg As MSG&)

       ActSage.exe: N 00000

%0A Stack:41:    System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(dwComponentID As Int32, reason As Int32, pvLoopData As Int32)

       ActSage.exe: N 00590

%0A Stack:42:    System.Windows.Forms.ThreadContext.RunMessageLoopInner(reason As Int32, context As ApplicationContext)

       ActSage.exe: N 00375

%0A Stack:43:    System.Windows.Forms.ThreadContext.RunMessageLoop(reason As Int32, context As ApplicationContext)

       ActSage.exe: N 00097

%0A Stack:44:    System.Windows.Forms.Application.Run(mainForm As Form)

       ActSage.exe: N 00049

%0A Stack:45:    Act.Application.SingletonApp.Run(startupForm As Form)

       ActSage.exe: N 00085

%0A Stack:46:    Act.Application.Act.Main(args As String[])

       ActSage.exe: N 02270

 

%0A

 

ExceptionToString:Exception Source:      Microsoft JET Database Engine

Exception Type:        System.Data.OleDb.OleDbException

Exception Message:     Unspecified error

Exception Target Site: .ctor

 

---- Stack Trace ----%0A

%0A Stack:0:    System.Data.OleDb.OleDbConnectionInternal..ctor(constr As OleDbConnectionString, connection As OleDbConnection)

       ActSage.exe: N 969373

%0A Stack:1:    System.Data.OleDb.OleDbConnectionFactory.CreateConnection(options As DbConnectionOptions, poolGroupProviderInfo As Object, pool As DbConnectionPool, owningObject As DbConnection)

       ActSage.exe: N 00086

%0A Stack:2:    System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(owningConnection As DbConnection, poolGroup As DbConnectionPoolGroup)

       ActSage.exe: N 00029

%0A Stack:3:    System.Data.ProviderBase.DbConnectionFactory.GetConnection(owningConnection As DbConnection)

       ActSage.exe: N 4863644

%0A Stack:4:    System.Data.ProviderBase.DbConnectionClosed.OpenConnection(outerConnection As DbConnection, connectionFactory As DbConnectionFactory)

       ActSage.exe: N 00117

%0A Stack:5:    System.Data.OleDb.OleDbConnection.Open()

       ActSage.exe: N 00040

%0A Stack:6:    Durkin.Common.ImportEngine.frmImporter.getDataFromXLS(strFilePath As String, strSheetName As String)

       ActSage.exe: N 00372


Silver Super Contributor
Posts: 2,328
Country: USA

Re: ACT 2012 and Microsoft.Jet error in a plugin

Jim,

 

I think it's probably getting confused with which version of the oledb driver it should be using to open the Excel file.  I suspect that they updated Office at the same time which broke it and uninstalling and reinstalling an earlier version didn't fix it because it left some registry entries.  I would get them to upgrade to Office 2010 and then use your version of the following:

 

MyConnection =

New System.Data.OleDb.OleDbConnection( _

 

"Provider=Microsoft.ACE.OLEDB.12.0;"& _

 

"data source=" & sFilename & "; "& _

 

"Extended Properties=" & """Excel 12.0; IMEX=1; MAXSCANROWS=50\0""")

 

That way you won't have a version conflict with an older version.  Why it happens inside of ACT! and not outside of ACT! is anyones guess but ACT! does have an interface with Excel and when they enable that interface that might be causing the problem.

 

Stan


If you would like to get more out of ACT! you can find an ACT! Certified Consultant near you by going to:www.act.com/acc.
-------------------------------------------------------------------------------------
Stan Smith
ACT! Certified Consultant
ADS Programming Services, Inc.
(205) 222-1661
www.adsprogramming.com
www.actwebhosting.com
Click Here to Purchase Act!
New Member
Posts: 4
Country: United_Kingdom

Re: ACT 2012 and Microsoft.Jet error in a plugin

 

I have come across exactly the same problem as this and am wondering if anyone else has.

 

Like jimdurkin I cannot reproduce the fault on our deveolpment machines or test VMs but it exists at a number of customer sites. The plugin has been around since ACT 2007 and has worked on all versions until 2012.

 

The error occurs when trying to open an Access database from within the plugin. I have tried using adodb, and ado.net and both give  the 'Unspecified Error' message. I even went back to a dao interface, and this also errors on ACT2012 but giving a 'resources exceeded' message at the point when you open the database.

If I recompile my code into an exe and run the program outside of ACT, then it works fine.

 

Something has clearly changed in ACT2012. I have not yet got it on a customer site with 2013 but suspect nothing will have changed.

 

I'd be interested to hear if anyone else has had the problem.

 

Thanks

Bronze Super Contributor
Posts: 1,231
Country: USA

Re: ACT 2012 and Microsoft.Jet error in a plugin

 

If I recall correctly we fixed this by passing "IMEX=1;" which tells the driver to always read "intermixed" (numbers, dates, strings etc) data columns as text. We then trap all the bad data errors in code.

 

Excel worksheets are an evil and dark place for data entry patterns.

 

Hope this helps

-- jim durkin

New Member
Posts: 4
Country: United_Kingdom

Re: ACT 2012 and Microsoft.Jet error in a plugin

Thanks Jm for your quick reply. My situation is a bit different in that I am trying to open an Access database rather than an Excel  spreadsheet, but the failure comes at the exact same point as you mentioned.

This gives me the idea to try making changes to my connection string and to try different options. At present I am using adodb and use the following code

 

mConn = CreateObject("ADODB.Connection")

mConn.Mode = iMode

mConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & mDatabaseName & ";")

 

where iMode is used to define the access mode to the database (ADODB.ConnectModeEnum)

I will try some other options the next time I go to my customer site as like you I cant reproduce the problem here. I'll post whatever I find.

Regards

 

 

 

Bronze Super Contributor
Posts: 1,231
Country: USA

Re: ACT 2012 and Microsoft.Jet error in a plugin

Isn't "Microsoft.Jet.OLEDB" the old VisualFoxPro engine?

 

I heard its not 64 compatible. Check the OS?

 

-- Jim

Nickel Contributor
Posts: 175
Country: USA

Re: ACT 2012 and Microsoft.Jet error in a plugin

To clarify a bit on the Jet database engine. It is not 64-bit compatible, but it can run as 32-bit under WOW on Windows OSes.

If the code works as a separate exe, but not in the plugin, it could be a permissions issue. That may help in tracking down the problem. Just my two cents.
New Member
Posts: 4
Country: United_Kingdom

Re: ACT 2012 and Microsoft.Jet error in a plugin

Thanks for the replies.

I am not sure about Fox Pro but I have been using the Jet .OLEDB.4.0 connection string for years to connect to a MS Access database without any problems. I know it is only 32 bit and my plugin is compiled for x86 operation - afterall so is ACT and the Sage accounts application that my plugin interfaces to. I can run the plugin successfully on both 32 and 64 bit machines using WOW.

 

As the problem only occurs on some machines I think the permissions idea is a good call. I will check this out next time I can go to a customer site where the problem exists.

 

Cheers

Phil

 

Bronze Super Contributor
Posts: 1,231
Country: USA

Re: ACT 2012 and Microsoft.Jet error in a plugin

Here's a lonnnnnnnng shot..

 

What version of Office do the have? We used to see something like this but different on some office installations because all the OLEDB object where not installed. 

 

To fix this try these steps
1. In Add/Remove programs, locate your Office application and select it.
2. Click on the 'Change' button
3. Select 'Add or Remove features' and click 'next'
4. Select 'Choose advanced customization of applications' and click 'next'
5. In the tree view, expand 'Microsoft Office Excel' and make sure the .NET
Programmability Support option is set to 'run from my computer'.
6. Click 'update'.

 

-- Jim Durkin

Nickel Contributor
Posts: 175
Country: USA

Re: ACT 2012 and Microsoft.Jet error in a plugin

Another thought (thanks to Jim's reply). This is kind of an addition to the the permission idea. Since this is being called from ACT, the username may be goofed up. You may just need to include a specific username/password to access the Access database, as if it was in a workgroup (which is another thing to look into).