New topic: PostgreSQL Statement Issue
<http://forums.realsoftware.com/viewtopic.php?t=43304> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message Jason_Adams Post subject: PostgreSQL Statement IssuePosted: Fri Mar 23, 2012 12:20 pm Joined: Fri Nov 10, 2006 4:10 pm Posts: 1547 Location: Michigan, USA Can someone see something wrong with this: Code: Dim Record As RecordSet Dim Statement As PostgreSQLPreparedStatement Statement = PostgreSQLPreparedStatement(DB.Prepare("SELECT currval(pg_get_seral_sequence( $1 , $2 ));")) Statement.Bind(0, TableName) Statement.Bind(1, ID) Record = Statement.SQLSelect If DB.Error Then Return -1 Return Record.Field("currval").Value When I use this code the SQL $1 and $2 values become "unknown". I know that TableName and ID have values. I must be doing something wrong with my prepared statement, but I just can't see it. Thanks! _________________ Windows 7 Ultimate x64 Windows XP Pro SP3 Ubuntu 11.04 via Virtual Box RS Enterprise 2011r4 Programming Tutorials & Free Projects: http://www.JasonTheAdams.com "Christianity has not been tried and found wanting; it has been found difficult and not tried." - G.K. Chesterton 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]
