Nem próbáltam, de talán így megy:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Data.OleDb;
using System.Data;

namespace SqlFromAccess
{
    class Program
    {
        static void Main(string[] args)
        {
            foreach (var i in new DirectoryInfo(".").GetFiles("*.mdb"))
            {
                string connString =
@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + i.FullName;
                using (var conn = new OleDbConnection(connString))
                {
                    conn.Open();
                    string[] restrictions = new string[] { null, null,
"myQuery" };
                    DataTable schema = conn.GetSchema("Views",
restrictions);

                    foreach (var j in schema.Rows)
                    {
                        DataRow row = (DataRow)j;
                        string queryText = (string)row["VIEW_DEFINITION"];
                        Console.WriteLine(queryText);
                    }
                }
            }
        }
    }
}

2015. április 12. 23:23 Fodor Zsolt írta, <[email protected]>:

> On Sun, 12 Apr 2015 23:17:31 +0200, Nits László wrote
> > MDB fájlok neveit így kérdezd le:
> >
> > foreach (var i in new DirectoryInfo(".").GetFiles("*.mdb"))
> >             {
> >                .....   i.FullName  ......
> >             }
>
> Kösz az a következő lépés lett volna, egy fájlra közben működésre bírtam.
>
> Meglepett, hogy Views-al kell lekérdezni a lekérdezéseket.
>
> Még egyszer kösz. Fog ez menni. :)
>
> Üdv: Fodor Zsolt
>
> _______________________________________________
> Techinfo mailing list
> [email protected]
> Fel- és leiratkozás: http://lista.sulinet.hu/mailman/listinfo/techinfo
> Illemtan: http://www.szag.hu/illemtan.html
> Ügyfélszolgálat FAQ: http://sulinet.niif.hu/
>
_______________________________________________
Techinfo mailing list
[email protected]
Fel- és leiratkozás: http://lista.sulinet.hu/mailman/listinfo/techinfo
Illemtan: http://www.szag.hu/illemtan.html
Ügyfélszolgálat FAQ: http://sulinet.niif.hu/

válasz