Re: Database Problem

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

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

Search



Quick Links

User menu

Not signed in.

Misc Menu