Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SybSQLException

 
Hd Desai
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new to sybase.

We are using sybase 12.0 and jconnect 5

I am using this query
insert into SACMDIC (I_FTP_BATCH,C_FTP_DATA,D_FTP_DATE) values (5,"'T4186JW',,insert into IllustrationUsage (IllustrationID, UsageID, NewUsageState, UserStamp, DateStamp, StarPart_Indicator, Supervisor_Approval_Indicator, Del_Pending) values ('73789','6144',0,'T5414KK','6/2/03 10:46 AM',0,0,0)", getdate())

and i checked, second field c_FTP_DATA is VARCHAR and size is 250.

But its giving the exception like

com.sybase.jdbc2.jdbc.SybSQLException: The identifier that starts with '"'T4186JW',,insert into Illus' is too long. Maximum length is 28.

[4/21/05 14:07:01:203 IST] 6962dfdf SystemErr R at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2408)
[4/21/05 14:07:01:203 IST] 6962dfdf SystemErr R at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java(Compiled Code))
[4/21/05 14:07:01:203 IST] 6962dfdf SystemErr R at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
[4/21/05 14:07:01:203 IST] 6962dfdf SystemErr R at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:201)
[4/21/05 14:07:01:203 IST] 6962dfdf SystemErr R at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:182)
[4/21/05 14:07:01:203 IST] 6962dfdf SystemErr R at com.sybase.jdbc2.jdbc.SybStatement.executeLoop(SybStatement.java:1535)
[4/21/05 14:07:01:203 IST] 6962dfdf SystemErr R at com.sybase.jdbc2.jdbc.SybStatement.execute(SybStatement.java:1527)
[4/21/05 14:07:01:203 IST] 6962dfdf SystemErr R at com.sybase.jdbc2.jdbc.SybStatement.execute(SybStatement.java:742)


If anybody knows about this pls let me know.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 35976
422
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sejal,
Take a look at the quotes around T4186JW. There is an extra open double quote. This is causing the database to try to put everything after that in one field. Not what you wanted!
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!