dbTalk Databases Forums  

External functions - UNIX

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss External functions - UNIX in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
David DeRam
 
Posts: n/a

Default External functions - UNIX - 09-25-2009 , 09:35 PM






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.

Reply With Quote
  #2  
Old   
Kory Hodgson (Sybase iAnywhere)
 
Posts: n/a

Default Re: External functions - UNIX - 09-27-2009 , 08:06 PM






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:
Quote:
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.


Reply With Quote
  #3  
Old   
David DeRam
 
Posts: n/a

Default Re: External functions - UNIX - 10-05-2009 , 10:36 AM



Thank you. That is the information I needed. That solved the problem.

"Kory Hodgson (Sybase iAnywhere)" <khodgson (AT) A_SPAM_FREE_sybase (DOT) com> wrote in
message news:4ac00bff$1 (AT) forums-1-dub (DOT) ..
Quote:
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.

Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.