Can somebody please tell me what the difference is between adParamInput and adParamOutput?
I’m using parameters in a Classic ASP/MySQL environment.
Many thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
AdParamInput is for a value sent TO the db, AdParamOutput is for a value returned FROM the db (an an output parameter from a stored procedure for instance) as distinct from the recordset that is returned.
EDIT: expand answer.
In and out parameters are used to pass typed scalar values back and forth between the client and the server. So, you might use an input parameter to give the primary key of the record you are looking for, and an output parameter to return a seperate, but related value. For instance, if you had a table of employees, and you wanted to select all of the employees by department, and their combined salary last year. Returning the combined salary in every row of the recordset would be possible, but inconvenient on the client. Instead you return a recordset and set the value of an output parameter. The client extracts the scalar, and then processes the recordset (presenting a list of names and CURRENT salaries, along with how much these people were paid last year). In other cases you might just return the output parameter, without a recordset.