Error with fastinsert after upgrading from 2016a to 2017a

2 visualizaciones (últimos 30 días)
lzxh
lzxh el 9 de En. de 2018
Editada: lzxh el 9 de En. de 2018
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.

Respuestas (0)

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by