1

Sql Server 2008 での CLR 統合の簡単な例を C# でフォローしようとしています: http://www.sqlservercentral.com/articles/SQL+Server+2008/87743/

しかし、プロジェクトをデプロイしようとすると、エラーがスローされます:

アセンブリ SimpleCLRIntegrationNew.dll のサーバー xxxxxxxxx\SQLExpress への展開を開始します: TableName C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.SqlClr.targets(96,5):エラー : サーバー xxxxxxxxxx\SQLExpress に接続できませんでした BlogData : ユーザー 'sa' のログインに失敗しました。

ただし、接続は正しく、機能しています

4

1 に答える 1

0

I don't really understand the technical background here, but I noticed the following problem:

When in VisualStudio, check the Project Properties, and under the Database Tab you have the Connection string.

It looks something like this:

Data Source=[ServerName];Initial Catalog=[DBName];Integrated Security=True

I unfortunately didn't copy the connection string from before - but instead of Integrated Security=True it had something with ...User.... I think I had UserID=sa specified, but don't remember exactly, and I don't know why the connection string was set that way.

I clicked the Browse-button and refreshed the connection (chose my DB and clicked 'OK'). The connection string for the project was reset with the Integrated Security=True optionset.

I don't know if it matters, but in my CLR I'm connecting to the db using "context connection=true"

于 2014-02-13T17:28:06.627 に答える