Article View: borland.public.cppbuilder.database.ado
Article #3340Re: Problems creating Access table
From: Bob Leschhorn
Date: Tue, 24 Sep 2002 15:53
Date: Tue, 24 Sep 2002 15:53
72 lines
3654 bytes
3654 bytes
I use ADOX with MDAC 2.6 but I just use it to create the database (JET 4.0) only because the CREATE DATABASE is not supported. I create the table(s) with SQL - works a treat. How about just trying a shorter SQL string - create less fields - and see if it works and if not post your SQL here? Rgds, Bob "Mike Ruskai" <spamten.knilhtrae@begonedynnaht.net> wrote in message news:gunaalqrneguyvaxarg.h2w4ig0.pminews@207.105.83.65... > When I had MDAC 2.5 installed, I discovered that creating a table with > Unicode compression via SQL was impossible (the "WITH COMPRESSION" key words, > though documented, were not implemented). > > So, I used ADOX to create the database and tables. Worked fine. > > Now I've installed MDAC 2.7, and find that the ADOX method doesn't work > anymore. Everything seems to work - no error messages of any kind - but the > tables themselves are not created. The call to Catalog->Tables->Append() > does not throw an exception, and worked perfectly fine before, but now does > apparently nothing. The tables are not created. > > To make sure I knew what I was talking about in another discussion, I tested > the "WITH COMPRESSION" key words with MDAC 2.7, since someone who posted here > said they work (which they don't, if using MDAC 2.5). Sure enough, with MDAC > 2.7, Unicode compression via SQL is possible. > > So, I figure I'll just go back to the way I was originally going to do it - > create the table via SQL. > > But it doesn't work. An exception complaining about field definition syntax > is thrown. So, I cut and paste the (rather long) SQL string into Access, and > it points to the location of the error - using a type named BOOLEAN. This > appears, once again, to be a conflict between MS documentation and MS code. > BOOLEAN is documented as an alias for BIT, YESNO, etc. If I replace BOOLEAN > with BIT, it works (minus WITH COMPRESSION, of course, because that still > doesn't work in Access itself). > > Make the change in code, and find that I still get an exception. I kill the > WITH COMPRESSION in code, try again, and get an exception. I cut and paste > into Access, and the table is created. > > Anyone know why SQL would work in Access but not via ADO? I even got rid of > the BIT type completely, replacing it with SMALLINT. Made no difference. > > If necessary, I can post the entire SQL string, but it's a tad long (over 50 > fields are created). > > > -- > - Mike > > Remove 'spambegone.net' and reverse to send e-mail. > >
Technical Details
Message-ID:
<3d908a88$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!intgwlon.nntp.telstra.net!news.telstra.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<gunaalqrneguyvaxarg.h2w4ig0.pminews@207.105.83.65>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,a47ae103ca96654c,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-09-24 09:06:07 PST Reply-To: "Bob Leschhorn" <blesch@arksoft.com> From: "Bob Leschhorn" <blesch@arksoft.com> Newsgroups: borland.public.cppbuilder.database.ado References: <gunaalqrneguyvaxarg.h2w4ig0.pminews@207.105.83.65> Subject: Re: Problems creating Access table Date: Tue, 24 Sep 2002 16:53:53 +0100 Lines: 74 Organization: Ark Software X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 62.188.59.190 Message-ID: <3d908a88$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1032882824 62.188.59.190 (24 Sep 2002 08:53:44 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!intgwlon.nntp.telstra.net!news.telstra.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail