Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, howardR), 472 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: [GSTsqlite] 1.2.0 released [Re: lostclimate] #306930
01/25/10 21:14
01/25/10 21:14
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
cannot confirm this. please post your code and your database here or on gstools


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.2.0 released [Re: nfs42] #306959
01/26/10 06:02
01/26/10 06:02
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
I'm not sure but I think I fixed it. was getting some string/string pointer mixups.

Re: [GSTsqlite] 1.2.0 released [Re: lostclimate] #307011
01/26/10 15:51
01/26/10 15:51
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
if you got problems, found a bug or have any suggestion contact me.


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.2.0 released [Re: nfs42] #307039
01/26/10 18:42
01/26/10 18:42
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
will do. thanks.

Re: [GSTsqlite] 1.2.0 released [Re: lostclimate] #337099
08/08/10 14:26
08/08/10 14:26
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline
User
Carlos3DGS  Offline
User

Joined: Oct 2008
Posts: 513
Im testing your GSTsqlite but I keep getting a crash in one of my functions "read_RESULTS()".

I made a very simple program just for testing and keep getting an error in this line:
"GSTsqlite_GetString(handleQUERY,"Pass",sTEMP);"
Dont know why because there is a similar line above it that seems to work fine.

This is my short script:
Code:
#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();
}


For some reason the line above it that reads "Name" column seems to work, but the one that reads "Pass" column does not work.

the table is not empty and was created with a simple:
sqlite3 test.db
create table mytable(Name varchar(10), Pass varchar(10));
insert into mytable values('Carlos','Ale');
insert into mytable values('Alejandra','Car');


and after I did check it with:
select * from mytable
and got the correct results:
Carlos|Ale
Alejandra|Car

Any healp or insight/hints would be greatly appreciated ;D Im going crazy trying to understand why I get that error.

Error E1513
Crash in read_RESULTS : SYS

I think that is an error with a handle, but I dont understand why it works for the line above if they are the same ;_(

The handle becomes invalid between GSTsqlite_GetString(handleQUERY,"Name",sTEMP); and GSTsqlite_GetString(handleQUERY,"Pass",sTEMP); ? why?


EDIT: I tried putting the "Pass" line above the "Name" line and now pass works fine but Name gives the error... Im going crazy, I have no idea why a pointer would become invalid between those 2 lines?

Last edited by Carlos3DGS; 08/08/10 14:33.

"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: [GSTsqlite] 1.2.0 released [Re: Carlos3DGS] #337264
08/09/10 19:56
08/09/10 19:56
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
with lite-c you have to pass string constants with _str("Name") and _str("Pass")

try also GSTsqlite_Debug(100); with -diag option


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.2.0 released [Re: nfs42] #337327
08/10/10 11:36
08/10/10 11:36
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline
User
Carlos3DGS  Offline
User

Joined: Oct 2008
Posts: 513
adding that _str in those two lines solved everything

Thankyou very much!


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
[GSTsqlite] 1.3.0 released [Re: nfs42] #339306
08/25/10 20:30
08/25/10 20:30
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
built with sqlite 3.7.0 from july 2010
lite-c header and c-script compatible with >A6.5, A7, A8

New: threaded queries + Booker demo from AUM 72

Downloads

Manual


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] #452733
06/23/15 15:30
06/23/15 15:30
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,
I am introducing myself into local databases and found this cool tool you shared with us. Thank you very much! It is what I need.

I have been playing for a couple of days and it worked very well. But I realized it does not work for multiple sentences queries. I put an example:

Code:
CREATE TABLE 'tipos' ( 'index' INTEGER PRIMARY KEY AUTOINCREMENT, 'nombre' VARCHAR(32) UNIQUE, 'cantidad' INTEGER ); 
INSERT INTO 'tipos' ( 'nombre', 'cantidad' ) VALUES ( 'Tipo 000', 0 );" );



It simply obviates the second sentence.

In the try to build triggers for my database. It works well for single sentences but crashes when trying to add a new sentence to the automation.

Code:
CREATE TRIGGER 'contador_tipo' AFTER INSERT ON 'objetos'
	BEGIN
		UPDATE 'tipos' SET 'cantidad' = 'tipos'.'cantidad' + 1 WHERE 'tipos'.'index' = NEW.'tipo';
		UPDATE 'tipos2' SET 'cantidad' = 'tipos2'.'cantidad' + 1 WHERE 'tipos2'.'index' = NEW.'tipo';
	END;



I know this addon is getting old but is there any chance to fix it? Thank you anyway. It helps me a lot as it is.

Salud!

PD: tried to create an account on gstools.de forum but the system failed frown

Last edited by txesmi; 06/23/15 15:38.
Re: [GSTsqlite] 1.3.0 released [Re: txesmi] #453343
07/21/15 18:47
07/21/15 18:47
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
hi txesmi,

sorry for the late response.

sql statements without line feeds work. i will look into this.


PS: that login error was a bug with the new recaptcha plugin. it works now


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
Page 2 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