On 10/01/08 13:52, Benjamin Ducke wrote:
OK, I have it almost working except for one annoyance:If the table already exists, then --o should allow the user to overwrite it. Thus, I check for that flag and delete the old table, if it exists, using: db_delete_table ( connection.driverName, connection.databaseName, new->answer ); But even so, the next call to db_execute_immediate() complains about the table still being there and creation of the new table fails. I suppose that db_delete_table() does not delete the table immediately?
db_delete_table() sends a "drop table XYZ" sql query to the database backend, so it should delete the table. Launching echo "drop table ggg" | db.execute followed by echo "create table ggg (cat int, value double)" | db.execute works without a problem. What does db_delete_table return ? Moritz _______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
