Reply by emanuelemignosa May 8, 20072007-05-08
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.

P.S.
The code is:
"
function matrixdata = update( a, ooo)
conn = database('db1','','')
ping(conn)
curs = exec(conn, 'select data1, data2 from Data')
setdbprefs('DataReturnFormat','numeric')
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 )
rollback(conn)
"
where data11 is not between quotes.