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();

VulpesRank #55 · 29.2K reputationPosted Mar 16, 2013, 4:27 PM EDT
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
richard smithRank #8,268 · 225 reputationPosted Mar 15, 2013, 2:28 PM EDT
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?
VulpesRank #55 · 29.2K reputationPosted Mar 15, 2013, 3:54 PM EDT
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 smithRank #8,268 · 225 reputationPosted Mar 15, 2013, 5:48 PM EDT
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?
richard smithRank #8,268 · 225 reputationPosted Mar 16, 2013, 5:04 PM EDT
richard smithRank #8,268 · 225 reputationPosted Mar 16, 2013, 5:35 PM EDT
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?
VulpesRank #55 · 29.2K reputationPosted Mar 17, 2013, 9:04 AM EDT