Info

この質問は閉じられています。 編集または回答するには再度開いてください。

variable not going into data base. SQL server 2014

1 回表示 (過去 30 日間)
Asad Ullah
Asad Ullah 2016 年 2 月 26 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
i am trying to send some variable into SQL server 2014 with MATLAB. it is sending numeric value but not sending variable or string. (code is below) Please help
variable = 123;
conn = database('OMR','sa','123',...
'Vendor','Microsoft SQL Server','Server','MY_PC',...
'AuthType','Server','portnumber',1433);
sqlquery = 'INSERT INTO [dbo].[abc] ([q1]) VALUES (variable)';
curs = exec(conn, sqlquery);
close(curs);
close(conn);

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by