Sitemap

Amicuk Programming Answers

Implicit conversion of "TEXT" to "VARCHAR"

-0001-11-30   Views:0

Advertisement

Running jdk1.6.0_12, Linux RHE, Sybase 12.5 and connection with jconn3.jar Have a table with a column of type varchar(50) Was able to isolate the problem to this column, as the SQLException was thrown from the line "stmt.setString("@<colname&

Running jdk1.6.0_12, Linux RHE, Sybase 12.5 and connection with jconn3.jar
Have a table with a column of type varchar(50)
Was able to isolate the problem to this column, as the SQLException was thrown from the line "stmt.setString("@<colname>", <value>);"
In doing ~14,000 individual inserts in 30 min I had two Exceptions thrown (Implicit conversion of "TEXT" to "VARCHAR" is not allowed), both at the same place and both repeatable. I put a print statement in the catch block and found that both were inserting the same 6 character string.
Ran all the docs several times more and got the same number of failures on the same files.
Querying the database I found that I had almost 5,000 other insert of the same string which were sucessful.
Not able to identify what was different about the two failures, no unprintable characters, etc.
Is this a JDBC issue or Sybase?
What are the reasons that would cause this exception to be thrown when inserting 6 characters into a hole for 50?
other ideas?
Edited by: jjones3566 on Feb 17, 2009 10:50 AM

The replay answer
Advertisement
jjones3566 wrote:
Running jdk1.6.0_12, Linux RHE, Sybase 12.5 and connection with jconn3.jar
Have a table with a column of type varchar(50)
Was able to isolate the problem to this column, as the SQLException was thrown from the line "stmt.setString("@<colname>", <value>);"
In doing ~14,000 individual inserts in 30 min I had two Exceptions thrown (Implicit conversion of "TEXT" to "VARCHAR" is not allowed), both at the same place and both repeatable. I put a print statement in the catch block and found that both were inserting the same 6 character string.
Ran all the docs several times more and got the same number of failures on the same files.
Querying the database I found that I had almost 5,000 other insert of the same string which were sucessful.That could an invalid assumption. The fact that they displayed the same does not make them the same.
You would need to print the integer value of each character to insure they are the same.
You should do that starting with the source and NOT what is in the database.
If different then that is the source of the problem.
If the same then it is probably just a bug in the driver/database which you are stuck with. Various solutions would be to try a conversion (format the SQL to take a text and convert to varchar) or trying playing with the commit level (commit 50 versus 5000 or whatever.)

Go to See the other 2 answers

Implicit conversion of "TEXT" to "VARCHAR"

Category:DefaultRelease time:-0001-11-30Views:130

Running jdk1.6.0_12, Linux RHE, Sybase 12.5 and connection with jconn3.jar Have a table with a column of type varchar(50) Was able to isolate the problem to this column, as the SQLException was thrown from the line "stmt.setString("@<colname&[More]

Implicit Conversion from data type sql_variant to datetime is not allowed.

Category:DefaultRelease time:-0001-11-30Views:130

 Getting a odd error. This code was working perfectly before a SQLServer upgrade. The linked database is working, I'm able to pull up data from it in separate queries just fine. I'm getting the following error. Implicit conversion from data type sql_[More]

Implicit conversion

Category:DefaultRelease time:-0001-11-30Views:130

doesnot oracle implicitly convert varchar(2) to date in round and trunc functions?Hi, f7218ad2-7d9f-4e71-ba26-0d6e4b38f87e wrote: doesnot oracle implicitly convert varchar(2) to date in round and trunc functions? ROUND and TRUNC do not take VARCHAR2s[More]

When implicit conversion takes place

Category:DefaultRelease time:-0001-11-30Views:130

hi all, I have two queries say sql>SELECT * FROM EMP WHERE HIREDATE BETWEEN '20-FEB-81' AND '20-FEB-82'; EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30 7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30 7566 JO[More]

Error on Implicit conversion

Category:DefaultRelease time:-0001-11-30Views:130

Hey I have a problem to this query, yesterday function normaly, but we reboot the server and now send me this error message: Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value 'sdv' to data type int. this is the qu[More]

Should we replace all implicit conversion by explicit conversion

Category:DefaultRelease time:-0001-11-30Views:130

Hi all, it's my first post in this forum, correct me if I do something incorrect. I just want to discuss this question from the performance point of view, so don't worry about the design or other stuff. I have read through many threads and articles,[More]

Why index is not used if oracle have to do implicit conversion?

Category:DefaultRelease time:-0001-11-30Views:130

my db version: 10gR2 I created bitmap index on each of the column used in below sql. the datatype of all three columns are VARCHAR2, while i am using NUMBER in the query, which means oracle needs to do the implicit conversion before running the sql.[More]

Using currency conversion and text variable at the same time

Category:DefaultRelease time:-0001-11-30Views:130

Hi all, In a 3.5 bex query, i am applying currency conversion on a key figure with a variable of 0currency. as i know, to be able to apply currency conversion, variable of currency should not be in Free characteristics or in Filter. it has to be sele[More]

[svn] 2236: Allow implicit conversion of Vector. * to Vector. T in strict mode.

Category:DefaultRelease time:-0001-11-30Views:130

Revision: 2236<br />Author:   [email protected]<br />Date:     2008-06-25 11:48:59 -0700 (Wed, 25 Jun 2008)<br /><br />Log Message:<br />-----------<br />Allow implicit conversion of Vector.<*> to Vector.<T>[More]

Implicit conversion issue

Category:DefaultRelease time:-0001-11-30Views:130

Dear Sir, Does latest Oracle9i JDBC driver not support implicitly converting string to date? I try to execute "INSERT INTO TABLE DATETYPECOLUMN VALUES '2007-07-24 17:40:00' ". It works well using driver version 9.2.0.1, 9.2.0.3, 9.2.0.4, 9.2.0.5[More]

Disallowed implicit conversion from data type datetime to data type timestamp

Category:DefaultRelease time:-0001-11-30Views:130

Received error: [Macromedia][SQLServer JDBC Driver][SQLServer]Disallowed implicit conversion from data type datetime to data type timestamp, table 'myTbl', column 'duration'. Use the CONVERT function to run this query. I have a field named duration h[More]

Hot
Photoshop CS5.1 When I click on Open File, the window that comes up has several default columns (FileName, Date, Size, etc). I can right-click on the tab bar and add "Date Modified" to the tabs, but I would like to have "Date Modified" [More]
Following codes does not work with IIOP when called from jsp returns an com.sap.engine.services.iiop.CORBA.CORBAObject:[email protected] step2 RemoteException occurred in server thread; nested exception [More]
Hi e-recruiting experts, We would like to search candidates based on specific Texts in Candidates' Resume. We tried but get no results. Is it possible? Is there any specific config to be done? We are able to search candidates based on Candidate Profi [More]
I have a table with following data. Property_number         calc_class 1000                          150 1000                           100 1001                              300 1002                              400 1002                               [More]
Heloo all; I have this error: Errors in file 9.2.0/admin/erp/bdump/prod_j000_18936.trc: ORA-12012: error on auto execute of job 189 ORA-12008: error in materialized view refresh path ORA-04063: package body "APPS.FND_GLOBAL" has errors undo_supp [More]
Hi I always see below start/stop messages in the D:\app\Oracle\opmn\logs\HTTP_Server~1 We are not stopping/starting anything. Does it mean that the http server stop/start itself ? Will this affect users ? 12/06/07 23:18:12 Start process 12/06/26 10:0 [More]
Hello everyone; I have recently tested a PPTP connection with a CISCO 1841 router and got success. I have configured a windows 7 client and successfully connected to the router and was able to access the documents in the server PC that I have mention [More]
Hi, In the WAD, If I try to attach one view of a query to a chart and another view of the same query to a table, both of the them display the results of the first view. What is the reason? Thanks.Hi, This should not happen, check you might not be ass [More]
J'ai un Ipod touch avec la version 4.2.1 et je viens de m'acheter le nouveau Ipod Touch 5 version 6.0 J'aimerais transférer la musique que j'ai de l'ancien au nouveau, comment est-ce que je pourais faire. Plusieurs des morceaux ne sont plus dans mon [More]
Hi there, I'm working on putting together a graphic portfolio website. The main navigation will come from a fixed-position menu overlay. For this reason, I'd like the contents (text and images) to be loaded via AJAX. So the static menu doesn't disapp [More]