|
From: <dav...@us...> - 2006-07-03 00:16:28
|
Revision: 1438 Author: davidgewirtz Date: 2006-07-02 17:16:23 -0700 (Sun, 02 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1438&view=rev Log Message: ----------- Updated coding changes, still developing Modified Paths: -------------- Frontier/branches/SQLite/Common/source/langsqlite.c Modified: Frontier/branches/SQLite/Common/source/langsqlite.c =================================================================== --- Frontier/branches/SQLite/Common/source/langsqlite.c 2006-06-28 20:27:13 UTC (rev 1437) +++ Frontier/branches/SQLite/Common/source/langsqlite.c 2006-07-03 00:16:23 UTC (rev 1438) @@ -229,8 +229,7 @@ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */ - /* Enter the verb, convert the param to null-terminated string */ - if (!getreadonlytextvalue (hparam1, 1, &dbfile)) + if (!gettextvalue (hparam1, 1, &dbfile)) /* get the param */ return (false); pushcharhandle (0x00, dbfile); /* convert *dbfile to a string */ @@ -272,7 +271,7 @@ /* Process the SQLite sequence */ returnCode = sqlite3_close(dbid); - return setintvalue ((short) returnCode, vreturned); + return setlongvalue (returnCode, vreturned); } /* sqlitecloseverb */ @@ -301,9 +300,8 @@ return (false); flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */ - - /* Enter the verb, convert the param to null-terminated string */ - if (!getreadonlytextvalue (hparam1, 2, &query)) + + if (!getreadonlytextvalue (hparam1, 2, &query)) /* get the query param */ return (false); /* Process the SQLite sequence */ @@ -313,7 +311,7 @@ return (false); } - return (setheapvalue ((Handle) queryid, longvaluetype, vreturned)); /* return the db address to the scripter */ + return (setlongvalue ((long) queryid, vreturned)); /* return the db address to the scripter */ } /* sqlitecompilequeryverb */ @@ -340,7 +338,7 @@ /* Process the SQLite sequence */ returnCode = sqlite3_finalize(queryid); - return setintvalue ((short) returnCode, vreturned); + return setlongvalue (returnCode, vreturned); } /* sqliteclearqueryverb */ @@ -367,7 +365,7 @@ /* Process the SQLite sequence */ returnCode = sqlite3_step(queryid); - return setintvalue ((short) returnCode, vreturned); + return setlongvalue (returnCode, vreturned); } /* sqliteexecutequeryverb */ @@ -421,7 +419,8 @@ /* SQLite spec says sqlite3_column_type only returns the above 5 types. But, just in case it lied, we'll return an error type to help Frontier avoid getting a case of return value indigestion. */ - return setostypevalue (langgettypeid (uninitializedvaluetype), vreturned); + langerrormessage ("\x29""SQLite returned an undefined column type."); + return (false); } } /* switch */ @@ -486,7 +485,7 @@ /* Process the SQLite sequence */ returnCode = sqlite3_column_count(queryid); - return setintvalue ((short) returnCode, vreturned); + return setlongvalue (returnCode, vreturned); } /* sqlitegetcolumncountverb */ @@ -651,7 +650,8 @@ /* SQLite spec says sqlite3_column_type only returns the above 5 types. But, just in case it lied, we'll return an error type to help Frontier avoid getting a case of return value indigestion. */ - return (setlongvalue ((long) 0, vreturned)); + langerrormessage ("\x29""SQLite returned an undefined column type."); + return (false); } } /* switch */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |