我可以在我的Mono C#Gtk +应用程序中使用MySql存储过程吗?StoredProcedure与单声道C#?
我有尝试..使用MySql.Data.MySqlClient
;
// Prepare connecting to the database.
myConn = new MySqlConnection("server=localhost;database=table;uid=root;password=1234;");
cmd = myConn.CreateCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = @"Call newRow()";
myConn.Open();
cmd.ExecuteNonQuery();
myConn.Close();
如果我只是做在我的节目中硬编码SQL字符串,它的工作!
如..
cmd.CommandText = @“插入到表...
的问题是与:
cmd.CommandType = CommandType.StoredProcedure
- 线条。
USP只是一个古老的评论。 。打开电话没有错误..嗯..'调用newRow()'的工作,我从我的sqlwork工作台上运行它.. CommandType.StoredProcedure线获得红色,所以.. – Voidcode
我的连接字符串工作! – Voidcode