Re: Database Problem

new topic     » goto parent     » topic index » view thread      » older message » newer message
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.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu