SQLite and Linux SQL

chris bohnert chris at altuit.com
Wed Jan 3 15:28:36 EST 2007


Jeff,

A couple of points on this:

1.) For commands that don't return a recordset you're better off calling
revdb_execute or its command variant revExecuteSQL.

2.) Orginally altSqlite checked for "select" in queries that we're asking
for rowsets to be returned because there were some pragmas that could be
executed that would crash rev.  That restriction was later removed on the
mac and windows versions.

3.) Inserts should use the revdb_execute or revExecuteSQL syntax and can do
so without incurring the pragma check

--
cb

On 1/3/07, Jeff Honken <jhonken at webdsp.com> wrote:
>
> I'm trying to figure out why the below code works great on windows for
> creating a SQLITE database but not on Linux.  On Linux I get a message
> that says "revdberr,Database Error: MUST be select SQL!"  I've read on a
> past post that I should be using "revExecuteSQL tConnectionID,
> tSQLQuery".  This is only a very small part of the full code I'm
> executing to create the database.  Before I spend a lot of time can
> someone confirm that I'm using the wrong syntax on the Create
> statements.  Also why does it work on Windows and not Linux? I'm
> executing a lot of insert statements "2500 Inserts" in the code so what
> syntax should I use for Inserts?.  Any help would be greatly
> appreciated.
>
>
>
> put
> revdb_connect("sqlite3",x12Provider.db,,,,,"jhonken at xx.com","xxxxxxxxxxx
> x") into gConID
>
>
>   --> Start of Creates for Database
> put merge("CREATE TABLE AccountEntry (PracticeID TEXT, AccAutoNo INTEGER
> PRIMARY KEY, ChartNum TEXT, ClaimNum TEXT, DAllowed TEXT, TOS TEXT, POS
> TEXT, Provider TEXT)") into tSQL
> put revdb_querylist(,,gConID,tSQL) into tList
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>



More information about the use-livecode mailing list