× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



 If exists(stmt.executeQuery)

    I'm not sure what you're mixing above, but Statement.executeQuery()
returns a ResultSet, not a boolean.  Unless you did it as a stored
procedure
that returned an OUT parameter, you'll need to do

Joe, thanks for your input.  I'll take a look at your examples.  I realized
that .executeQuery always returns a resultset. What I was trying to get at,
is that in PSQL or TSQL you can say.

If EXISTS(SELECT * FROM TABLE)
BEGIN
  -- do something
END

So I was just wondering if there was something similar to that in Java.
"SELECT 1 From Table" should work.  Thanks.

You are correct, I'm query a non DB2 table... it's Microsoft SQL I
believe...

url equals  jdbc:jtds:sqlserver://"+ipAddr+":1433/"+dbName

//Using jtds driver
Class.forName("net.sourceforge.jtds.jdbc.Driver");

if that means anything to you.


Michael Schutte
Admin Professional
For hotcake tips, interviews with our chefs and more, check out the Stacked
and Stuffed blog at http://imstuffed.blogspot.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.