Problems with MS SQL stored procedures support (6.6.6 stable).
1. Can't enumerate parameters of stored proc if its name contains underline char ("_") because of wrong escaping (ZStoredProcedure.pas:315).
2. Can't bind memo and blob parameter values (not supported?) (ZDbcDbLibStatement.pas:699-703).
Buggy stored proc (MS SQL)
Moderators: gto, EgonHugeist
Not sure. I'm novice in ZeosLib architecture (since yesterday... hehe) and I have Delphi 5 only (so... no unicode support and many others "no").mdaems wrote:Can you fix these?
But I can prepare test scripts, advise and investigate where the problem is.
There are free editions of MS SQL 2005 and 2008.mdaems wrote:I'm not using mssql, so I can't just fix and test it myself.
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
I suppose you're talking about these lines:
Well, I did some investigation in the code.
My impression is that the AddEscapeCharToWildcards(ObjectName) function should be called inside each driver's implemention of GetProcedureColumns.
But maybe you read best al little more about the subject. This is the commit message for the 'AddEscapeCharToWildcards' line
Can you provide a patch to move the 'bad' code deeper into the dbc layer? I suppose best practise is to add it for all drivers where a select statement is used in GetProcedureColumns(). So not for Mssql, which uses 'exec sp_...'.
You don't have to patch both 7.x and 6.6.x separately, as I suppose porting the patch between those two branches should be easy enough to do for me.
If you don't want to do this effort, please file a bug report on the bug tracker, pointing to this forum post.
Mark
P.S. I don't install MSSQL as one more db on my machine because of the weight all thos database put on my system. Professionally I'm developing Oracle application, so I needed to install that one (which eats away 20 % of system memory on it's own). Mysql, Postgres, FB and SQLite are not that heavy. Now starting those databases for the test suite already takes more than 1 Gb of memory away.
Code: Select all
SplitQualifiedObjectName(Value, Catalog, Schema, ObjectName);
ObjectName := Connection.DbcConnection.GetMetadata.AddEscapeCharToWildcards(ObjectName);
ResultSet := Connection.DbcConnection.GetMetadata.GetProcedureColumns(Catalog, Schema, ObjectName, '');
My impression is that the AddEscapeCharToWildcards(ObjectName) function should be called inside each driver's implemention of GetProcedureColumns.
But maybe you read best al little more about the subject. This is the commit message for the 'AddEscapeCharToWildcards' line
Code: Select all
mdaems 5/10/2008 21:47:48
Escape underscores from the stored procedure name before looking up it's parameters - by mdaems - See http://zeos.firmos.at/viewtopic.php?t=2035
You don't have to patch both 7.x and 6.6.x separately, as I suppose porting the patch between those two branches should be easy enough to do for me.
If you don't want to do this effort, please file a bug report on the bug tracker, pointing to this forum post.
Mark
P.S. I don't install MSSQL as one more db on my machine because of the weight all thos database put on my system. Professionally I'm developing Oracle application, so I needed to install that one (which eats away 20 % of system memory on it's own). Mysql, Postgres, FB and SQLite are not that heavy. Now starting those databases for the test suite already takes more than 1 Gb of memory away.