Reputation: 1013
I want to create a CSV file from our Sage Abra Suite database using C#. At this point I am just trying to make a connection to it and having difficulty to create one and to test it.
I have a Visual Studio 2010 installed, and the table that I want to access is resided on the server (called it Server1). As far as I know the database that the Sage Abra uses is VisualFoxPro
So I need help right now to how to create the database connection and testing the connection in C#.
Upvotes: 2
Views: 649
Reputation: 1013
Ended up using a connection string
// Build the connection string
string connectionString = @"Provider=VFPOLEDB.1;Data Source= myServer;Collating Sequence=general";
// Create the connection
OleDbConnection connection = new OleDbConnection(connectionString);
// Open the connection
connection.Open();
Upvotes: 1