Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

variable not going into data base. SQL server 2014

조회 수: 2 (최근 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