Hi all, I would obtain your help to update a database

Started by emanuelemignosa May 8, 2007
Hi all, and thanks in advance.
I'm building a algorithmn that engines as output a numeric matrix
data that i download in a database as Access. The output is a
variable, so when i update the database i don't know what is the
values that identify the cells to update it. To solve this
inconvenient i thought to import the matrix data that i must update,
identify it and only now update the cells of matrix.
To solve the problem i must set "where clause" as variable, how can
do it?
I'm thinking, but i count on you.
Thanks again Emanuele.

The code is:
function matrixdata = update( a, ooo)
conn = database('db1','','')
curs = exec(conn, 'select data1, data2 from Data')
curs = fetch(curs, ooo)
matrixdata = curs.Data;%matrix of data
data11 = matrixdata(1,1)%cell
data21 = matrixdata(2,1)%cell
colnames = {'data1'}
exdata = {a}
whereclause = ['where data1 =' ,data11]
update(conn, 'Data', colnames, exdata, whereclause )
where data11 is not between quotes.