Error with fastinsert after upgrading from 2016a to 2017a

2 views (last 30 days)
Hi,
I have been having a problem with writing to a database of mine using fastinsert after I've upgraded from Matlab 2016a to Matlab 2017a, I've gone back to 2016a and it works just fine.
Below is a clip of my script and the error that I get.
tableName = 'MyDB.dbo.model';
colNames = {'runDate', 'ID', 'data'};
conn = database('MS SQL Server','','');
uploadData = table(repmat(datestr(runDate, 'yyyy-mm-dd HH:MM:SS'), size(data,1), 1), ID, data);
uploadData.Properties.VariableNames = colNames;
fastinsert(conn,tableName,colNames,uploadData);
close(conn);
The error is...
Error using database.internal.utilities.DatabaseUtils.validateStruct (line 99)
Input structure, dataset or table incorrectly formatted. See help for details
Error in database.odbc.connection/insert (line 140)
data = database.internal.utilities.DatabaseUtils.validateStruct(data);
Error in database.odbc.connection/fastinsert (line 40)
insert( connect,tableName,fieldNames,data );
Thanks.

Answers (0)

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!