Re: How do I issue SQL to a Access database from command line

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Douglas J. Steele (NOSPAM_djsteele_at_NOSPAM_canada.com)
Date: 10/08/04


Date: Fri, 8 Oct 2004 15:16:06 -0400

Mary's answered most of your questions, but to answer your last question,
you can query the (normally hidden) MSysObjects table.

SELECT MSysObjects.Name AS TableName
FROM MSysObjects
WHERE (((MSysObjects.Type)=1)
AND ((MSysObjects.Flags)=0));

will give you all of the tables in the database. Type = 6 will give you all
linked tables, Type = 4 will give you all tables linked through ODBC, and
Type = 5 will give you the queries.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Karen Middleton" <karenmiddleol@yahoo.com> wrote in message
news:a5fd468a.0410080253.5f885c9e@posting.google.com...
> Sorry, I am used to Oracle and SQL Server where we use a command
> window like SQLPLUS or ISQL/W which will enable me to run SQL commands
> against the database.
>
> The View > SQL option is very cumbersome in Access is there a simple
> command line tool that I use to issue any SQL statement against a
> Access database that can execute the query and return the results.
>
> Also, is there a SQL command to find out all Table names in a Access
> database and all queries(views) in a Access database.
>
> Thanks
> Karen


Relevant Pages

  • Re: How I can sysnchronize changes in DataTable with my Database?
    ... Normaly we a not able to made changes when is no connection. ... I like SQL but I would like to learn some other approach to change data. ... >> What is the purpose of this apporach if we use plain SQL commands? ... > the database within a single method call. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Add rows to top of existing spreadsheet
    ... what the SQL query I posted does is to "select" 5 lines ... as well as a list of the queries in your database. ... The MsysObjects table is a internal table that Access uses to keep ...
    (comp.databases.ms-access)
  • Re: TADOStoredProc
    ... Every time you add to the SQL it sends those changes back to the database. ... (I don't hit this since I build all my SQL commands in a single delphi string for logging & timing purposes) ...
    (borland.public.delphi.database.ado)
  • Re: OT: database advice
    ... > I understand about what sql is and isn't. ... Mysql and postgresql both include commands to dump a database in ... the form of the sql commands to reconstruct it (create the tables ... or between updates that change the table storage format. ...
    (Fedora)
  • Re: Password protect access DB?
    ... database has to be local because I am distributing this with my application. ... sent sql commands to it via vb.net code? ... If security is your goal, Access is not the product you want to use. ... I'm not saying Sql Server is ...
    (microsoft.public.dotnet.languages.vb)