다음 코드는 제외 command.ExecuteReader() 실패 실행 로켓 U2 도구 키트를 사용하여 간단한 선택 쿼리를 실행하여.NET
"ERROR [] [U2] UCINET-UO] ERROR [] [U2] [UCINET-UO] [U2] [UCINET-UO] [UCINET-UO] XTOOLSUB 서브 루틴 실패 계정 (2)에 로그온 잘못된 계정 이름/데이터/TSSA9. ud_database 파일 및 UD.ACCOUNT 클래스 이름 = UDAttribute 메서드 이름 = GetAttributes (...) 클래스 이름 = UDAttribute 메서드 이름 = GetAttributes (...) 원본 : U2.Data.Client TargetSite : U2.Data.Client.NativeAccess. TableInfoForNativeAccess GetTableInformation (U2.Data.Client.U2Command) "
using (var connection = ConnectionFactory.Create())
using (var command = connection.CreateCommand())
{
command.CommandText = "Select ID From CONTRACTORS;";
connection.Open();
using (var reader = command.ExecuteReader())
{
while (reader.Read())
{
var o = reader[0];
}
}
}
public class ConnectionFactory
{
public const string Password = "****";
public const string UserName = "****";
public const string Server = "****";
public static U2Connection Create()
{
var connectionStringBuilder = new U2ConnectionStringBuilder
{
UserID = UserName,
Password = Password,
Server = Server,
Database = "/data/TSSA",
ServerType = "UNIDATA",
AccessMode = "Native", // FOR UO
RpcServiceType = "udcs", // FOR UO
Connect_Timeout = 9000,
QueryTimeout = 9000,
PersistSecurityInfo = true,
Pooling = false
};
return new U2Connection
{
ConnectionString = connectionStringBuilder.ToString()
};
}
}
저는 U2.Data.Client 버전 2.1.0.2051을 사용하고 있습니다.
어떤 생각이나 아이디어라도 감사 할 것입니다. 감사.
당신은 계정/데이터/TSSA가 ud_database 파일과 UD.ACCOUNT에 실제로 있음을 확인 했습니까? – Tap
큰 질문입니다. 불행히도 나는 그것이 의미하는 바가 무엇인지, 어떻게 체크 할 것인가, 어떻게 해야할지를 모른다. 나는이 방법을 연결하면 서버 설정을 업데이트 할 필요가 없다는 것을 의미하는 인상을 받고 있었지만 분명히 틀렸어? –