Types of Data

S

Scott Clifford

I think you should be able to do this by selecting
Tools - Analyzer - Documenter on the Access 2000 menus. I
have only used this in 97 and 2. I found I needed to be
selective on what I included in the output or I generated
a mountain of paper.

Regards
Scott
 
M

Murillo Augusto Santos Duarte

It was not this what I'm looking for. I want to know how
define types of data. Exemple: fields of text i define
like CHAR in SQL, numbers I define like INTEGER.
I do't know how define hyperlinks, money units, etc..
using SQL Language. This is what I want to know.
 
A

Allen Browne

This article lists the data types to use in DDL statements:
http://support.microsoft.com/default.aspx?scid=kb;en-us;180841&Product=acc2000

If you are working with Jet tables and using ADO, this example illustrates
most of the available options:

Sub CreateTableDDL()
'Purpose: Create two tables, their indexes and relation.
Dim cmd As New ADODB.Command
Dim strSql As String

'Initialize
cmd.ActiveConnection = CurrentProject.AccessConnection

'Create the Contractor table.
strSql = "CREATE TABLE tblDdlContractor " & _
"(ContractorID COUNTER CONSTRAINT PrimaryKey PRIMARY KEY, " & _
"Surname TEXT(30) WITH COMP NOT NULL, " & _
"FirstName TEXT(20) WITH COMP, " & _
"Inactive YESNO, " & _
"HourlyFee CURRENCY DEFAULT 0, " & _
"PenaltyRate DOUBLE, " & _
"BirthDate DATE, " & _
"Notes MEMO, " & _
"CONSTRAINT FullName UNIQUE (Surname, FirstName));"
cmd.CommandText = strSql
cmd.Execute
Debug.Print "tblDdlContractor created."

'Create the Booking table.
strSql = "CREATE TABLE tblDdlBooking " & _
"(BookingID COUNTER CONSTRAINT PrimaryKey PRIMARY KEY, " & _
"BookingDate DATE CONSTRAINT BookingDate UNIQUE, " & _
"ContractorID LONG REFERENCES tblDdlContractor (ContractorID) " & _
"ON DELETE SET NULL, " & _
"BookingFee CURRENCY, " & _
"BookingNote TEXT (255) WITH COMP NOT NULL);"
cmd.CommandText = strSql
cmd.Execute
Debug.Print "tblDdlBooking created."
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top