This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes SybSQLException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "SybSQLException" Watch "SybSQLException" New topic
Author

SybSQLException

Hd Desai
Ranch Hand

Joined: Aug 04, 2003
Posts: 65
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
Marshal

Joined: May 26, 2003
Posts: 32481
    
214

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!


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
 
Have you checked out Aspose?
 
subject: SybSQLException
 
jQuery in Action, 3rd edition