Anyone out there know how to pass a sql statement as a parameter value?
I'm sure there is a way to do this - maybe with the right data type and parameter type combination (2nd and 3rd arguments in CreateParameter method)....I'll keep checking the web, but if anyone has done this before, please demonstrate. Thanks.Code:Set para = cmdCommand.CreateParameter("estimate_id", adNumeric, adParamReturnValue, 20, "SELECT NVL(MAX(estimate_id) + 1,1) FROM time_estimates") cmdCommand.Parameters.Append para




Reply With Quote