Hi,

I construct a string in my application like mystring= "insert into DRTABLE(field1,field2) values (MSFLEXGRID1.textmatrix(i,1), MSFLEXGRID.TEXTMATRIX(i,2))"

Now i want to use this string in a for-loop :

For i = 0 To MSFlexGrid1.Rows - 1 Step 1
'in this statement the i should be replaced by the value of
'the loop counter i
'the replace function does not help, because the string is still
'not taken as a statement which can be executed
execute(mystring)
Next i

Anyone knows how i can do that ?