Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Nymphodora, Quad), 923 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 3 1 2 3
Re: [GSTsqlite] 1.3.0 released [Re: nfs42] #453349
07/22/15 06:57
07/22/15 06:57
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
Hi nsf42,
I think I tried it before, but I have newly written multiple staments in a single line (with no line feeds) and it does not work. It behaves same. frown

Thank you for your time!

Re: [GSTsqlite] 1.3.0 released [Re: nfs42] #453468
07/27/15 17:10
07/27/15 17:10
Joined: Jun 2001
Posts: 1,004
Dossenbach
N
nfs42 Offline OP
Serious User
nfs42  Offline OP
Serious User
N

Joined: Jun 2001
Posts: 1,004
Dossenbach
oops
multiple lines worked never sick
try 3.8.11 (compiled with sqlite 3.8.11) http://projects.gstools.de/public/gstsqlite/releases

You need
Code:
GSTsqlite_ExecuteSQL(var hDB, STRING* sSQL);


Code:
hndQuery = GSTsqlite_ExecuteSQL(GSTsqlite_hndDB, _str("DELETE TABLE 'tipos';")); // execute a sql-statement
  hndQuery = GSTsqlite_ExecuteSQL(GSTsqlite_hndDB, _str("CREATE TABLE 'tipos' ( 'index' INTEGER PRIMARY KEY AUTOINCREMENT, 'nombre' VARCHAR(32) UNIQUE, 'cantidad' INTEGER );")); // execute a sql-statement
  hndQuery = GSTsqlite_ExecuteSQL(GSTsqlite_hndDB, _str("INSERT INTO 'tipos' ( 'nombre', 'cantidad' ) VALUES ( 'Tipo 001', 1 );")); // execute a sql-statement
  hndQuery = GSTsqlite_ExecuteSQL(GSTsqlite_hndDB, _str("INSERT INTO 'tipos' ( 'nombre', 'cantidad' ) VALUES ( 'Tipo 002', 2 );")); // execute a sql-statement
  hndQuery = GSTsqlite_ExecuteSQL(GSTsqlite_hndDB, _str("INSERT INTO 'tipos' ( 'nombre', 'cantidad' ) VALUES ( 'Tipo 003', 3 );")); // execute a sql-statement
  hndQuery = GSTsqlite_ExecuteSQL(GSTsqlite_hndDB, _str("INSERT INTO 'tipos' ( 'nombre', 'cantidad' ) VALUES ( 'Tipo 004', 4 );")); // execute a sql-statement



ExecuteQuery is suppoesed to query the database for results > single statement.

no other query should be open to execute properly.


Andreas
GSTools - Home of
GSTScript 0.9.8: lua scripting for A6/7/8
GSTNet 0.7.9.20: network plugin for A6/7/8
GSTsqlite 1.3.7: sql database plugin for A6/7/8
3DGS Codebase: 57 snippets || 3DGS Downloads: 248 files
Re: [GSTsqlite] 1.3.0 released [Re: nfs42] #453471
07/28/15 05:05
07/28/15 05:05
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
Ok, thank you anyway. laugh

Re: [GSTsqlite] 1.3.0 released [Re: txesmi] #463617
12/17/16 00:48
12/17/16 00:48
Joined: Oct 2016
Posts: 23
NSW
M
mayark Offline
Newbie
mayark  Offline
Newbie
M

Joined: Oct 2016
Posts: 23
NSW
Could someone share the download of the files and the sample code?

Thank you. The download seems to be broken.

Re: [GSTsqlite] 1.3.0 released [Re: mayark] #463618
12/17/16 06:54
12/17/16 06:54
Joined: Oct 2016
Posts: 23
NSW
M
mayark Offline
Newbie
mayark  Offline
Newbie
M

Joined: Oct 2016
Posts: 23
NSW
Ok I found the gstsqlite.h files and tried to use the below code post
ed in page 2 under post id : #337099

I am getting errors when testing in zorro for some reason. Could someone please help me with the below errors?

It says gstsqllite.h line 33

syntax error.


==

#include <acknex.h>
#include <default.c>
#include "GSTsqlite.h";

STRING* sDDBB = "test.db";
var handleDDBB;
void open_DDBB()
{
handleDDBB = GSTsqlite_OpenDatabase(sDDBB);
}

STRING* sQUERY = "select * from mytable";
var handleQUERY;
void execute_QUERY()
{
handleQUERY = GSTsqlite_ExecuteQuery(handleDDBB,sQUERY);
}

STRING* sRESULTS = "";
STRING* sTEMP = "";
void read_RESULTS()
{
while(!GSTsqlite_EOF(handleQUERY))
{
GSTsqlite_GetString(handleQUERY,"Name",sTEMP);
str_cat(sRESULTS,sTEMP);
GSTsqlite_GetString(handleQUERY,"Pass",sTEMP);
str_cat(sRESULTS,sTEMP);
GSTsqlite_NextRow(handleQUERY);
}
}


void close_QUERY()
{
GSTsqlite_CloseQuery(handleQUERY);
}

void close_DDBB()
{
GSTsqlite_CloseDatabase(handleDDBB);
}

void main ()
{
open_DDBB();
execute_QUERY();
read_RESULTS();
close_QUERY();
close_DDBB();
}

Page 3 of 3 1 2 3

Moderated by  aztec, Blink, HeelX 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1