I am using oracleclient, but I want to use enterprise library too and with
enterprise library if I try to use oracleType.varchar, I get a syntax errror
The best overloaded method match for
'Microsoft.Practices.EnterpriseLibrary.Data.Database.AddInParameter(System.Data.Common.DbCommand,
string, System.Data.DbType, object)' has some invalid arguments
This is what my code looks like
db.AddInParameter(dbCommand, "dayPhone", OracleType.VarChar,
strList[9].ToString().Trim());
> Hi,
> if using the Oracle client
[quoted text clipped - 15 lines]
> >
> >Is there any way I can define the dayPhone differently.
Gregg Walker - 12 Jun 2007 01:34 GMT
> The best overloaded method match for
> 'Microsoft.Practices.EnterpriseLibrary.Data.Database.AddInParameter(System.Data.Common.DbCommand,
> string, System.Data.DbType, object)' has some invalid arguments
> This is what my code looks like
> db.AddInParameter(dbCommand, "dayPhone", OracleType.VarChar,
> strList[9].ToString().Trim());
Vinki - You cannot use an OracleType where a DbType is called for. I would
trying the following and see if it works.
db.AddInParameter(dbCommand, "dayPhone", DbType.String,
strList[9].ToString().Trim());
or ...
db.AddInParameter(dbCommand, "dayPhone", DbType.AnsiString,
strList[9].ToString().Trim());
Oracle should have a document that maps the OracleType values and .Net Type
values to DbType values. This would help you figure out which DbType is
most appropriate for OracleType.VarChar.
--
Gregg Walker