• Post Reply Bookmark Topic Watch Topic
  • New Topic

calling a SQL function within my java code could somebody tell me what I did wrong?

 
noodle hamilton
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all:
I am just trying to call a simple sql func in my java code, and I got


here is the sql function


I tested on the DB Client and the returned values are all correct.

here is a portion of my code that is calling it


please let me know what I was doing wrong..

Thanks
 
noodle hamilton
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, never mind i figured it out...
it should be setString(2 instead..
 
Jan Cumps
Bartender
Posts: 2620
14
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're right, it has to be setString(2,...).
Also, you don't need to wrap the ip between single quotes when you bind the parameter.

Regards, Jan
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!