473,473 Members | 1,881 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

db2 v9.1 UDF in C, Windows platform

10 New Member
Hello everyone,

i am having some problems with a very simple UDF function writen in C.

I have compiled the c file into a DLL ( used Dev-C++ ) an copyed the dll into functions directory ( C:\Program Files\IBM\SQLLIB\FUNCTION\ ). When i run the function ( VALUES(CLOBCOMP(CLOB('A'),CLOB('A'))) ) i get the following error:

SQL0444N Routine "XX.CLOBCOMP" (specific name "CLOBCOMP") is implemented with code in library or path "\ClobComp", function "ClobComp" which cannot be accessed. Reason code: "6". SQLSTATE=42724

Code example C:
Expand|Select|Wrap|Line Numbers
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <sqludf.h>
  4.  
  5. #if defined(__cplusplus)
  6. extern "C"
  7. #endif
  8.  
  9. void SQL_API_FN ClobComp( SQLUDF_CLOB *clob_1, SQLUDF_CLOB *clob_2, SQLUDF_INTEGER *int_1, SQLUDF_TRAIL_ARGS)
  10. {
  11.  *int_1 = 0;
  12.     if (clob_1 == clob_2) {
  13.         *int_1 = 1;
  14.     }
  15.  return;
  16. }
  17.  
Sql function:
Expand|Select|Wrap|Line Numbers
  1. CREATE FUNCTION CLOBCOMP( CLOB(2M), CLOB(2M))
  2. RETURNS INTEGER
  3. EXTERNAL NAME 'ClobComp!ClobComp'
  4. SPECIFIC CLOBCOMP
  5. LANGUAGE C
  6. PARAMETER STYLE DB2SQL
  7. DETERMINISTIC
  8. NOT FENCED THREADSAFE
  9. NO SQL
  10.  
System path information:
Expand|Select|Wrap|Line Numbers
  1. Path=C:\Program Files\IBM\SQLLIB\BIN;C:\Program Files\IBM\SQLLIB\FUNCTION;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\Syst
  2. em32\Wbem;C:\Program Files\Common Files\Lenovo;C:\Program Files\Lenovo
  3. \Client Security Solution;C:\Program Files\Common Files\Adobe\AGL;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\
  4. Microsoft Visual Studio 9.0\VC\bin\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL
  5.  Server\100\DTS\Binn\;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\;C:\Program Files\OpenVPN\bin
  6.  

Any help will be very apriciated.

best regards,

Marko
Jun 11 '09 #1
0 1588

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Jesper | last post by:
Does anyone know some c++ code for shutting down windows? I want to write a program using borland c++ builder to shut down windows. --
3
by: James | last post by:
I can get the windows version number from System.Environment.OSVersion e.g. "Windows NT 5.1.2600.0" for XP SP2. I was wondering whether this tells you the type of windows it is or if you have to...
7
by: lvpaul | last post by:
Hallo ! I am using IIS-Windows-Authentication in my intranet (web.config <authentication mode="Windows" /> <identity impersonate="true" /> How can I get the users (client) IP-Address ? I...
4
by: william | last post by:
I've got a strange problem on windows (not very familiar with that OS). I can ping a host, but cannot get it via urllib (see here under). I can even telnet the host on port 80. Thus network...
29
by: mastermagrath | last post by:
Hi, Sorry for the possibly silly question. Am i right in saying that the C library i use on a windows machine really utilises the windows API for all its operations e.g. opening files, printing...
6
by: ulillillia | last post by:
I've been following the tutorial here to learn Windows programming (along with the help file from the Windows Platform SDK): http://www.cprogramming.com/tutorial/opengl_windows_programming.html ...
4
by: Christian Maslen | last post by:
Hi All, I understand in older versions of DB2/UDB this was not possible. The following article explains how I might do this ...
2
by: p.lavarre | last post by:
Let's suppose you get Python for Vista Windows today from http://www.python.org/download/. Should you then conclude that the tests: if platform.system() in ('Windows', 'Microsoft'): if not...
1
by: Vinod Sadanandan | last post by:
Cross Platform Migration An Unproblematic Approach (Windows-UNIX ) Oracle 10\11g The principal restriction on cross-platform transportable database is that the source and destination platform...
20
by: macca | last post by:
Hi, I just started a new web developer job (my first actually) and the machine they gave me to use is a Mac. Two days in and I'm running a Win XP environment on my Mac at work (using VMWare), ...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.