Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Insert record to table with the help of Sequence

 
Arun Giridharan
Ranch Hand
Posts: 290
Debian Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have pasted a small amount of code of my BankProject ...
i really don't know what is wrong with my code(unable to insert data into table). // i need to insert data periodically with help of sequence bc.seq but it's not possible to do with that .... is something wrong with my code



 
Wouter Oet
Saloon Keeper
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ItDoesntWorkIsUseless. Please tell us why you're unable to insert the data? What goes wrong?
 
Arun Giridharan
Ranch Hand
Posts: 290
Debian Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wouter Oet wrote:ItDoesntWorkIsUseless. Please tell us why you're unable to insert the data? What goes wrong?


Thanks Wouter Oet, i'm getting a blank screen...after i give values.



rather it should say Succesfully Updated ...instead i'm getting a blank empty web page.
 
Sudipta Laha
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check the api http://download.oracle.com/javase/1.4.2/docs/api/java/sql/Statement.html#execute(java.lang.String)

its only true when its returns a resultset object
 
Arun Giridharan
Ranch Hand
Posts: 290
Debian Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sudipta Laha wrote:Please check the api http://download.oracle.com/javase/1.4.2/docs/api/java/sql/Statement.html#execute(java.lang.String)

its only true when its returns a resultset object


Thank you ,i've corrected it ... but still i get the blank page as Answer.
 
Sudipta Laha
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
try statement.executeUpdate(string).. it will return a int. Give a SOP to check the integer value.
If its 0 insert has not happened.
 
Arun Giridharan
Ranch Hand
Posts: 290
Debian Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sudipta Laha wrote:Hi
try statement.executeUpdate(string).. it will return a int. Give a SOP to check the integer value.
If its 0 insert has not happened.


it's just the blank screen what i get ...and in console(server ) neither 0/1 gets printed.
 
Sudipta Laha
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

If you are not getting 0/1(ie.. nothing is comming in console), your code is breaking before that.

Give SOP before that also and check whether this file is getting called correctly/in which part the code is breaking.
 
Arun Giridharan
Ranch Hand
Posts: 290
Debian Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In console nothing is getting printed before or After.
 
Sudipta Laha
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you need to debug the whole issue... from the place you are calling the file.
Atleast the file should get called properly, then there may be issues with code that can be corrected. But atleast this code should get called.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic