Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 4 of 4 total |
For Tim: COLLATE parameter, small inconsistency |
Sun, Nov 14 2010 1:19 PM | Permanent Link |
Lucian | Hi Tim,
I noticed that the documentation (edb2sql.pdf) mentions that for COLLATION we would use the quoted form, i.e.: COLLATE "ENU_CI" (this is straight from page 26) ... however, when reverse-engineering a database, EDB Manager would spit out COLLATION for procedure/function in un-quoted format (.i.e COLLATE ENU_CI). Everywhere else looks consistent. Also it seems that both forms quoted and unquoted work, when it comes to creating procedures/functions... I am using TextDiff to compare some scripts and the only differences I get are this things, that's how I found it. I'd like to know what's the form that is supposed to be definitive... regards, Lucian |
Tue, Nov 16 2010 5:22 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Lucian,
<< I noticed that the documentation (edb2sql.pdf) mentions that for COLLATION we would use the quoted form, i.e.: COLLATE "ENU_CI" (this is straight from page 26) ... however, when reverse-engineering a database, EDB Manager would spit out COLLATION for procedure/function in un-quoted format (.i.e COLLATE ENU_CI). Everywhere else looks consistent. >> This is due to the fact that EDB doesn't actually generate the COLLATE clauses for parameters and variables in a procedure/function body definition, so they stay the same as when they were originally defined. << Also it seems that both forms quoted and unquoted work, when it comes to creating procedures/functions... I am using TextDiff to compare some scripts and the only differences I get are this things, that's how I found it. I'd like to know what's the form that is supposed to be definitive... >> It doesn't really matter - quoted identifiers (double-quotes) are simply used for situations where the identifier contains characters that conflict with normal operators and other tokens, and collations never run into this situation since they always use alpha characters and underscores only. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Nov 16 2010 1:12 PM | Permanent Link |
Lucian | Allright thanks ... Another minor thing, I'm reviewing some old DBISAM code I have and I got this code handling exception like this (in a try-except of course):
DBISAM_OSENOENT: raise Exception.Create('Cannot create temporary files'); DBISAM_OSEACCES: raise Exception.Create(Format( 'System error. Access denied to file %s', [Name])); Is there something like that in EDB, or if not, what would be the best way to deal specifically with these 3 kind of problems? |
Wed, Nov 17 2010 2:06 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Lucian,
<< Allright thanks ... Another minor thing, I'm reviewing some old DBISAM code I have and I got this code handling exception like this (in a try-except of course): DBISAM_OSENOENT: raise Exception.Create('Cannot create temporary files'); DBISAM_OSEACCES: raise Exception.Create(Format( 'System error. Access denied to file %s', [Name])); Is there something like that in EDB, or if not, what would be the best way to deal specifically with these 3 kind of problems? >> In ElevateDB, these types of errors (external file access errors at the OS level) are all covered by the: EDB_ERROR_FILEMANAGER = 600; error code (edberror unit). The possible error messages are (edbconsts unit): EDB_ERRSTR_FILEMANAGER = TEDBString('File manager error (%s)'); EDB_ERRSTR_FILEMANAGER_CREATE = TEDBString('Cannot create file %s (OS Error: %s)'); EDB_ERRSTR_FILEMANAGER_OPEN = TEDBString('Cannot open file %s (OS Error: %s)'); EDB_ERRSTR_FILEMANAGER_ACCESS = TEDBString('Access denied to the file %s'); EDB_ERRSTR_FILEMANAGER_NOTFOUND = TEDBString('File %s not found'); EDB_ERRSTR_FILEMANAGER_RENAME = TEDBString('Cannot rename the file %s to %s (OS Error: %s)'); EDB_ERRSTR_FILEMANAGER_DELETE = TEDBString('Cannot delete the file %s (OS Error: %s)'); -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |