Error running datainsert to insert row in sqlserver database
조회 수: 5 (최근 30일)
이전 댓글 표시
Hello,
I'm trying to insert a row into my sql server database using datainsert but I keep getting errors everytime I run.
![Annotation 2019-05-13 003654.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/219100/Annotation%202019-05-13%20003654.png)
I know my connection is correct as it works in fetching data.
conn = database('SqlServer','','');
data = {1 'Deposit' 500};
columns = {'CardID' 'Type' 'Amount'};
table = 'HakunaMatata.dbo.Transcations';
datainsert(conn,table,columns ,data);
close(conn);
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Database Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!