473,414 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Is there an SQL equivalent in MS Access for the MySQL command "showcolumns in tablename?"

Dan
Hello, all!

New here, so please forgive if this has been answered before. I use
MySQL most often, and can use the commands:

show tables in [databasename];
show columns in [tablename];

which lists all the tables in the specified database, and columns/
fields in the specified table. Is there an SQL equivalent for use in
MS Access 97? I use that at work, and it'd be helpful to be able to
do. I'd also prefer straight SQL, if possible, and shy away from VBA.

Thanks!

Dan
Dec 31 '07 #1
2 2720
Dan wrote:
Hello, all!

New here, so please forgive if this has been answered before. I use
MySQL most often, and can use the commands:

show tables in [databasename];
show columns in [tablename];

which lists all the tables in the specified database, and columns/
fields in the specified table. Is there an SQL equivalent for use in
MS Access 97? I use that at work, and it'd be helpful to be able to
do. I'd also prefer straight SQL, if possible, and shy away from VBA.

Thanks!

Dan
Not really. From the database window you can select from the menu
Tools/Analyze.

Or write a rountine
Sub ListTables
Dim tdf As TableDef
For Each tdf In CurrentDb.TableDefs
Debug.Print tdf.name
End If
Next
MsgBox "done"
End Sub

Sub ListTablesAndFields()
Dim tdf As TableDef
Dim fld As Field
For Each tdf In CurrentDb.TableDefs
Debug.Print tdf.name
For Each fld In tdf.Fields
Debug.Print fld.name
Next fld
Exit For
Next
MsgBox "done"
End Sub

Married
http://www.youtube.com/watch?v=LIwC96ZHHSM
Dec 31 '07 #2
Dan <da*@ecorry.comwrote in news:f08bbdc4-3671-422f-bc60-ced27ba0cf14
@e25g2000prg.googlegroups.com:
Hello, all!

New here, so please forgive if this has been answered before. I use
MySQL most often, and can use the commands:

show tables in [databasename];
show columns in [tablename];

which lists all the tables in the specified database, and columns/
fields in the specified table. Is there an SQL equivalent for use in
MS Access 97? I use that at work, and it'd be helpful to be able to
do. I'd also prefer straight SQL, if possible, and shy away from VBA.

Thanks!

Dan
Interesting post. My news-client shows that you posted it today and that
Salad answered it yesterday. Now that's Promptness

I can't remember a lot about Access 97.

It seems to me that

SELECT Name FROM mSysObjects
WHERE Type = 6"

returns the names of Linked Tables
so I guess that

SELECT Name FROM mSysObjects
WHERE Type = 6"
OR Type = some other number

will give all the table names.

Further, (beyond suspecting) I'm guessing you could mess with the MSys
Tables and get a column list too.

I have never pursued this because Access 97 gave a nice view of all user
tables in the database window and of the columns of any table in table
design view.
So why run SQL to get something that's already there?

--
lyle fairfield
Dec 31 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: LRW | last post by:
I'm not exactly sure how to even ask the question, and I know my terminology is not good as I'm a SQL beginner, but, here goes. I need to find a way to make an if statement within an array...or,...
3
by: Phil Powell | last post by:
I need to find a PHP equivalent to a very familiar TCL command "subst" (see http://www.hume.com/html84/mann/subst.html ). This command will take a string and evaluate anything TCL inside of it...
5
by: pekka niiranen | last post by:
Does anybody know Python recipe for changing the date of the directory or files in W2K to current date and time? In UNIX shell command "touch" does it. -pekka-
2
by: hch | last post by:
dataAdapter.Update(data, "TableName") won’t work! I was about to deploy my first website on the Internet only to discover that the dataAdapter.Update() throws the Server Error in the third...
1
by: techBoy | last post by:
I installed MySQL4.0. No for creating a databse the help says like go to "mysql>" prompt and then enter some commands. How do I get this prompt ??
1
by: poggle.themammal | last post by:
The python tutorial says "When the script name is given as '-' (meaning standard input), sys.argv is set to '-'. When -c command is used, sys.argv is set to '-c'. " but when we use a command say...
5
by: davehansen22 | last post by:
Is there a way to generate a MySQL WHERE clause from a search string like this: "(dave OR hansen) php programmer" I would want to use the generated MySQL clause against a "memo" type field. ...
3
by: Lord0 | last post by:
Hi there, First of all I apologise for being a PHP noob. Is there a PHP equivalent of Java's Jasper Reports? http://jasperforge.org/sf/projects/jasperreports Basically Jasper is a bunch...
2
by: dstork | last post by:
Anyone know how to rename the "Exit Access" command at the bottom of the Office menu. I'd like to rename it to "Exit" as I had done in previous versions of Access. I know I can disable it with ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.