Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 8 of 8 total |
Small SQL problem |
Wed, Feb 15 2006 12:24 PM | Permanent Link |
"Mike Saunders" | Just can't see how to fix this statement
SQL.Add('ALTER TABLE MEMORY "daily schedule" ' ); DBISAM does not like the multi word table name I thought I could enclose with double quotes Thanks Mike |
Wed, Feb 15 2006 2:28 PM | Permanent Link |
"Ralf Mimoun" | Mike Saunders wrote:
> Just can't see how to fix this statement > > SQL.Add('ALTER TABLE MEMORY "daily schedule" ' ); What DBISAM version? In 4.x, you have to write "MEMORY\daily schedule". Ralf |
Wed, Feb 15 2006 5:51 PM | Permanent Link |
"Mike Saunders" | Ralf Mimoun wrote:
> Mike Saunders wrote: > > Just can't see how to fix this statement > > > > SQL.Add('ALTER TABLE MEMORY "daily schedule" ' ); > > What DBISAM version? In 4.x, you have to write "MEMORY\daily > schedule". > > Ralf Thanks I am still on version 3 and the above does not work I'm afraid Mike |
Thu, Feb 16 2006 4:47 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Mike,
<< Just can't see how to fix this statement SQL.Add('ALTER TABLE MEMORY "daily schedule" ' ); DBISAM does not like the multi word table name I thought I could enclose with double quotes >> It should work just fine. What error are you getting ? -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Feb 16 2006 5:19 PM | Permanent Link |
"Mike Saunders" | Tim Young [Elevate Software] wrote:
> Mike, > > << Just can't see how to fix this statement > > SQL.Add('ALTER TABLE MEMORY "daily schedule" ' ); > > DBISAM does not like the multi word table name I thought I could > enclose with double quotes >> > > It should work just fine. What error are you getting ? Error message No 11949 : SQL data type keyword expected instead found 'STRING' in table column Note I am using DBISAM Version 3 The full procedure is procedure ReStructureDailySchedule; begin with DM.tbQuery do begin SQL.Clear; SQL.Add('ALTER TABLE MEMORY "Daily Schedule" '); SQL.Add('ADD MatColor STRING;'); ExecSQL; end; end; |
Thu, Feb 16 2006 5:36 PM | Permanent Link |
Jeff Cook | "Mike Saunders" <mike@folleytech.co.uk> wrote on Thu, 16 Feb 2006 17:19:11 -0500
>Tim Young [Elevate Software] wrote: > >> Mike, >> >> << Just can't see how to fix this statement >> >> SQL.Add('ALTER TABLE MEMORY "daily schedule" ' ); >> >> DBISAM does not like the multi word table name I thought I could >> enclose with double quotes >> >> >> It should work just fine. What error are you getting ? > > > >Error message No 11949 : >SQL data type keyword expected instead found 'STRING' in table column > > Note I am using DBISAM Version 3 > >The full procedure is > >procedure ReStructureDailySchedule; >begin > with DM.tbQuery do > begin > SQL.Clear; > SQL.Add('ALTER TABLE MEMORY "Daily Schedule" '); > SQL.Add('ADD MatColor STRING;'); > ExecSQL; > end; >end; Mike I think you have to use [] or something like that - I NEVER use table or field names with spaces myself ... SQL.Add('ALTER TABLE MEMORY [daily schedule] ' ); // This might work in v3 Cheers Jeff -- Jeff Cook Aspect Systems Ltd Phone: +64-9-424 5388 Skype: jeffcooknz www.aspect.co.nz |
Thu, Feb 16 2006 6:38 PM | Permanent Link |
Eryk Bottomley | Mike,
> Error message No 11949 : > SQL data type keyword expected instead found 'STRING' in table column <snip> > SQL.Add('ADD MatColor STRING;'); The error message means what it says. STRING is not a valid SQL field type. See CHAR in the help file ...and you have to specify a fixed length. Eryk |
Fri, Feb 17 2006 11:50 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Mike,
<< Error message No 11949 : SQL data type keyword expected instead found 'STRING' in table column >> What Eryk stated is correct. You need to use CHAR, not STRING: procedure ReStructureDailySchedule; begin with DM.tbQuery do begin SQL.Clear; SQL.Add('ALTER TABLE MEMORY "Daily Schedule" '); SQL.Add('ADD MatColor CHAR(10);'); ExecSQL; end; end; -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Sunday, May 5, 2024 at 07:30 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |