本文介绍了我试图从C#.NET调用foxpro存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我收到此错误
错误[42000] [Microsoft] [ODBC Visual FoxPro驱动程序]语法错误或访问冲突
using(OdbcConnection conn = new OdbcConnection(constants.connetionStringRetailBodega580)){
conn.Open();
var result = new object [1];
string sqlProcedure =" {call stkdisponible()}" ;;
System.Data.Odbc.OdbcDataAdapter da = new OdbcDataAdapter();
da.SelectCommand = conn.CreateCommand();
da.SelectCommand.CommandType = CommandType.StoredProcedure;
da.SelectCommand.CommandText = sqlProcedure;
OdbcDataReader dr = da.SelectCommand.ExecuteReader();
// OdbcDataReader dr = cmd.ExecuteReader();
............
...........
}
解决方案
I'm getting this error
ERROR [42000] [Microsoft][ODBC Visual FoxPro Driver]Syntax error or access violation
using(OdbcConnection conn = new OdbcConnection (constants.connetionStringRetailBodega580)) { conn.Open (); var result = new object[1]; string sqlProcedure = "{call stkdisponible()}"; System.Data.Odbc.OdbcDataAdapter da = new OdbcDataAdapter (); da.SelectCommand = conn.CreateCommand (); da.SelectCommand.CommandType = CommandType.StoredProcedure; da.SelectCommand.CommandText = sqlProcedure; OdbcDataReader dr = da.SelectCommand.ExecuteReader (); //OdbcDataReader dr = cmd.ExecuteReader (); ............ ........... }
解决方案
这篇关于我试图从C#.NET调用foxpro存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!