473,507 Members | 6,295 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting the data types and sizes from Access

1 New Member
I would like to write an SQL query that would bring back a list of all the tables, fields, data types and sizes in Access. I can do this in SQL server but cannot find the field information in the hidden tables.

Any ideas would be appreciated.

Kind regards

PeterF
Oct 15 '06 #1
1 1244
MMcCarthy
14,534 Recognized Expert Moderator MVP
If you just need the information you can retrieve it using the documenter.

Tools - Analyse - Documenter

Highlight the tables you want and the documenter will create a report showing this information. Make sure you change the options.

If you need an actual table you will need to use a function similar to the one below:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Function TableStructure(tblName As String)
  3. Dim db as Database
  4. Dim rs as Recordset
  5. Dim i as Integer
  6.  
  7.     Set db = CurrentDb
  8.     Set rs = db.OpenRecordset("TableToStoreValues")
  9.  
  10.     For i = 0 To db.tabledefs(tblName).Fields.Count - 1
  11.         rs.AddNew
  12.         rs!TableName = tblName
  13.         rs!FieldName = db.tabledefs(tblName).Fields(i).Properties(4).Value
  14.         rs!FieldSize = db.tabledefs(tblName).Fields(i).Properties(3).Value
  15.     Next i
  16. End Sub
  17.  
  18.  
I would like to write an SQL query that would bring back a list of all the tables, fields, data types and sizes in Access. I can do this in SQL server but cannot find the field information in the hidden tables.

Any ideas would be appreciated.

Kind regards

PeterF
Oct 15 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

80
5181
by: Bibby | last post by:
Hi, I'm interested in getting started in the programming world. I've dabbled in C, C++ and VB6. Which would be the best language to focus my attention to regarding the following considerations: ...
8
1787
by: Kyle Kolander | last post by:
Sorry, I sent this to comp.std.c++ and meant to send it here as well... Why are the minimum size guarantees for fundamental types intentionally omitted from section 3.9.1 Fundamental types of...
6
22489
by: Martin | last post by:
I'd like to be able to get the name of an object instance from within a call to a method of that same object. Is this at all possible? The example below works by passing in the name of the object...
26
11971
by: Kip | last post by:
Greetings everyone, Is there anyone here who could point me to a page or pdf that has a list of the sizes of all of the C primitive data types on various implementations such as SPARC, x86,...
12
3407
by: siliconwafer | last post by:
Who decides size of data types in C? Is it the: 1.C standard and hence the compilers 2.Operating System.
33
11809
by: JamesB | last post by:
I am writing a service that monitors when a particular app is started. Works, but I need to get the user who is currently logged in, and of course Environment.UserName returns the service logon...
159
6115
by: Bob Timpkinson | last post by:
Hi, I have a 32-bit machine... Is there anyway I can get gcc to use the following integer sizes? char: 8 bits short: 16 bits int: 32 bits long: 64 bits long long: 128 bits
3
2372
by: sophia.agnes | last post by:
Dear all, what are the major expression types in c? i have seen the following types of expressions 1) constant expressions 2) integral expressions 3) float expressions 4) pointer...
4
1659
by: jehugaleahsa | last post by:
Hello: Say I were to query the schema tables from a database management system. Say I got a DataType field that held the string 'VARCHAR2'. Now, I know that VARCHAR2 associates to System.String....
0
7220
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7371
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7023
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
5617
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,...
1
5037
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
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...
0
3188
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1534
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
410
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.