SQL query with actxserver
2 次查看(过去 30 天)
显示 更早的评论
I am trying to run a SQL stored procedure that returns a parameter but I can't figure out how to get that value. When I run this psuedo code I get an error saying I need to define the output parameter. I know the DB connection is correct and works because I have other stored procedures that work but none of them have output.
DB = actxserver('ADODB.Connection') DB.Open( serverstuff here) DB.Execute('exec procedurename @inputParam=string')
0 个评论
回答(1 个)
Madhura Suresh
2014-1-31
Have you tried using fetch?
a= DB.exec(query) data=fetch(a)
2 个评论
Madhura Suresh
2014-2-5
What version of MATLAB are you using? SQL queries might work, but there is no workaround for stored procedures using ACTXSERVER.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!