Last post May 21, 2009 10:30 AM by alessandro
May 20, 2009 04:19 PM|rtippenh|LINK
I know that Oracle defaults to Bind by position for parameters when using Bind Variables and that I can set a property called BindByName on OracleCommand objects, but how can I do this using a SQLDatasource component? Is there a way to default all connections to
use BindByName? I don't see where I can set that feature when using a SQLDataSource.
Thanks for your help
SQLDATASource Oracle BindByName
May 20, 2009 08:19 PM|alessandro|LINK
If BindByName is supposedly the capability for you to send parameters to your stored procs by name rather than by index, then this is already default and there is nothing special you need to do as far as SqlServer and the .NET Data Provider for Sql Server
it does not matter in what order you add your parameters to the sqlcommand objects parameter collection. The name and the data type needs to match.
May 21, 2009 10:01 AM|rtippenh|LINK
BindByName appears to be what we are looking for, except it is turned off by default for Oracle's ODP.NET Driver. I don't think it was obvious, but we are connecting to an Oracle Server, not SQL and trying to do it using the Oracle Drivers, not Microsoft's.
When we use Microsoft's oracle drivers, the server seems to ignore indexes, so we are using the Microsoft Drivers for Dev and the Oracle .NET Provider for Production.
May 21, 2009 10:30 AM|alessandro|LINK
Oh, i see. I understood your question the other way around in that you were coming from oracle and was looking for BindByName functionality when connecting to Sql Server :p
Glad you got it resolved.