aspose file tools*
The moose likes Java in General and the fly likes JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "JDBC" Watch "JDBC" New topic
Author

JDBC

giridhar reddy
Greenhorn

Joined: Nov 07, 2003
Posts: 5
If you are truncated using JDBC, How can you know ..that how much data is truncated ?
Sam Moran
Ranch Hand

Joined: Sep 28, 2002
Posts: 86
Depending on which DB you are using, I know that in Oracle when you issue the truncate command you remove all of the table entries. I suppose that you could get a count before issuing the truncate command and then you would know how many have been removed. I hope this helps!!


We make a living by what we get, we make a life by what we give!
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

giridhar,
you can issue a delete statement instead.
"DELETE FROM table WHERE 1 = 0". This statement will clear your table ( although probably not as efficiently as a truncate ) and the executeUpdate() method will return the number of rows effected ( deleted ).
Jamie
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC
 
Similar Threads
How to determine a value has been truncated in a Jlist?
IE shows incomplete JSP data
Basic Questions in JDBC
problem with outputText in datatable
getString() does not retrieve String bigger than 255 characters