Re: "If ......Exists'.... Then Run SQL code"
From: Gettingthere (Gettingthere_at_discussions.microsoft.com)
Date: 12/06/04
- Next message: Gettingthere: "To all a big THANKYOU"
- Previous message: Duane Hookom: "Re: Commission Salab"
- In reply to: Jamie Collins: "Re: "If ......Exists'.... Then Run SQL code""
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 5 Dec 2004 19:35:03 -0800
Thankyou both for the useful information, MUCH appreciated
"Jamie Collins" wrote:
> "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote ...
>
> > Here's a simple example, that just tries to set the Required property of a
> > column, but fails
>
> I was looking for a list rather than a single example :-(
>
> Anyhow, I think your example has misdiagnosed the problem i.e. this is
> a provider bug rather than an ADOX bug e.g. using the Jet 4.0 provider
> with ADODB (or Access2003 in ANSI mode) and the following DDL:
>
> CREATE TABLE MyTable (MyField INTEGER NOT NULL);
> ALTER TABLE MyTable ALTER MyField INTEGER NULL;
>
> also fails to change the column attribute to adColNullable. So I think
> we can discount your example as being a bug with ADOX.
>
> > There are numerous problems like that
> >
> > they are
> > inconsistent between versions
>
> It's not that I don't believe you, it's more a case of not being able
> to do anything with the information without you saying what the
> problems/inconsistencies actually are.
>
> I'll do the same... I checked my notes and found the 'inconsistencies'
> I alluded to earlier. I've found the provider (i.e. both ADODB and
> ADOX) for a LOGICAL (YESNO) column returns CHARACTER_MAXIMUM_LENGTH=2
> but I'm not sure why. Also, I've found a LOGICAL column may be created
> as nullable whereas in practice it cannot be null because the DEFAULT
> is always 0. So on closer examination, neither are suspected ADOX
> bugs, rather are features of the provider and/or SQL engine.
>
> Based on your anecdotal evidence and one discounted example, and
> having discounted my own examples, I still consider ADOX to be
> useable. However, my mind is open so more examples please!
>
> > The reason you still have to learn it is that it's the only way to
> > get at some of the JET 4 features, such as setting the Seed
> > of an Autonumber, or creating relations with cascade-to-null
>
> Both the examples you mentioned have DDL equivalents, meaning they can
> be used with ADODB or in the Access2003 UI when set to ANSI mode i.e.
> ADOX is not a requirement:
>
> IDENTITY(<seed>)
> ON UPDATE SET NULL ON DELETE SET NULL
>
> Now if you'd have said random or non-integer automnumbers I may have
> been in danger of agreeing with you <g>. FWIW the only occasions I use
> ADOX are to create a .mdb file and to test whether a column is has the
> IDENTITY (automnumber) property. However, I find, say, random
> automnumber columns of type CURRENCY a novelty rather than useful
> functionality.
>
> What most interests me is that you have found a practical use for
> UPDATE/DELETE TO NULL. As usual I plea: don't just tease us with a
> passing mention, share the details.
>
> Many thanks,
> Jamie.
>
> --
>
- Next message: Gettingthere: "To all a big THANKYOU"
- Previous message: Duane Hookom: "Re: Commission Salab"
- In reply to: Jamie Collins: "Re: "If ......Exists'.... Then Run SQL code""
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|