I know how to open a database via OLEDBConnection, I just don't know how to select data from tables (or 2 tables for that matter!)or how to save the query once I have it built out.
OleDbConnection olecon = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + databaseNamae);
olecon.Open();
VulpesPosted Mar 16, 2013, 8:27 PM
If you want to try that, there's a Microsoft Support article here which shows how to run an Office macro using C#:
http://support.microsoft.com/kb/306683
VulpesPosted Mar 17, 2013, 1:04 PM
richard smithPosted Mar 16, 2013, 9:35 PM
http://msdn.microsoft.com/en-us/library/bb339670.aspx
Could that be modified to create the query in access or am I reading how this works incorrectly?
richard smithPosted Mar 16, 2013, 9:04 PM
richard smithPosted Mar 15, 2013, 9:48 PM
Something similar to this terrible pseudocode should work (or at least I think)
But how to actually save that SELECT statement as a query in access?
VulpesPosted Mar 15, 2013, 7:54 PM
The following MSDN links may be helpful:
http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbdatareader(v=vs.100).aspx
http://msdn.microsoft.com/en-GB/library/system.data.oledb.oledbdataadapter(v=vs.100).aspx
richard smithPosted Mar 15, 2013, 6:28 PM
Now I am still stuck on 2 questions...how to save the query...and how to append the results of another query to the end of this query?