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!