wood burning stoves 2.0*
The moose likes JSF and the fly likes Problem in sending long value to bigint parameter of stored procedure from java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem in sending long value to bigint parameter of stored procedure from java" Watch "Problem in sending long value to bigint parameter of stored procedure from java" New topic
Author

Problem in sending long value to bigint parameter of stored procedure from java

Zainab Haf
Greenhorn

Joined: Sep 17, 2012
Posts: 11
I am sending long datatype value from java to bigint parameter of stored procedure of sqlserver. I am using spring for datasource/jdbctemplate.

In Console:

INFO: checking value of long: 1231231234560

Here is the error i get after printing serviceNo:


I do get fine results if i change datatype of serviceNo to integer but it will be restricting since i want search on basis on bigger values also which will exceed the integer limit.

Kindly hep me in here as i am unable to understand why am i getting this error of varchar


Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15961
    
  19

But how does this relate to JavaServer Faces? If you need Sping JDBC help, the experts on that topic hang out in the Spring forum, not here.


Customer surveys are for companies who didn't pay proper attention to begin with.
Zainab Haf
Greenhorn

Joined: Sep 17, 2012
Posts: 11
Ok.
Solved the problem.
 
Don't get me started about those stupid light bulbs.
 
subject: Problem in sending long value to bigint parameter of stored procedure from java
 
Similar Threads
JDBC Error MSSQL Uniqueidentifier
output parameter from stored procedure: Operand type clash: VARCHAR is incompatible with VOID Type
Problem retrieving output from stored procedured
what is the equivalent data type for Oracle Cursor.
How to pass BLOB to a PL/SQL Stored Procedure