Insert Query with parameters

activities
studio

#1

Hi,
I’m trying to insert data into database table. So, How can I create parameters and pass them into the SQL query.

Regards,
Krishnakanth


#2

Hi,

Not sure whether understood your query entirely. If it is to iterate through a data table and insert to a table you can do similar to below,

for each row in DT
{
query=“INSERT INTO Robotics.DUMMY_TABLE (ACCOUNT_NAME,MSISDN,STATUS) values (’”+row.ItemArray(0).ToString.Trim+"’,’"+row.ItemArray(1).ToString.Trim+"’,‘Complete’)"

}

Regards,
Shiju Mathew