quick question: my customer has a situation where he has his database with a varchar field and the corresponding jdbc code is storing/retrieving a boolean.
I guess that the boolean values false ... |
I can see so many update methods in for resultset based on the datatypes of the fields. Isnt there any single method for it? Or can anyone suggest an alternative?
|
I have very simple code:
pstat=con.prepareStatement("select typeid from users where username=? and password=?");
pstat.setString(1, username);
pstat.setString(2, password);
rs=pstat.executeQuery();
int rowCount=0;
while(rs.next())
{ ...
|
What are side effects when iam return a Resulset(java.sql.ResultSet) in the method using java.
|
When executing SELECT queries on an MS SQL Server 2000 DB, is there any performance difference between using ResultSet.TYPE_SCROLL_INSENSITIVE and ResultSet.TYPE_FORWARD_ONLY?
Assuming ResultSet.CONCUR_READ_ONLY used.
|
Please enclose your posted code in [code] tags (See How to Ask a Question). This makes it easier for our Experts to read and understand it. Failing to do so creates ... |
As a general rule, you only use "executeQuery(...)" when you have a SELECT query. If you do a INSERT, UPDATE or DELETE you use "executeUpdate(...)". If you don't know what type of query it is--for example if it's a query that is passed in by the user--you can use "execute(...)". The return values are "ResultSet", "int" and "boolean", respectively. Some database ... |
|
Ram, Before I tell you anything else. Change your screen name. You must do this because the moderators here will get upset with you if you don't. Your publicly displayed name should be Ram Mohan not Sliders Field. You can change your display name by clicking the link at the top of the page for "My Profile" and then clicking the ... |
|
|
Hello, we are using a stored procedure in oracle in order to get some info out of the database. This stored procedures has one IN param (id) and one OUT param (OracleTypes.CURSOR) stm = conn.prepareCall("(ExamenPackage.usp_getExam(?,?)}, OracleResultSet.TYPE_SCROLL_SENSITIVE, OracleResultSet.CONCUR_UPDATABLE); rs = stm.getCursor(2); Notice above, we specify the type of the rs as SENSITIVE and the cocurrancy as UPDATABLE. For some reason JDBC determins ... |
|
|
Hi, I am using java.sql.ResultSet as return type from the method in Web Service. But i am getting the following error. Please help me to resolve this error. WARNING: Exception: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.io.IOException: No serializer found for class net.sourceforge.jtds.jdbc.JtdsResultSet in registry org.apache.axis.encoding.TypeMappingDelegate@14ae2c1 faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.io.IOException: No serializer found for class net.sourceforge.jtds.jdbc.JtdsResultSet in registry org.apache.axis.encoding.TypeMappingDelegate@14ae2c1 at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1505) at ... |
when using TYPE_FORWARD_ONLY and setRow(200); then I get a Exception, that says I should use TYPE_SENSITIVE or TYPE_INSENSITIVE, but when using SENSITIVE or INSENSITIVE-Cursor, my query execution time is much much slower than when using TYPE_FORWARD_ONLY. For example, 10.000.000 rows using TYPE_FORWARD_ONLY returns the (first) 100 rows within max 2 seconds. When using TYPE_SENSITIVE or TYPE_INSENSITIVE, the same query returns 100 ... |
Hi Ravi, I don't know if you have opened another thread or not(though searched for it but didn't find it). Anyway, I have a situation where I have to search for records in a table containing a huge number of rows and the number of resulted rows is also big. So it takes a lot of time in searching through that ... |
|
|