が、私はこのエラーを取得:SQL Server 2000の/ ODBC SQL Serverの信頼関係接続に関連付けられていませんが、
ERROR [28000] [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
ここに私のコード(C#が)ですが、私はローカルおよびリモートマシン上でこれを実行しています:
using (OdbcConnection connection = new OdbcConnection("dsn=mydsn"))
{
connection.ConnectionTimeout = 50000;
OdbcCommand command = new OdbcCommand("select * from users", connection);
command.CommandTimeout = 50000;
connection.Open();
OdbcDataReader reader = command.ExecuteReader();
}
DSNの詳細:
name: mydsn
SQL login: mylogin
database: Test
SQL Server構成:
Management Studioへのログインを使用しようとすると、すべて正常に動作し、クエリを実行できます。