BuildParameterName not overrided in OracleDataBase?

Topics: Data Access Application Block
Jun 12, 2007 at 1:42 PM
Could anyone please explain the reasons behind BuildParameterName function not been implemented in OracleDatabase class?

Similar to that of BuildParameterName in SqlDatabase class.

Thanks in advance,
schalla.
Jun 12, 2007 at 3:19 PM
It seems like OracleDatabase would need to override the BuildParameterName method in order to add the ParameterToken to the Parameter as done in the SqlDatabase Class.

I don't use Oracle so I am unaware if there is a reason for not being similar to the SqlDatabase Class.

Are you having a specific problem?

Regards,

Dave

_________________________________

David Hayden
Microsoft MVP C#
Jun 16, 2007 at 9:50 AM
Edited Jun 16, 2007 at 9:51 AM
I would like to write code that can server for both databases(oracle/SQL)

Thought, if CreateParameter function behaves same in both cases, that would help.

Regards,
schalla.

Jun 18, 2007 at 11:50 AM
You don't need to rename parameter name (so you can write ":ParamName" or "ParamName") on Oracle, this is why (I think) the method is not builded in the OracleDatabase class.

Regards,
Luca


schalla wrote:
I would like to write code that can server for both databases(oracle/SQL)

Thought, if CreateParameter function behaves same in both cases, that would help.

Regards,
schalla.



Sep 26, 2007 at 9:58 AM
I'm pretty sure you need to prefix parameter names in Oracle with :, at least I can't make it work unless I do so... So this looks like a bug to me. It should be implemented as for Sql Server IMO.
Dec 5, 2007 at 5:50 PM

noocyte wrote:
I'm pretty sure you need to prefix parameter names in Oracle with :, at least I can't make it work unless I do so... So this looks like a bug to me. It should be implemented as for Sql Server IMO.


Hi.. you're right... you NEED to prefix parameter names with ":".... I'm using Oracle 9i (9.2) and it's not working.. I've got a message like "invalid parameter name/number"... and searching in the Entlib code I couldn't find any code that puts ";"... I don't know if this depends on Oracle's version... but the truth is that I made the same code found in SQLDatabase for build a parameter name and things worked for me.... I don't know why entlib doesn't overrides that method for OracleDatabase too.... my 2 cents...

Regards,

Paulo Morandi