Error with fastinsert after upgrading from 2016a to 2017a
3 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!