StrataFrame Forum

problem with vfpoledb?

http://forum.strataframe.net/Topic22213.aspx

By Kevin Swanzey - 3/5/2009

I am getting this when I try to run a simple form. vfpoledb is registered; I even regsvr'd manually. Help.

ApplicationException
  An error occurred while creating the main form
TargetInvocationException
  Exception has been thrown by the target of an invocation.
InvalidOperationException
  The 'VFPOLEDB' provider is not registered on the local machine.

Source     : MicroFour StrataFrame UI

Stack Trace:
   at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper)
   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 System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
   at MicroFour.StrataFrame.Data.DbDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)
   at MicroFour.StrataFrame.Data.DataLayer.GetDataTable(String Statement, Boolean RegisterNotification)
   at MicroFour.StrataFrame.Business.BusinessLayer.FillDataTable(String SelectStatement)
   at BusinessObjectLibrary1.BusinessObject1.filltop100() in C:\Users\Kevin\Documents\Visual Studio 2008\Projects\WindowsApplication8\BusinessObjectLibrary1\BusinessObject1.vb:line 68
   at WindowsApplication8.Form1..ctor() in C:\Users\Kevin\Documents\Visual Studio 2008\Projects\WindowsApplication8\WindowsApplication8\Form1.vb:line 9
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
   at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at MicroFour.StrataFrame.Application.StrataFrameApplication.RunApplication()

By Trent L. Taylor - 3/6/2009

This could be version related...but this is telling you pretty much what is going on.  When we call the VFP references, we use the OLEDB provider.  So it is going to be pulling this from the registry and relies on it being installed on the machine.  I am guessing that you are running VFP9 on your machine (which is fine) but I have seen issues when more than one version of VFP is loaded on the same machine.  It just becomes a bit of "tinkering" with the VFP OLEDB and VFP runtime files within the SYSTEM32 (or whereever) folder to make sure things are registered properly.