Page 1 of 1

SQLite - Creating A Table

Posted: Mon Oct 27, 2008 3:12 pm
by warrenk
I am trying to create a table using the following code (see below). I am able to create the database without any problems. The program seems to fail on the revExecuteSQL command with the following error:

stack "Untitled 2": execution error at line 11 (Function: error in function handler) near "revExecuteSQL", char 8

When i check the values in tSQL and gConID I am getting:

CREATE TABLE supplier(id integer primary key, name text, address1 text, address2 text, city text, province text, postal text),18

Am I missing something?

Thanks for any help!
Warren

on openstack
global gConID
put revopendatabase("sqlite","az.db",,,,,,) into gConID
if gConID is "" then
answer warning "Problem creating or accessing database!"
else
answer information "Connection Successful!"
end if
put "CREATE TABLE supplier(id integer primary key, name text, address1 text, address2 text, city text, province text, postal text)" into tSQL
answer tSQL, gConID
revExecuteSQL(gConID, tSQL)
-- tTmp will contain the number of tables you've added
handleRevDBerror tTmp
if the result is not empty then
answer warning the result
end if
end openstack

Posted: Mon Oct 27, 2008 3:22 pm
by Paul D
hmm... i dont think the revExecuteSQL uses parentheses.

revExecuteSQL gConID, tSQL

maybe?

Posted: Mon Oct 27, 2008 3:28 pm
by warrenk
Paul,

Looks like your right...figured it was something stupid on my part. Thanks for your help! :lol:

Warren