Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
McNeish Book and sample data access?
Message
From
11/09/2004 11:30:06
 
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
00941275
Message ID:
00941323
Views:
10
:-)

Getting closer - thanks for the help. I have moved a few more lines down in the code.

I am getting an unhandled exception of 'System.Data.OleDb.OleDbException'occured in system.data.dll for the line:
OleDbDataReader Reader = Command.ExecuteReader();
as used below
string ConnectionString = @"Provider=vfpoledb;Data Source=c:\datadotnet\vfp\bin\debug\samples.dbc";
/// Create the connection
OleDbConnection Connection = new OleDbConnection(ConnectionString);
/// Open the connection, access the data and close the connection
Connection.Open();
string SelectCmd = "SELECT TOP 3 LastName, FirstName, Title FROM Employees ORDER BY employeeid";
OleDbCommand Command = new OleDbCommand(SelectCmd, Connection);
OleDbDataReader Reader = Command.ExecuteReader();
Leo
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform