Re: Database Problem
- Posted by DerekParnell (admin) Feb 07, 2011
- 1605 views
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.

