Sign in

username:

password:



Not a member?

Search matlab



Search tips

Subscribe to matlab



matlab by Keywords

Atanh | Autocorrelation | Bandpass Filter | C++ | Conv | Database | Deconv | Excel | FFT | Filter | Filtering | FIR | Fourier Transfrom | FSK | Gaussian Noise | Haykin | IFFT | Image | Java | LFSR | LMS | LPC | MEX | OFDM | QPSK | Radix | Random | Sampling | Segmentation | Simulink | Visual Basic | Waveform | Wavelet

Discussion Groups

Discussion Groups | Matlab DSP | Hi all, I would obtain your help to update a database

Technical discussion about Matlab and issues related to Digital Signal Processing.

  

Post a new Thread

Hi all, I would obtain your help to update a database - emanuelemignosa - May 8 8:07:40 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. 
 
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. 



(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )