You may be experimenting with multiple connections and different settings for each connection. Instead of recompiling for each change, you might want to change the characteristics of the connection at run time.

If XOInstance() is called with no parameters, the Connect to Data Source dialog displays, as shown below:

You login manually, entering the login, password, and (if you click the Advanced>> button) Source Type, transaction support, and timeout.

Below is the code for forcing the login dialog for the populating the combo box from SQL Server example, commenting out the original XOInstance() call and forcing the login dialog. changing XOInstance() to pass no parameters.

$insert XO_Equates
 
//hXO = XOInstance('PUBS' , '', 'sa')
hXO = XOInstance()
 
if hXO then
  hQry = QryInstance(hXO)
    if hQry then
      flag = QryMethod(hQry, QRY_EXECUTE$, "select au_lname + ', ' + au_fname from authors order by au_lname")
      row = ""
      results = ""
      loop
        flag = QryMethod(hQry, QRY_GETROW$, row)
      while flag
        results<-1> = row
      repeat
      QryMethod(hQry, QRY_DESTROY$)
    end
  rv = Set_Property (@window : '.AUTHORS', 'LIST', results)
  XOMethod(hXO, XO_DESTROY$)
end 
  • No labels