• 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

can not insert to DB after a while!

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear,
I have a method which every time it runs, it will add 10 row to my DB but after 3 or 4 times running this file it doesn't add anything to my db. and even it does not throw me any thing like error or ... . I dont know why cuz it works very well for first 3 or 4 times but after ....!
do you have any idea?

and some thing else! after that I can not do any thing in MySQL Command Line Client. seems that it hangs!
I realy dont know what to do!
thank you.
Sahar.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There could be any number of reasons. Without seeing the code it's all uninformed speculation, though.
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


could you please post the code!
 
sahar sa
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi dear,
Of curse, here is the code for Insert and a piece of code which runs the insert class.

///////////insert////////////////////////////



/////////////insert call////////////



and I dont know why my MYSQL COMMAND does not work any more?!

thank you so much!
Sahar.
 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Ranveer K Kumar
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

first check the loop; is it your real code ? then loop is here <5 increase it to <10 and please follow the James Ward update code of static connection method..


regards
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

James Ward wrote:




if "conn" is declared at class level, then why is it declared again here? Furthermore, getConnection does not return a connection - it's declared void. Let's not confuse the issue by posting non-working code.
 
sahar sa
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OOh my god! Dear friends specialy James Ward and Ulf Dittmer Thank you sooooooooooooo much!. I just change a little things void--> Connection and now it works!!!

Thanks again!
Sahar
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic