From: Nandish on
Hello,

I want to store the temperature value i am getting into the MS Access database. I went through example given in HELP.

The code to export data to database(MS Access) as i have written is as follow...

...
...
connct = database('DBTest','',''); % 'DBTest' - name of Data Sourse
exportdata = {AV09, AV10, AV11, AV12}; % Variables whose value need to store
colnames = {'A0','A1','A2','A3'}; % colomn name in Table
% get(connct, 'AutoCommit')
fastinsert(connct, 'Table_1', colnames, exportdata) %'Table-1' name of the Table
close(connct)
...
...

While executing this code i am getting following error,
??? Error using ==> database.fastinsert at 42
Invalid connection.

Error in ==> grid_on_image at 199
fastinsert(connct, 'Table_1', colnames, exportdata)

I checked line 42 of 'insert.m' , it shows,

if isa(connect.Handle,'double') % connct = connect.Handle (in my case)

error('database:database:invalidConnection','Invalid connection.')

end

So how can i change 'connct' to other class from class 'double'.
Or else what is the solution?
It works well using Visual Query Builder. I mean it does not showing error and export data to the databse with VQB.

Thank you,

nandish