Re: Microsoft Jet SQL Reference
- From: "Michel Walsh" <vanderghast@VirusAreFunnierThanSpam>
- Date: Thu, 13 Oct 2005 16:34:40 -0400
Hi,
Try ADO, not DAO (not the designer built around DAO). As example, in the
Immediate Window:
CurrentProject.Connection.Execute "CREATE TABLE Customers (CustId INTEGER
PRIMARY KEY, CLstNm NCHAR VARYING (50)) "
work quite fine.
Using DAO won't work, as you can try with
CurrentDb.Execute "CREATE TABLE Customers2 (CustId INTEGER PRIMARY KEY,
CLstNm NCHAR VARYING (50)) "
Most of Jet 4.0 extensions require ADO, and don't work with DAO. You can
mix the use of DAO and ADO, but sure, there can be some problem, such as
transactions that are maintained independently on each "system", in general.
Hoping it may help,
Vanderghast, Access MVP
"Chris Smith" <ChrisSmith@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B55F8C82-6968-44DF-A3F4-ED4094D17847@xxxxxxxxxxxxxxxx
>I can locate help with subject topic in my local Access 2003 documentation,
> but it's nowhere to be found on msdn.microsoft.com. Please send link.
> Lots of non-relevant stuff when I searched on MSDN, though.
> I'm quite challenged by the CONSTRAINT clause documentation. In
> particular,
> this example from the documentation doesn't seem to work:
> -8<--------8<------
> You can specify actions to be performed on the foreign table based on a
> corresponding action performed on a primary key in the table on which the
> CONSTRAINT is defined. For example, consider the following definition for
> the
> table Customers:
> CREATE TABLE Customers (CustId INTEGER PRIMARY KEY, CLstNm NCHAR VARYING
> (50))
>
>
> Consider the following definition of the table Orders, which defines a
> foreign key relationship referencing the primary key of the Customers
> table:
>
> CREATE TABLE Orders (OrderId INTEGER PRIMARY KEY, CustId INTEGER,
> OrderNotes
> NCHAR VARYING (255), CONSTRAINT FKOrdersCustId FOREIGN KEY (CustId)
> REFERENCES Customers ON UPDATE CASCADE ON DELETE CASCADE
> ---8<-------8<-----
>
> Even s/NCHAR VARYING (255)/VARCHAR(255)/ just got me to a parse error in
> the constraint clause.
> Basically, I'm writing my database as a text file, and doing some
> hack-tackular stuff to it in a script, such that it builds against
> MSAccess,
> or SQLServer, but the Jet4.0 SQL DDL seems to suffer from a popularity
> deficit...
> Thanks,
> Chris
>
>
.
- Follow-Ups:
- Re: Microsoft Jet SQL Reference
- From: david epsom dot com dot au
- Re: Microsoft Jet SQL Reference
- Prev by Date: Re: "Effective Date" Criteria for Rates
- Next by Date: Truncated text
- Previous by thread: RE: Microsoft Jet SQL Reference
- Next by thread: Re: Microsoft Jet SQL Reference
- Index(es):
Relevant Pages
|
Loading