The main thing with extDB3 that confuses people is there is a setup stage.
This is to make it flexible, but is also confusing aswell.

  "extDB3" callExtension "9:ADD_DATABASE:DB"; // This will connect to a database using the settings from [DB]   in extdb3-conf.ini // Next there are two different methods of sending queries etc // There is normal SQL Queries, (not secure if someone manages to remote execute code on armaserver) // Or there is prepared statements etc that are predefined in .ini file. // So we have database setup, we just need to tell the extension which method we are using. "extDB3" callExtension "9:ADD_DATABASE_PROTOCOL:DB:SQL:SQL_QUERY"; // This will use database connection DB + the method/protocol SQL, and we are calling it SQL_QUERY. "extDB3" callExtension "9:LOCK"; // Then we are going to lock the extension. This is security incase someone remote executes code on server. // It basically disables the setup stage. //"extDB3" callExtension "9:LOCK:1234"; //"extDB3" callExtension "9:UNLOCK:1234"; //"extDB3" callExtension "9:RESET"; // Note if you use a password, then you can unlock + reset the extension later. // Useful for testing or restarting / loading different missions. Ok the extension is finally setup and we can actually do a SQL Query  (SYNC / BLOCKING) _result = "extDB3" callExtension "0:SQL_QUERY:SELECT * FROM PLAYERS"; _result = call compile _result;


Note:
SQL_QUERY / DB names above can pretty much be whatever you like. Some frameworks even randomize this.
It is also possible to connect to multiple databases at same time aswell.
Also all the error messages return to arma from the extension are generic.
To get proper info you need to check @extDB3/logs for more detailed info

I also updated / simplified the sqf examples at 
https://bitbucket.org/torndeco/extdb3/src/08a15a65b9e5b7a0807fb31166434962ce2daddd/sqf_examples/sqf/?at=default

-----------------------------------

Above is just some rough examples to get you started etc...
There is also a test program in the optional directory.
It is basically a commandline version of the extension.
It is so you can type in the commands and see the returned output, without having to use arma.
Makes it easier to understand intially imo, versus typing sqf code etc...

After you get that part figured out.
You should have a mess around with retreiving multiple part messages
ExileServer code / AltisLife / a3wasteland and afew other frameworks will have this implemented.
And look at https://bitbucket.org/torndeco/extdb3/wiki/extDB3 - General

---------------------------------

Few other things you might not know or be like why.

Few things arma callExtensions are blocking...
That is why its generally better to tell an extension todo something.
It returns an id + you poll the id until the job is done.
This is normally what people refer to async extension.

This way you don't block arma engine for long period of time.

Arma callExtensions can only return so much (2k chars in arma2, or 10k chars in arma3).
That is why there is multi-part messages, to handle when your returned output is longer than the limit.

 
    • Like
    1