wood burning stoves 2.0*
The moose likes JDBC and the fly likes SybSQLException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SybSQLException" Watch "SybSQLException" New topic


Hd Desai
Ranch Hand

Joined: Aug 04, 2003
Posts: 65

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
internet detective

Joined: May 26, 2003
Posts: 30123

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!

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
I agree. Here's the link: http://aspose.com/file-tools
subject: SybSQLException
Similar Threads
com.sybase.jdbc2.jdbc.SybSQLException: Too many parameters -- symbol table overflow.
Connection is already closed due to Firewall
hibernate failed to find table or store procedure suddenly
maximum length of identitifer in Sybase for insert query
Connection is already closed.due to Firewall