• 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

Sybase SP error - Operand type clash: INT is incompatible with DATETIME

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am calling a sybase SP from my application like following:

conn = getSybaseConnection();

procName = " testschema.PlaceOrder";
procStmt = "{?=CALL " + procName + "( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}";

I am setting all other variables and also do like this.

cstmt.setString(2, address);
.....
cstmt.registerOutParameter(1, Types.INTEGER);
cstmt.registerOutParameter(44, Types.INTEGER);
cstmt.registerOutParameter(45, Types.INTEGER);

First '?' and last 2 '?' are out parameters.

But, after execution, I am getting the following error:
"Operand type clash: INT is incompatible with DATETIME"

when I try to access my first out param as:

cstmt.execute();
procStatus = cstmt.getInt(1);

Could someone tell what would be the problem?

Thanks in advance,
Raj A
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please alter your log-on name to conform with the Ranch's naming policy.

Welcome to the Ranch.

You need to get the metadata for the row you are querying; obviously there is a DATETIME value which you are mistakenly trying to get INTs into or out of.
reply
    Bookmark Topic Watch Topic
  • New Topic