The following is a piece of code from my client application which is
trying to call stored procedure SP1:
String callstmt = "CALL DB2ADMIN.SP1(?,?,?)";
CallableStatement clst1 = conn.prepareCall(callstmt);
String e = "000150";
clst1.setString(1,e);
" clst1.setString(1,e);" fails with exception CLI0109E String data
right truncation.
Why is it not allowing it to be set to "000150"? If I change the
above to:
String callstmt = "CALL DB2ADMIN.SP1(?,?,?)";
CallableStatement clst1 = conn.prepareCall(callstmt);
String e = "5";
clst1.setString(1,e);
The program runs fine. Why is it allowing me to only code a single
character and not a string of characters.
Regards,
Raquel. 2 1676 ra****************@yahoo.com (Raquel) wrote in message news:<9a**************************@posting.google. com>... The following is a piece of code from my client application which is trying to call stored procedure SP1:
String callstmt = "CALL DB2ADMIN.SP1(?,?,?)"; CallableStatement clst1 = conn.prepareCall(callstmt); String e = "000150"; clst1.setString(1,e);
" clst1.setString(1,e);" fails with exception CLI0109E String data right truncation.
Why is it not allowing it to be set to "000150"? If I change the above to:
String callstmt = "CALL DB2ADMIN.SP1(?,?,?)"; CallableStatement clst1 = conn.prepareCall(callstmt); String e = "5"; clst1.setString(1,e);
The program runs fine. Why is it allowing me to only code a single character and not a string of characters.
Regards, Raquel.
Check the define of you J-SP, the first input argument maybe a char(1)
Richard.
It indeed is the problem Richard. Thanks.
Regards,
Raquel. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: dw |
last post by:
Hello all, I'm having a dickens of a time calling a stored procedure on a
connection. Every time I do, it generates an error "Arguments are of the
wrong type, are out of acceptable range, or are in...
|
by: Paul |
last post by:
Hi,
In SQL Books Online in the section on @@Error it gives the following
example:
-- Execute the INSERT statement.
INSERT INTO authors
(au_id, au_lname, au_fname, phone, address,
city,...
|
by: Lauren Quantrell |
last post by:
I'm using an Access2K front end on a SQL Server2K backend.
I use Scope_Identity() in a lot of stored procedures to pass the
newwly inserted record's unique ID to the next select statement in the...
|
by: Anthony Robinson |
last post by:
I'm executing a stored procedure and getting the
SQL0440N No authorized routine named
"AMROBI2.CREATEAIMCONNECTION" of type "PROCEDURE
" having compatible arguments was found.
The schema...
|
by: Rhino |
last post by:
I am trying to verify that I correctly understand something I saw in the DB2
Information Center.
I am running DB2 Personal Edition V8.2.1 on Windows. I came across the
following in the Info...
|
by: Woody Splawn |
last post by:
I am using SQL Server 2000 as the back-end. I have created a stored
procedure in SQL server called usp_AddContract. This Stored procedure
inserts a new contract into a contracts table. I have...
|
by: singlal |
last post by:
Hi, my question was not getting any attention because it moved to 2nd
page; so posting it again. Sorry for any inconvenience but I need to
get it resolved fast. Need your help!
...
|
by: Sridhar |
last post by:
Hi,
I have created a web application. I have a data access dll to interact
with database. I added this dll as a reference to the web application. Now
let's say if I am calling a function in data...
|
by: mgsmario |
last post by:
Hi Guys
I have an ASP application that connects to an Oracle database, right now I'm trying to connect this same ASP application to a DB2 database (Express-C, version 9.5.0).
I'm in the process...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |