Changeset 5950 for trunk/glueforge/templates/psdb/insert_c.tt
- Timestamp:
- Jan 6, 2006, 6:46:10 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/glueforge/templates/psdb/insert_c.tt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/glueforge/templates/psdb/insert_c.tt
r5907 r5950 7 7 int main () 8 8 { 9 psDB *dbh; 9 [% FOREACH table = tables -%] 10 { 11 psDB *dbh; 10 12 11 dbh = psDBInit("localhost", "test", NULL, "test");12 if (!dbh) {13 exit(EXIT_FAILURE);14 }13 dbh = psDBInit("localhost", "test", NULL, "test"); 14 if (!dbh) { 15 exit(EXIT_FAILURE); 16 } 15 17 16 if (![% table.namespace %]Insert(dbh,18 if (![% table.namespace %]Insert(dbh, 17 19 [%- SET i = 0 -%] 18 20 [%- FOREACH item = table.columns -%] … … 20 22 [%- END -%] 21 23 )) { 22 exit(EXIT_FAILURE); 24 exit(EXIT_FAILURE); 25 } 26 27 psDBCleanup(dbh); 23 28 } 24 29 25 psDBCleanup(dbh); 26 30 [% END -%] 27 31 exit(EXIT_SUCCESS); 28 32 }
Note:
See TracChangeset
for help on using the changeset viewer.
