Board index » delphi » SQL 2000 Stored Procedure Input Parameter Problem?

SQL 2000 Stored Procedure Input Parameter Problem?

Version: Delphi 7
OS: Windows 2000
Database Server: SQL 2000

I am trying to port several ISAPI applications from ADO access to dbExress,
but I ran into a bit of trouble.

I created a simple test for my problem, a stored procedure that looks up
account data by email address.  The email address is stored as a varchar(30)
field.  I created a stored procedure that has one input parameter called
@email and it is also a varchar(30).

I used the TSQLDataSet component, and it filled in the TParams properties,
but it set the FieldType to ftFixedChar, I thought that was strange, but
pressed on.  I entered an email address that I knew was in the database and
nothing came back.  After playing with it for a long time, I padded the value
to 30 character and the procedure worked.  I have tried setting ParamCheck to
false and manually building the Params, but no luck.  I tried every other
combo too, with no luck

Is the correct behavior?  Have I just missed something?

Patrick

 

Re:SQL 2000 Stored Procedure Input Parameter Problem?


Looks like my problem could be related to the same bug discussed in the
"INSERT INTO command with dbExpress and MS SQL Server 2000 thread"

The system pads the parameters with something until I force spaces.  The
spaces are trimmed by the RTRIM command inside my stored procedure but the
ASCII 0 characters are not.

"James P Chapman" <jpchap...@holdentpa.com> wrote in message
news:3d851a46$1@newsgroups.borland.com...

Quote
> Version: Delphi 7
> OS: Windows 2000
> Database Server: SQL 2000

> I am trying to port several ISAPI applications from ADO access to dbExress,
> but I ran into a bit of trouble.

> I created a simple test for my problem, a stored procedure that looks up
> account data by email address.  The email address is stored as a
varchar(30)
> field.  I created a stored procedure that has one input parameter called
> @email and it is also a varchar(30).

> I used the TSQLDataSet component, and it filled in the TParams properties,
> but it set the FieldType to ftFixedChar, I thought that was strange, but
> pressed on.  I entered an email address that I knew was in the database and
> nothing came back.  After playing with it for a long time, I padded the
value
> to 30 character and the procedure worked.  I have tried setting ParamCheck
to
> false and manually building the Params, but no luck.  I tried every other
> combo too, with no luck

> Is the correct behavior?  Have I just missed something?

> Patrick

Re:SQL 2000 Stored Procedure Input Parameter Problem?


Quote
James P Chapman wrote...
> Looks like my problem could be related to the same bug discussed in the
> "INSERT INTO command with dbExpress and MS SQL Server 2000 thread"

> The system pads the parameters with something until I force spaces.  The
> spaces are trimmed by the RTRIM command inside my stored procedure but the
> ASCII 0 characters are not.

Looks like driver pads it with character #0. Until Borland fixes it,
the only way around it is to pad the value with spaces to the field
size.
--
Delphi Guy

Re:SQL 2000 Stored Procedure Input Parameter Problem?


Bug is addressed and a patch should be available soon.

T.Ramesh.

Quote
"Delphi Guy" <n...@spam.com> wrote in message

news:MPG.17f05a52a680eb6b9896cb@newsgroups.borland.com...
Quote
> James P Chapman wrote...
> > Looks like my problem could be related to the same bug discussed in the
> > "INSERT INTO command with dbExpress and MS SQL Server 2000 thread"

> > The system pads the parameters with something until I force spaces.  The
> > spaces are trimmed by the RTRIM command inside my stored procedure but
the
> > ASCII 0 characters are not.

> Looks like driver pads it with character #0. Until Borland fixes it,
> the only way around it is to pad the value with spaces to the field
> size.
> --
> Delphi Guy

Re:SQL 2000 Stored Procedure Input Parameter Problem?


Hi

When is the patch mentioned ready ?

Roy Nielsen

Other Threads