Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 3 of 3 total |
Problem querying the Information database |
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 Team Elevate | 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, 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 |