Database Connection

J

John Smith

Database Software: FoxPro 7

I installed the VFPOLEDB.DLL for FoxPro 8. The software vendor uses VFP 7
for their database and I want to connect to it to generate custom reports
through asp.net (vb). I tried to connect to the database and get the error
message below. I even tried to manually registering VFPOLEDB.DLL and the
register succeeded. Any ideas? I have search all day trying to find the
solution to this, so far I have had no success. Any help would be much
appreciated.

--------------------------------------------------
CONNECTION STRING:
--------------------------------------------------
Connection String: "Provider=VFPOLEDB.1;Data Source='c:\data';Collating
Sequence=general"

--------------------------------------------------
ERROR MESSAGE:
--------------------------------------------------
Server Error in '/MeetingReports' Application.

No error information available: REGDB_E_CLASSNOTREG(0x80040154).
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: No error information
available: REGDB_E_CLASSNOTREG(0x80040154).

Source Error:

Line 73:
Line 74: '*** Fill DataSet with the current returned records ***
--> Line 75: objOleDbDataAdapter.Fill(objDataSet, DataTableName)
Line 76:
Line 77: '*** Fill DataGrid Control with DatatTable ***

Source File: c:\inetpub\wwwroot\xxx\0.aspx.vb Line: 75

Stack Trace:

[OleDbException (0x80040154): No error information available:
REGDB_E_CLASSNOTREG(0x80040154).]

[InvalidOperationException: The 'VFPOLEDB.1' provider is not registered on
the local machine.]
System.Data.OleDb.OleDbConnection.CreateProviderError(Int32 hr) +81
System.Data.OleDb.OleDbConnection.CreateProvider(OleDbConnectionString
constr) +107
System.Data.OleDb.OleDbConnection.Open() +203
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
+36
MeetingReports._0.PopulateDataGridControl(DataGrid DataGridControl,
String sqlStatement, String DataTableName) in
c:\inetpub\wwwroot\xxx\0.aspx.vb:75
xxx._0.popDataGrid(DataGrid DataGridControl) in
c:\inetpub\wwwroot\xxx\0.aspx.vb:114
xxx._0.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\xxx\0.aspx.vb:26
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
Version:1.1.4322.573
 
K

Kevin Spencer

Well, I'm not sure what you mean by "installed" but it looks like the driver
is not registered.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

John Smith said:
Database Software: FoxPro 7

I installed the VFPOLEDB.DLL for FoxPro 8. The software vendor uses VFP 7
for their database and I want to connect to it to generate custom reports
through asp.net (vb). I tried to connect to the database and get the error
message below. I even tried to manually registering VFPOLEDB.DLL and the
register succeeded. Any ideas? I have search all day trying to find the
solution to this, so far I have had no success. Any help would be much
appreciated.

--------------------------------------------------
CONNECTION STRING:
--------------------------------------------------
Connection String: "Provider=VFPOLEDB.1;Data Source='c:\data';Collating
Sequence=general"

--------------------------------------------------
ERROR MESSAGE:
--------------------------------------------------
Server Error in '/MeetingReports' Application.

No error information available: REGDB_E_CLASSNOTREG(0x80040154).
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: No error information
available: REGDB_E_CLASSNOTREG(0x80040154).

Source Error:

Line 73:
Line 74: '*** Fill DataSet with the current returned records ***
--> Line 75: objOleDbDataAdapter.Fill(objDataSet, DataTableName)
Line 76:
Line 77: '*** Fill DataGrid Control with DatatTable ***

Source File: c:\inetpub\wwwroot\xxx\0.aspx.vb Line: 75

Stack Trace:

[OleDbException (0x80040154): No error information available:
REGDB_E_CLASSNOTREG(0x80040154).]

[InvalidOperationException: The 'VFPOLEDB.1' provider is not registered on
the local machine.]
System.Data.OleDb.OleDbConnection.CreateProviderError(Int32 hr) +81
System.Data.OleDb.OleDbConnection.CreateProvider(OleDbConnectionString
constr) +107
System.Data.OleDb.OleDbConnection.Open() +203
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
+36
MeetingReports._0.PopulateDataGridControl(DataGrid DataGridControl,
String sqlStatement, String DataTableName) in
c:\inetpub\wwwroot\xxx\0.aspx.vb:75
xxx._0.popDataGrid(DataGrid DataGridControl) in
c:\inetpub\wwwroot\xxx\0.aspx.vb:114
xxx._0.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\xxx\0.aspx.vb:26
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
Version:1.1.4322.573














Kevin Spencer said:
Hi John,

You can read about the OLE DB Driver for Visual FoxPro at the following URL:
http://msdn.microsoft.com/library/d...lp/html/dggrfOLEDBProviderforVisualFoxPro.asp
You can get good Connection Strings from http://www.connectionstrings.com.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
E

Eliahu

have you tried to use the DSN? You can register your data source as odbc and
use the odbc driver ..


John Smith said:
Database Software: FoxPro 7

I installed the VFPOLEDB.DLL for FoxPro 8. The software vendor uses VFP 7
for their database and I want to connect to it to generate custom reports
through asp.net (vb). I tried to connect to the database and get the
error
message below. I even tried to manually registering VFPOLEDB.DLL and the
register succeeded. Any ideas? I have search all day trying to find the
solution to this, so far I have had no success. Any help would be much
appreciated.

--------------------------------------------------
CONNECTION STRING:
--------------------------------------------------
Connection String: "Provider=VFPOLEDB.1;Data Source='c:\data';Collating
Sequence=general"

--------------------------------------------------
ERROR MESSAGE:
--------------------------------------------------
Server Error in '/MeetingReports' Application.

No error information available: REGDB_E_CLASSNOTREG(0x80040154).
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: No error information
available: REGDB_E_CLASSNOTREG(0x80040154).

Source Error:

Line 73:
Line 74: '*** Fill DataSet with the current returned records ***
--> Line 75: objOleDbDataAdapter.Fill(objDataSet, DataTableName)
Line 76:
Line 77: '*** Fill DataGrid Control with DatatTable ***

Source File: c:\inetpub\wwwroot\xxx\0.aspx.vb Line: 75

Stack Trace:

[OleDbException (0x80040154): No error information available:
REGDB_E_CLASSNOTREG(0x80040154).]

[InvalidOperationException: The 'VFPOLEDB.1' provider is not registered on
the local machine.]
System.Data.OleDb.OleDbConnection.CreateProviderError(Int32 hr) +81
System.Data.OleDb.OleDbConnection.CreateProvider(OleDbConnectionString
constr) +107
System.Data.OleDb.OleDbConnection.Open() +203
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
+36
MeetingReports._0.PopulateDataGridControl(DataGrid DataGridControl,
String sqlStatement, String DataTableName) in
c:\inetpub\wwwroot\xxx\0.aspx.vb:75
xxx._0.popDataGrid(DataGrid DataGridControl) in
c:\inetpub\wwwroot\xxx\0.aspx.vb:114
xxx._0.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\xxx\0.aspx.vb:26
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

Version Information: Microsoft .NET Framework Version:1.1.4322.573;
ASP.NET
Version:1.1.4322.573














Kevin Spencer said:
Hi John,

You can read about the OLE DB Driver for Visual FoxPro at the following URL:
http://msdn.microsoft.com/library/d...lp/html/dggrfOLEDBProviderforVisualFoxPro.asp

You can get good Connection Strings from
http://www.connectionstrings.com.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
K

Kevin Spencer

You really want to avoid using ODBC if at all possible ODBC is a wrapper for
OLE DB, which makes it much slower, as a System DSN is a registry entry
which must be read in order to use it, and of course, you have the overhead
of using a wrapper instead of OLE DB directly.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

Eliahu said:
have you tried to use the DSN? You can register your data source as odbc and
use the odbc driver ..


John Smith said:
Database Software: FoxPro 7

I installed the VFPOLEDB.DLL for FoxPro 8. The software vendor uses VFP 7
for their database and I want to connect to it to generate custom reports
through asp.net (vb). I tried to connect to the database and get the
error
message below. I even tried to manually registering VFPOLEDB.DLL and the
register succeeded. Any ideas? I have search all day trying to find the
solution to this, so far I have had no success. Any help would be much
appreciated.

--------------------------------------------------
CONNECTION STRING:
--------------------------------------------------
Connection String: "Provider=VFPOLEDB.1;Data Source='c:\data';Collating
Sequence=general"

--------------------------------------------------
ERROR MESSAGE:
--------------------------------------------------
Server Error in '/MeetingReports' Application.

No error information available: REGDB_E_CLASSNOTREG(0x80040154).
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: No error information
available: REGDB_E_CLASSNOTREG(0x80040154).

Source Error:

Line 73:
Line 74: '*** Fill DataSet with the current returned records ***
--> Line 75: objOleDbDataAdapter.Fill(objDataSet, DataTableName)
Line 76:
Line 77: '*** Fill DataGrid Control with DatatTable ***

Source File: c:\inetpub\wwwroot\xxx\0.aspx.vb Line: 75

Stack Trace:

[OleDbException (0x80040154): No error information available:
REGDB_E_CLASSNOTREG(0x80040154).]

[InvalidOperationException: The 'VFPOLEDB.1' provider is not registered on
the local machine.]
System.Data.OleDb.OleDbConnection.CreateProviderError(Int32 hr) +81
System.Data.OleDb.OleDbConnection.CreateProvider(OleDbConnectionString
constr) +107
System.Data.OleDb.OleDbConnection.Open() +203
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
+36
MeetingReports._0.PopulateDataGridControl(DataGrid DataGridControl,
String sqlStatement, String DataTableName) in
c:\inetpub\wwwroot\xxx\0.aspx.vb:75
xxx._0.popDataGrid(DataGrid DataGridControl) in
c:\inetpub\wwwroot\xxx\0.aspx.vb:114
xxx._0.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\xxx\0.aspx.vb:26
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

Version Information: Microsoft .NET Framework Version:1.1.4322.573;
ASP.NET
Version:1.1.4322.573














Kevin Spencer said:
Hi John,

You can read about the OLE DB Driver for Visual FoxPro at the following URL:
http://msdn.microsoft.com/library/d...lp/html/dggrfOLEDBProviderforVisualFoxPro.asp
You can get good Connection Strings from
http://www.connectionstrings.com.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

How do I connect to a FoxPro 7 database?
 
J

John Smith

I would like to avoid ODBC if at all possible. But... I did try it just to
see if the driver would work for me and it did work. But much like Kevin
stated I would really prefer to not use odbc. Any idea why it would work
forcing the provider to use an odbc dsn vs. straight oledb? Any ideas what
I can do to get the other connection to work? I could potentially be
dealing with 10K's - 100K's of records at any one point and would like to
use the faster connection.

the connection string that worked for me: "Provider=VFPOLEDB.1;DSN=myData"


Kevin Spencer said:
You really want to avoid using ODBC if at all possible ODBC is a wrapper for
OLE DB, which makes it much slower, as a System DSN is a registry entry
which must be read in order to use it, and of course, you have the overhead
of using a wrapper instead of OLE DB directly.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

Eliahu said:
have you tried to use the DSN? You can register your data source as odbc and
use the odbc driver ..
VFP
7
for their database and I want to connect to it to generate custom reports
through asp.net (vb). I tried to connect to the database and get the
error
message below. I even tried to manually registering VFPOLEDB.DLL and the
register succeeded. Any ideas? I have search all day trying to find the
solution to this, so far I have had no success. Any help would be much
appreciated.

--------------------------------------------------
CONNECTION STRING:
--------------------------------------------------
Connection String: "Provider=VFPOLEDB.1;Data Source='c:\data';Collating
Sequence=general"

--------------------------------------------------
ERROR MESSAGE:
--------------------------------------------------
Server Error in '/MeetingReports' Application.

No error information available: REGDB_E_CLASSNOTREG(0x80040154).
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: No error information
available: REGDB_E_CLASSNOTREG(0x80040154).

Source Error:

Line 73:
Line 74: '*** Fill DataSet with the current returned records ***
--> Line 75: objOleDbDataAdapter.Fill(objDataSet, DataTableName)
Line 76:
Line 77: '*** Fill DataGrid Control with DatatTable ***

Source File: c:\inetpub\wwwroot\xxx\0.aspx.vb Line: 75

Stack Trace:

[OleDbException (0x80040154): No error information available:
REGDB_E_CLASSNOTREG(0x80040154).]

[InvalidOperationException: The 'VFPOLEDB.1' provider is not
registered
on
the local machine.]
System.Data.OleDb.OleDbConnection.CreateProviderError(Int32 hr) +81
System.Data.OleDb.OleDbConnection.CreateProvider(OleDbConnectionString
constr) +107
System.Data.OleDb.OleDbConnection.Open() +203
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
+36
MeetingReports._0.PopulateDataGridControl(DataGrid DataGridControl,
String sqlStatement, String DataTableName) in
c:\inetpub\wwwroot\xxx\0.aspx.vb:75
xxx._0.popDataGrid(DataGrid DataGridControl) in
c:\inetpub\wwwroot\xxx\0.aspx.vb:114
xxx._0.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\xxx\0.aspx.vb:26
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

Version Information: Microsoft .NET Framework Version:1.1.4322.573;
ASP.NET
Version:1.1.4322.573














Hi John,

You can read about the OLE DB Driver for Visual FoxPro at the following
URL:
http://msdn.microsoft.com/library/d...lp/html/dggrfOLEDBProviderforVisualFoxPro.asp
 
K

Kevin Spencer

Well, John, as I mentioned before, it looks like the driver wasn't installed
properly. The error message indicates that it isn't registered. Every COM
component on a given machine must be registered with the System Registry in
order to be used by a client app. That was why I asked what you meant by
"installed." You can't simply copy the DLL to the machine. That's one of the
improvements in .Net.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

John Smith said:
I would like to avoid ODBC if at all possible. But... I did try it just to
see if the driver would work for me and it did work. But much like Kevin
stated I would really prefer to not use odbc. Any idea why it would work
forcing the provider to use an odbc dsn vs. straight oledb? Any ideas what
I can do to get the other connection to work? I could potentially be
dealing with 10K's - 100K's of records at any one point and would like to
use the faster connection.

the connection string that worked for me: "Provider=VFPOLEDB.1;DSN=myData"


Kevin Spencer said:
You really want to avoid using ODBC if at all possible ODBC is a wrapper for
OLE DB, which makes it much slower, as a System DSN is a registry entry
which must be read in order to use it, and of course, you have the overhead
of using a wrapper instead of OLE DB directly.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

Eliahu said:
have you tried to use the DSN? You can register your data source as
odbc
and
use the odbc driver ..


Database Software: FoxPro 7

I installed the VFPOLEDB.DLL for FoxPro 8. The software vendor uses
VFP
7
for their database and I want to connect to it to generate custom reports
through asp.net (vb). I tried to connect to the database and get the
error
message below. I even tried to manually registering VFPOLEDB.DLL
and
the
register succeeded. Any ideas? I have search all day trying to find the
solution to this, so far I have had no success. Any help would be much
appreciated.

--------------------------------------------------
CONNECTION STRING:
--------------------------------------------------
Connection String: "Provider=VFPOLEDB.1;Data Source='c:\data';Collating
Sequence=general"

--------------------------------------------------
ERROR MESSAGE:
--------------------------------------------------
Server Error in '/MeetingReports' Application.

No error information available: REGDB_E_CLASSNOTREG(0x80040154).
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: No error information
available: REGDB_E_CLASSNOTREG(0x80040154).

Source Error:

Line 73:
Line 74: '*** Fill DataSet with the current returned records ***
--> Line 75: objOleDbDataAdapter.Fill(objDataSet, DataTableName)
Line 76:
Line 77: '*** Fill DataGrid Control with DatatTable ***

Source File: c:\inetpub\wwwroot\xxx\0.aspx.vb Line: 75

Stack Trace:

[OleDbException (0x80040154): No error information available:
REGDB_E_CLASSNOTREG(0x80040154).]

[InvalidOperationException: The 'VFPOLEDB.1' provider is not
registered
on
the local machine.]
System.Data.OleDb.OleDbConnection.CreateProviderError(Int32 hr) +81
System.Data.OleDb.OleDbConnection.CreateProvider(OleDbConnectionString
constr) +107
System.Data.OleDb.OleDbConnection.Open() +203
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
+36
MeetingReports._0.PopulateDataGridControl(DataGrid DataGridControl,
String sqlStatement, String DataTableName) in
c:\inetpub\wwwroot\xxx\0.aspx.vb:75
xxx._0.popDataGrid(DataGrid DataGridControl) in
c:\inetpub\wwwroot\xxx\0.aspx.vb:114
xxx._0.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\xxx\0.aspx.vb:26
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

Version Information: Microsoft .NET Framework Version:1.1.4322.573;
ASP.NET
Version:1.1.4322.573














Hi John,

You can read about the OLE DB Driver for Visual FoxPro at the following
URL:
http://msdn.microsoft.com/library/d...lp/html/dggrfOLEDBProviderforVisualFoxPro.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top