Page 1 of 1

How to Pass External Values to Parameters of TMSUpdateSQL component

Posted: Tue 28 Nov 2006 15:38
by Balaji
Hi,

I am using Liecensed Version of SDAC components.

I have Query Component and in the SQL property of it i have "Select" statement. Using this Select i am selecting 5 Columns Unique Values. For the UpdateObject property of the Query Component i have a TMsUpdateSQL component attached. In this TMsUpdateSQL component i have insert statement, which will insert a row in to table having 7 Columns. Of these 7 Columns, 5 Columns values can be obtained by Opening the Query component i.e setting the Query.open. For the remaining two columns i want to set the values from Code.

I want to know, how to pass values to parameters of TMsUpdateSQL component using SDAC components. is there anything like parambyname property which can be used to pass parameters to TMsUpdateSQL compoenent?

Note: I cannot use SQLInsert bcos SQLInsert has a limitatation of "Parameter names should be same".


If u can explain me using an example, it will be help ful to me.

Thanks in Advance.

Posted: Wed 29 Nov 2006 10:24
by Jackson
You can use TCustomDADataSet.BeforeUpdateExecute event to set parameters of corresponding statements.
What limitation do you mean? The behaviour of the TMSUpdateSQL component and the SQLInsert property is the same.