Hello. I want to execute an insert command when the result of previously select statement is true.

Can i use both data source and result set in my method so i can check if the result is null or not.

Or is there a way to see if ds is null?

You can check is the resultset you execute has any records,

if(resultset.next()) or other methods can be used for this purpose.

Yes, you are on right way.

commented: Again you repeat other's people posts without any usefull contribution -1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.