• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Insert record to table with the help of Sequence

 
Ranch Hand
Posts: 290
Debian Fedora Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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



 
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic