TeDeSm
asked on
SQL Connection 'Provider cannot be found'
System.Runtime.InteropServ ices.COMEx ception: 'Provider cannot be found. It may not be properly installed.'
I know that this issue appears regularly on various sites but it can be an annoyance when the answer isn't obvious.
I have a VB.Net project that connects to an Excel spreadsheet and also a SQL database. The Database is updated with data from one of the Excel columns.
My project runs on some Windows 7 and / or Windows 10 machines but not on others giving the message above. It does successfully run on a Windows 10 64bit. There is a mix of 32/64 bit clients machines and SQL2014 is on a 64 bit server.
Annoyingly, I cannot get the project to run on my newly built Windows 10 in VS 2017 15.9.11
Office version is 365 Pro Plus 1904 build 11601.20144
Project references ADODB ActiveX data Objects 2.8 Library, Office 16.0 Object Library, Excel 16.0 Object Library amongst others.
The connection string is:
<add name="FloydConnectionStrin g" connectionString="Data Source=FLOSERVSQL\FLOSQL;I nitial Catalog=FloydProgs;User Id=floydproguser;Password= xcxcxcx;" providerName="System.Data. SqlClient" />
What can I look at to get the client machines to run this project?
I know that this issue appears regularly on various sites but it can be an annoyance when the answer isn't obvious.
I have a VB.Net project that connects to an Excel spreadsheet and also a SQL database. The Database is updated with data from one of the Excel columns.
My project runs on some Windows 7 and / or Windows 10 machines but not on others giving the message above. It does successfully run on a Windows 10 64bit. There is a mix of 32/64 bit clients machines and SQL2014 is on a 64 bit server.
Annoyingly, I cannot get the project to run on my newly built Windows 10 in VS 2017 15.9.11
Office version is 365 Pro Plus 1904 build 11601.20144
Project references ADODB ActiveX data Objects 2.8 Library, Office 16.0 Object Library, Excel 16.0 Object Library amongst others.
The connection string is:
<add name="FloydConnectionStrin
What can I look at to get the client machines to run this project?
Configure your projects' platform target from Any CPU to x86
ASKER
Hi John, I have the Configuration = Release, Platform = X86, Target CPU = X86
Anything else?
Anything else?
ASKER
Hi John, This is the exception:
System.Runtime.InteropServ ices.COMEx ception
HResult=0x800A0E7A
Message=Provider cannot be found. It may not be properly installed.
Source=ADODB
StackTrace:
at ADODB.ConnectionClass.Open (String ConnectionString, String UserID, String Password, Int32 Options)
at Floyd.StockItemUpdate.frmS tockItemUp date.btnUp dateStockI tem_Click( Object sender, EventArgs e)
at System.Windows.Forms.Contr ol.OnClick (EventArgs e)
at System.Windows.Forms.Butto n.OnClick( EventArgs e)
at System.Windows.Forms.Butto n.OnMouseU p(MouseEve ntArgs mevent)
at System.Windows.Forms.Contr ol.WmMouse Up(Message & m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Contr ol.WndProc (Message& m)
at System.Windows.Forms.Butto nBase.WndP roc(Messag e& m)
at System.Windows.Forms.Butto n.WndProc( Message& m)
at System.Windows.Forms.Contr ol.Control NativeWind ow.OnMessa ge(Message & m)
at System.Windows.Forms.Contr ol.Control NativeWind ow.WndProc (Message& m)
at System.Windows.Forms.Nativ eWindow.De buggableCa llback(Int Ptr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.Unsaf eNativeMet hods.Dispa tchMessage W(MSG& msg)
at System.Windows.Forms.Appli cation.Com ponentMana ger.System .Windows.F orms.Unsaf eNativeMet hods.IMsoC omponentMa nager.FPus hMessageLo op(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Appli cation.Thr eadContext .RunMessag eLoopInner (Int32 reason, ApplicationContext context)
at System.Windows.Forms.Appli cation.Thr eadContext .RunMessag eLoop(Int3 2 reason, ApplicationContext context)
at Microsoft.VisualBasic.Appl icationSer vices.Wind owsFormsAp plicationB ase.OnRun( )
at Microsoft.VisualBasic.Appl icationSer vices.Wind owsFormsAp plicationB ase.DoAppl icationMod el()
at Microsoft.VisualBasic.Appl icationSer vices.Wind owsFormsAp plicationB ase.Run(St ring[] commandLine)
at Floyd.StockItemUpdate.My.M yApplicati on.Main(St ring[] Args)
System.Runtime.InteropServ
HResult=0x800A0E7A
Message=Provider cannot be found. It may not be properly installed.
Source=ADODB
StackTrace:
at ADODB.ConnectionClass.Open
at Floyd.StockItemUpdate.frmS
at System.Windows.Forms.Contr
at System.Windows.Forms.Butto
at System.Windows.Forms.Butto
at System.Windows.Forms.Contr
at System.Windows.Forms.Contr
at System.Windows.Forms.Butto
at System.Windows.Forms.Butto
at System.Windows.Forms.Contr
at System.Windows.Forms.Contr
at System.Windows.Forms.Nativ
at System.Windows.Forms.Unsaf
at System.Windows.Forms.Appli
at System.Windows.Forms.Appli
at System.Windows.Forms.Appli
at Microsoft.VisualBasic.Appl
at Microsoft.VisualBasic.Appl
at Microsoft.VisualBasic.Appl
at Floyd.StockItemUpdate.My.M
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Traced the Office 64bit application to 'Office 16 Click-to-Run Extensibility Component 64-bit Registration' which I uninstalled. Installed Microsoft Access Database Engine 2016 Redistributable 32bit and all is well again.
ASKER
Thanks for the interest John