SQL query with actxserver

4 ビュー (過去 30 日間)
Reese
Reese 2014 年 1 月 30 日
コメント済み: Madhura Suresh 2014 年 2 月 5 日
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')

回答 (1 件)

Madhura Suresh
Madhura Suresh 2014 年 1 月 31 日
Have you tried using fetch?
a= DB.exec(query) data=fetch(a)
  2 件のコメント
Reese
Reese 2014 年 1 月 31 日
There is no fetch command in base matlab. It is in the datafeed or database toolbox which I don't have.
Madhura Suresh
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 ExchangeDatabase Toolbox についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by