BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: Output parameter problem with AS/400 Stored Procedure

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi As400
View previous topic :: View next topic  
Author Message
Augusto
Guest





PostPosted: Wed Mar 03, 2004 3:49 pm    Post subject: Re: Output parameter problem with AS/400 Stored Procedure Reply with quote



Hi!!

How are you connecting delphi with db2 on a as400?/

I'm using BDE and i need to run stored procedures.

I'ts very important because we have a client that uses this server with this
db and my application was developed in delphi 5 using bde

Thanks in advance

Augusto

Benner Tecnologia de Sistemas
[email]augusto (AT) bennersaude (DOT) com.br[/email]

Brasil
"Mark Grimmond" <dicksmith4 (AT) bigpond (DOT) com> escreveu na mensagem
news:6fpk3a$2t512 (AT) forums (DOT) borland.com...
Quote:
Sorry for the e-mail out of the blue, but I am having the same
problems.
Have you found a solution or work around yet ??.

The problem is with the TStoredProc component. I have logged a Bug
report on the Borland Support WEB page, Ref: 17378 in relation to this
matter.

The BDE returns both parameter type and parameter sub-type
information, this can be seen by using the DbiOpenSPParamList BDE API
call against your procedure. With a procedure defined as described on
the AS/400, the sub-type returns a value of 'fldstFIXED (31)' which is
defined in the BDE.INT file as a valid string sub-type.

The TStoredProc component however, maps the sub-type value used for
its BDE calls via a fixed table, FldSubTypeMap defined in
DBCOMMON.PAS, which results in a value of 0 being used on BDE calls.
Look at the code for TStoredProc.PrepareProc (in DBTABLES.PAS) to see
how this is done.

Possible work arounds:

1. Recompile your project using a modified version of DBCOMMON.PAS
that uses the value for fldstFIXED in the appropriate entry of the
FldSubTypeMap array. I have successfully used this method, although if
you have a number of procedures and / or tables this may cause other
problems.

2. Change the definition of the parameter on the AS/400 CREATE
PROCEDURE call to be VARCHAR(xx) and change the procedure to take into
account the length bytes that appear at the beginning of the string.

Hope this is of some help.

Regards,

Mark Grimmond
Dick Smith Electronics (Australia)





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi As400 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.