Raised This Month: $275 Target: $400
 68% 

Dynamic Objects and Properties - v.0.0.32 - [2018.05.08]


Post New Thread Reply   
 
Thread Tools Display Modes
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
popey456963
Member
Join Date: Mar 2016
Old Yesterday , 17:49   Re: Dynamic Objects and Properties - v.0.0.32 - [2018.05.08]
Reply With Quote #272

In the Methodmap example (2.0 on the Wiki), would you have to destroy the Dynamic object when the methodmap is no longer intended to be removed? Or, since it's attached to that object, do you no longer have to destroy it?
popey456963 is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old Today , 00:20   Re: Dynamic Objects and Properties - v.0.0.32 - [2018.05.08]
Reply With Quote #273

You always need to call .Dispose when you're done with them
__________________
Neuro Toxin is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:25.


Powered by vBulletin®
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Theme made by Freecode