static void Job3(Args _args)
{ LogInProperty Lp = new LogInProperty(); OdbcConnection myConnection; Statement myStatement; ResultSet myResult; str sqlQuery; ; sqlQuery = 'SELECT TOP 10 * FROM CustTable ORDER BY NewID()'; LP.setServer("Server"); LP.setDatabase("db"); Lp.setUsername("user"); Lp.setPassword("password"); try{ myConnection = new OdbcConnection(LP); } catch{ info("Check username/password."); return; } myStatement = myConnection.createStatement(); myResult = myStatement.executeQuery(sqlQuery); while (myResult.next()){ box::info(myResult.getString(1)); } } |
When wanting to clear dynalinks between two forms, you can clear the dynalinks on the DS on the second form. See example below.
Clear DynaLinks public void init() { ; super(); if (element.args() && element.args().caller() && (element.args().caller().name() == formStr (PurchTable))) { InventTable_ds.query().dataSourceTable(tableNum(InventTable)).clearDynalinks(); } }