Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 26th, 2005, 09:07 AM
srpantano srpantano is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2005
Posts: 3 srpantano User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 46 m 57 sec
Reputation Power: 0
Error in UDF

I created this function (Delphi) in a DLL and I declared in a FB 1.5 / 2.0, but when I run the query has error like below, somebody knows why???

DLL code
function StringToInteger( StringValor1 : PChar ) : Integer; stdcall;
begin

try
Result := StrToInt( Trim( StringValor1 ) );
except
Result := 0;
end;

end;

UDF declaration
DECLARE EXTERNAL FUNCTION STRINGTOINTEGER
CSTRING(254) CHARACTER SET NONE
RETURNS INTEGER BY VALUE
ENTRY_POINT 'StringToInteger' MODULE_NAME 'DLLByUDF'


Error:
ISC ERROR CODE:335544726

ISC ERROR MESSAGE:
Error reading data from the connection.

STATEMENT:
TIBOInternalDataset: "<TApplication>.frmMain.dlgWisql.<TIBOQuery>.<TIBOInternalDataset>."

Reply With Quote
  #2  
Old September 26th, 2005, 09:34 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,907 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 9 h 21 m 6 sec
Reputation Power: 279
Do you need this function at all? Can't you just
sql Code:
Original - sql Code
  1. SELECT CAST('12' AS integer) FROM ...

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Error in UDF


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT