jagadeesh.macherla

PreparedStatements with PI JDBC

Discussion created by jagadeesh.macherla on Oct 4, 2010
Latest reply on Oct 5, 2010 by michaelh

Hi,

 

 Did any one work with prepared statements using pi jdbc. Its not returning any results when i use the following code.

 

PreparedStatement pstmt = connection.createPreparedStatemt("select * from picomp where time=date('*') and tag like '?'");

 

pstmt.setString("SINU*");

 

ResultSet rs = pstmt.executeQuery()

 

rs is not returning anything but it works when i use the same query with Statement.

 

I am not sure if it matters i have PI SQL DAS installed on the same machine where i am using PI JDBC

 

Appreciate your help.

 

 

 

Regards,

 

Jagadeesh

Outcomes