![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm having trouble creating a function with an external call. I have no problems in Windows but in Ubuntu 7.1.0 (the asa database server window indicates linux 2.6.22) I'm getting the following error. "The external function call is incompatible" SQLCODE = -818 ODBC 3 State = "HY000" The version of Sybase is 9.0.2.2452. The function is defined like this... CREATE FUNCTION func1() RETURNS INT EXTERNAL NAME 'testme@testobj' The shared object looks like this int testme() { return 22; } It appears that it is actually finding the shared object without any problems. If I change the external name I get a different error. "Could not load dynamic library 'notestobj.so'" SQLCODE = -620 I'm not sure if this is a permissions problem or possibly data types. I would appreciate any suggestions. I also noticed that if I change the EXTERNAL NAME 'testme@testobj' to something like EXTERNAL NAME 'testmeXXX@testobj' I'm getting the original error "The external function call is incompatible"...and thought that was interesting. Thank you. |
#3
| |||
| |||
|
|
I think it might be because the function prototype doesn't match what is expected. Please see the function prototype section in the docs: http://www.ianywhere.com/developer/p...9/00000723.htm David DeRam wrote: I'm having trouble creating a function with an external call. I have no problems in Windows but in Ubuntu 7.1.0 (the asa database server window indicates linux 2.6.22) I'm getting the following error. "The external function call is incompatible" SQLCODE = -818 ODBC 3 State = "HY000" The version of Sybase is 9.0.2.2452. The function is defined like this... CREATE FUNCTION func1() RETURNS INT EXTERNAL NAME 'testme@testobj' The shared object looks like this int testme() { return 22; } It appears that it is actually finding the shared object without any problems. If I change the external name I get a different error. "Could not load dynamic library 'notestobj.so'" SQLCODE = -620 I'm not sure if this is a permissions problem or possibly data types. I would appreciate any suggestions. I also noticed that if I change the EXTERNAL NAME 'testme@testobj' to something like EXTERNAL NAME 'testmeXXX@testobj' I'm getting the original error "The external function call is incompatible"...and thought that was interesting. Thank you. |
![]() |
| Thread Tools | |
| Display Modes | |
| |