[quote=223973:@Ruslan Zasukhin]Well, I afraid this not works with new SDK from 2015r3. Let me show why.
We have methods
{ (REALproc) Database_SqlExecute_2,
REALnoImplementation,
"SqlExecute(inQuery as string, inBinds() as String ) as integer", REALconsoleSafe },
{ (REALproc) Database_SqlExecute_3,
REALnoImplementation,
"SqlExecute(inQuery as string, inBinds() as Variant ) as integer", REALconsoleSafe },
For years we did have corresponded methods
int Database_SqlExecute_2( REALobject instance, REALstring inQuery, REALstringArray inBinds )
int Database_SqlExecute_3( REALobject instance, REALstring inQuery, REALobjectArray inBinds )
But now, REALstringArray and REALobjectArray are deprecated and, even worse they are typedef to REALobject.
typedef REALobject REALstringArray;
typedef REALobject REALobjectArray;
So our methods have the same third parameter…
I have try to comment one of them, and use REALarray instead of REALobjectArray.
But this bring me to question – how to differ TYPES of Arrays.[/quote]
You already have two different functions to handle different array types. In Database_SqlExecute_2 you already know that you’re dealing with a string array because that’s what the REALMethodDefinition says.
If you want to get rid of the deprecation warnings, you can just switch the parameters to be REALarray and use REALGetArrayValueString in Database_SqlExecute_2 and REALGetArrayValueObject in Database_SqlExecute_3.