public void DeriveParameters(bool includeReturnParameter) { //TODO does this account for offsets? IDataParameter[] derivedParameters = AdoTemplate.DeriveParameters(Sql, includeReturnParameter); for (int i = 0; i < derivedParameters.Length; i++) { IDataParameter parameter = derivedParameters[i]; DeclaredParameters.AddParameter(parameter); } usingDerivedParameters = true; }
public void DeriveParams() { IDbProvider dbProvider = DbProviderFactory.GetDbProvider("SybaseAse-15"); dbProvider.ConnectionString = "Data Source='MARKT60';Port='5000';UID='sa';PWD='';Database='pubs2';"; AdoTemplate adoTemplate = new AdoTemplate(dbProvider); IDataParameter[] derivedParameters = adoTemplate.DeriveParameters("@sp_hello", true); if (derivedParameters.Length == 0) { Console.WriteLine("Derived Parameters = 0!!!!"); } for (int i = 0; i < derivedParameters.Length; i++) { Console.WriteLine("Parameter " + i + ", Name = " + derivedParameters[i].ParameterName + ", Value = " + derivedParameters[i].Value); } }