View Single Post
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 07-07-2018 , 20:24   Re: Dynamic Objects and Properties - v.0.0.32 - [2018.05.08]
Reply With Quote #271

I've completed updating Dynamic instances.

Code:
	char error[128];
	Database db = SQLite_UseDatabase("dynamictest", error, sizeof(error));

	test.SetString("stringvalue", "a string value 'which needs to be escaped'.", 64);
	test.SetInt("intvalue", 666);
	test.SetFloat("floatvalue", 666.666666666);
	test.SetBool("boolvalue", true);
	test.SetString("ID", "STEAMID:1234567890", 24);

	PreparedQuery query = PreparedQuery();
	query.Compile("UPDATE `table` SET `stringvalue`=?, `intvalue`=?, `floatvalue`=?, `boolvalue`=? WHERE `ID`=?");
	query.Execute(db, test);
	query.Dispose();


	db = null;
	return true;
Here is the .Execute prototype.

Code:
public bool Execute(Database db, Dynamic parameters, SQLQueryCallback callback=INVALID_FUNCTION, any data=0, int buffersize=512)
Callback is the 3rd parameter. When left as INVALID_FUNCTION Dynamic calls an internal callback to keep it threaded.
__________________

Last edited by Neuro Toxin; 07-07-2018 at 20:25.
Neuro Toxin is offline