• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SybSQLException

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic