• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to enter a bigint value in the db ?

 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my problem is i have a table in ms sql that has a data type bigint like
contact_no bigint

i m trying to take value from the textfield and putting that detail in to the db
but i didnt found any method of preparedstatement that says
ps.setBigint();
i have tried this but it gives an exception

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65342
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never say "it gives an exception". Always show the exception.

To find out which data types to use, each DB publishes a conversion table showing which types to use in Java for each type in the DB.

I found the one for MS SQL in 10 seconds.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic