This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC and Relational Databases and the fly likes how to enter a bigint value in the db ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "how to enter a bigint value in the db ?" Watch "how to enter a bigint value in the db ?" New topic
Author

how to enter a bigint value in the db ?

naved momin
Ranch Hand

Joined: Jul 03, 2011
Posts: 692

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



The Only way to learn is ...........do!
Visit my blog http://inaved-momin.blogspot.com/
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 62101
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to enter a bigint value in the db ?