Stored queries in Microsoft Access Databases
I need to retrieve the source SQL of a stored query in a Microsoft Access 97 database. (For you SQL Server users, an Access "stored query" is the equivalent of a SQL Server "View") This was easy to do in VB6 (via DAO or ADOX), but I cannot find a way to do it in .NET via OLEDB.
Here is VB6/DAO code to retrieve the SQL statement:
Set dbs = OpenDatabase("c:\temp\Northwind.mdb")
strSQL = dbs.QueryDefs("qryAllFemaleEmployees").SQL
If it helps, here is a link to how to do it in ADOX: http://msdn.microsoft.com/library/de...adocreateq.asp
Now if I can just figure it out in .NET! Any help would be greatly appreciated.