![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Sun, Mar 14 2010 5:59 AM | Permanent Link |
Richard ENT Technologies | This query always returns 0:
Session.Execute('Select * from Information.TableColumns where TableName = ' + Engine.QuotedSQLStr('Table1') + ' and Name = ' + Engine.QuotedSQLStr('Fax')); I know the field exists, because when I execute: Database.Execute('ALTER TABLE Table1 ADD Fax VARCHAR(20) COLLATE "ANSI_CI"') It tells me that the column 'Fax' already exists. What have I done wrong here? Thanks. |
Sun, Mar 14 2010 6:16 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Richard
>Session.Execute('Select * from Information.TableColumns where TableName = ' + Engine.QuotedSQLStr('Table1') + >' and Name = ' + Engine.QuotedSQLStr('Fax')); Here you're querying the configuration database and >Database.Execute('ALTER TABLE Table1 ADD Fax VARCHAR(20) COLLATE "ANSI_CI"') here you're altering a table in your database. What you need is Datbase.Execute('Select * from Information.TableColumns where TableName = ' + Engine.QuotedSQLStr('Table1') +' and Name = ' + Engine.QuotedSQLStr('Fax')); Roy Lambert [Team Elevate] |
Sun, Mar 14 2010 6:46 AM | Permanent Link |
Richard ENT Technologies | > Roy Lambert wrote:
> > What you need is > Datbase.Execute('Select * from Information.TableColumns where TableName = ' + > Engine.QuotedSQLStr('Table1') +' and Name = ' + Engine.QuotedSQLStr('Fax')); Fixed. Thanks. |
This web page was last updated on Tuesday, July 1, 2025 at 07:22 PM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |