Re: Database Problem
- Posted by Lone_EverGreen_Ranger Feb 07, 2011
- 1325 views
DerekParnell said...
petelomax said...
I've always done this
if open database fails then if create database fails then fatal/abort/message/return end if end if -- There is technically no need to select the database here, though it is wise -- and costs little to do so at the start of any code block accessing the db. if select table fails then if create table fails then fatal/abort/message/return end if end if -- read/write/close/whatever
Yes, that is a better method.
The 'create_table' was probably failing because the table already existed from an earlier run of the program.
Thanks for the help, I got it.