0
here 지침에 따라 LightSwitch 2012 응용 프로그램 내에서 (매개 변수없는) MySQL SP를 호출합니다. 이 인용 된 지침은 SQL Server SP에 대한 것입니다. 여기 Lightswitch에서 MySQL 저장 프로 시저를 호출하는 방법?
은 관련 코드입니다 : ". 사용자가 로그인 '루트'실패"이것은 SQLException이 함께connection.Open();
에 실패
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
namespace LightSwitchApplication
{
public partial class StoredProcceduresService
{
partial void MakeMasterOperations_Inserting(MakeMasterOperation entity)
{
using (SqlConnection connection = new SqlConnection())
{
string connectionStringName = this.DataWorkspace.SystemInfo.Details.Name;
connection.ConnectionString = ConfigurationManager.ConnectionStrings[connectionStringName].ConnectionString;
string storedProcedure = "make_master";
using (SqlCommand command = new SqlCommand(storedProcedure, connection))
{
command.CommandType = CommandType.StoredProcedure;
connection.Open();
command.ExecuteNonQuery();
}
}
this.Details.DiscardChanges();
}
}
}
LightSwitch 내에서 동일한 연결 문자열을 사용하는 다른 데이터베이스 조작이 정상적으로 작동하므로 사용자 ID와 비밀번호가 괜찮음을 알고 있습니다.
LightSwitch에서 MySQL SP를 호출 할 수 있습니까? 그렇다면 어떻게?