If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Getting error while compiling SQC file in window OS

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-29-10, 02:21
surjyakp surjyakp is offline
Registered User
 
Join Date: Jan 2010
Posts: 26
Getting error while compiling SQC file in window OS

Hi,
I have a statement like "static SQL TYPE IS CLOB(12000) cCmt = {0};"
in sqc (embeded C stored procedure) file. It is getting compiled in IBM AIX OS.

Details about UNIX env:
UNIX OS: IBM AIX
Compiler: xlc 64 bit
Database version: db2 9.5

But while compiling in windows , getting below error
SQL0314N The host variable "cCmt" is incorrectly declared
Details about windowos env:
Compiler: cl (MS visual studio)
Database version: db2 9.5

Please suggest how to resolve the issue.

Thanks
Surjya
Reply With Quote
  #2 (permalink)  
Old 11-30-10, 05:11
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Have you tried using SQL_CLOB_INIT to initialize the member? Declaration of large object type host variables in C and C++ embedded SQL applications. Another thing to try is removing the "static" keyword and placing the variable on the stack. (That would be good as well in case you have a multi-threaded application or will move towards that in the future.) And then SQL0314 suggests to not use an initializer at all.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On