Hi I have a problem with the following code below.  I tried creating 
the DSN on the server and setting the class to runon = 'server'

but it cannot find the DSN.

question 1:  must I set up the DSN on all client machines?



also I tried these lines of code:


//loginProperty.setUsername(""); // user name
//loginProperty.setDatabase(''); // database name
//loginProperty.setServer(""); // SERVER name


but i get an error message stating that these properties are no 
longer supported.

the problem is I need to retrieve data from another server to run a 
report.

can anyone help?

Thanks in advance

b



ODBCConnection  oDBCConnection;
LoginProperty   loginProperty;
Statement       statement;
ResultSet       r;
str             strTest;


;




// Initialize Connection
loginProperty = new LoginProperty();
loginProperty.setDSN('test'); // DSN Name



//loginProperty.setUsername(""); // user name
//loginProperty.setDatabase(''); // database name
//loginProperty.setServer(""); // SERVER name

//loginProperty.setPassword(""); // password 

// Create Connection Object

ODBCConnection = new ODBCConnection(loginProperty);
statement = oDBCConnection.createStatement();

// Execute update Query
r = statement.executeQuery("SELECT * from table); // 

while (r.next())

strTest =   r.getString(2)  ;


return r.getString(1);

Reply via email to