I am using Microsoft.Practices.EnterpriseLibrary.Data as DataLayer in my
project.

I am facing problem to pass objSqlParam array to methods provided by
Microsoft.Practices.EnterpriseLibrary.Data as DataLayer itseld(i.e.
db.ExecuteNonQuery(storedProcedureName, parameterValues) and as on same with
others)
I am doing as below:

Dim objSqlParam As SqlParameter() = Nothing
objSqlParam = New SqlParameter(1) {}
objSqlParam(0) = New SqlParameter("@CustId", SqlDbType.Int)
objSqlParam(0).Direction = ParameterDirection.OutPut
objSqlParam(0).Value = 1

objSqlParam(0) = New SqlParameter("@CustName", SqlDbType.Varchar)
objSqlParam(0).Direction = ParameterDirection.Input

objSqlClient.ExecuteNonQuery(SP_CustSave,
objSqlParam(0).Value,objSqlParam(1).Value))

This last should be as below
objSqlClient.ExecuteNonQuery(SP_CustSave, objSqlParam)

when i do this i found error for could not cast <datatype> to <datatype>

Weather i passed the objSqlParam array with values it works fine.

Help me out on this.

Regards,
JaiPrakash Sharma