Dear all,
I use database queries a lot, in combination with custom sql. I know, there are 3 methods like shown below.
I like the "new sql query" most, because it's most powerful, and more safe (see password ...).
Unfortunately it's behaviour regarding Hide ODBC connection strings has changed in JMP17, but it will be corrected:
JMP17 behaviour on Preference "Hide ODBC Connection Strings" set: connection str... - JMP User Commu...
I was told by the developers in the Discovery Summit Europe in Sitges, that the method new sql queries is the recommended one, more stable, and the both others are outdated. But I also heard that there is a speed issue. Here I have never read about this recommendation, nor in the documentation.
I'd like to discuss:
What method do you use, and why?
And what experiences have you made?
Thanks and best regards,
Georg
Names Default To Here( 1 );
// 3 different ways for database access
// constants
// this works on all Oracle DB's
sql_str = "select * from Dual";
// needs to be adapted to your database
cnx_str ="DSN=MYDSN_NAME;UID=USERNAME;PWD=PASSWORD";
// new sql query needs connection string starting with "ODBC:"
// there is no good documentation in the manual (scripting guide and JMP Help)
qry_obj = New SQL Query( query name("New SQL Query"), connection( "ODBC:"||cnx_str ), custom sql( sql_str ) );
dt_sqlquery = qry_obj << run foreground();
// open database is a oneliner
// with "Hide ODBC connection string" not set, it saves the plain password into the table scripts
dt_open = open database(cnx_str, sql_str, "Open Database");
// expecute sql needs the database opened before sending statements
// with "Hide ODBC connection string" not set, it saves the plain password into the table scripts
dbc=create database connection(cnx_str);
dt_execute = execute sql(dbc, sql_str, "Execute SQL");
close database connection(dbc);
// EOS
Georg