aspose file tools
The moose likes JDBC and the fly likes how to enter a bigint value in the db ? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply 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: 675

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: 56528
    
  14

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.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how to enter a bigint value in the db ?
 
Similar Threads
calling a stored procedure
equivalent of bigInt in java
First 10 digits of the sum of 100 50 digit numbers (Project Euler # 13)
MS SQL BIGINT not accessible in java
Getting the value of a database Identity column in JPA