New topic: 

Querying PostgresSQL tables

<http://forums.realsoftware.com/viewtopic.php?t=36508>

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        StanG          Post subject: Querying PostgresSQL tablesPosted: 
Thu Dec 02, 2010 11:21 am                         
Joined: Fri Nov 26, 2010 10:07 am
Posts: 1                Hi everyone,

I've recently jumped into Real Studio with the aim to redevelop a database 
front end, but I'm having difficulty at the most basic level - just opening and 
querying tables.  I've tried referencing the tables directly several different 
ways, I finally tried the following using TableSchema and FieldSchema, 
TableSchema returns what I expect, but I cannot get FieldSchema to return 
anything but empty recordsets:

Code:  if db.Connect then
  rsTables = db.TableSchema  // rsTables shows correct table names
  do until rsTables.EOF
  tbltemp = rsTables.IdxField(1).StringValue  // debug shows correct table names
  rsFields = db.FieldSchema(tbltemp)  // returns nil recordSet  
  rsFields = db.FieldSchema(rsTables.IdxField(1).StringValue)  // and so does 
this...
  rsTables.MoveNext  // rsTables shows correctly incremented table name
  Loop
  end if



This is using the PostgreSQLDatabase plugin released with 2010r4.1 - The two 
"rsFields =" lines are examples of what I've tried, each separately with the 
same results.  Am I missing something obvious?


Thanks,
Stan   
                             Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to