最初にコードの ADS11 接続文字列に問題があります。
いろいろ試しましたが、できませんでした。
分かる方、アドバイスお願いします。
これが私の作業環境です。
サーバー: アドバンテージ データベース サーバー 11
パス: \ADS_DB:6262\DB\DBB.ADD (ポート: 6262)
テスト アクセス テーブル : WEBORDERLN (ADT タイプ)
PK : PK (シャア (36))
Advantage.Data.Provider v11 と Advantage.Data.Entity v11 をダウンロードしました。そして参考に追記。
Web.config
<connectionStrings>
<add name="Ads_Context" connectionString="Data Source=\\ADS_DB:6262\DB\DBB.ADD;User ID=xxx;Password=xxx;ServerType=REMOTE;" providerName="Advantage.Data.Provider" />
</connectionStrings>
コントローラ、
public class Ads_Context : DbContext
{
public Ads_Context(): base("name=Ads_Context")
{
}
public DbSet<WebOrderLN> webOrderLns { get; set; }
}
public class HomeController : Controller
{
//
// GET: /Home/
public string Index()
{
var context = new Ads_Context().webOrderLns.ToList(); // Source error point to here
return "A";
}
}
[Table("WEBORDERLN")]
public class WebOrderLN
{
[Key]
public string PK {get; set;}
public string FK { get; set; }
public string pickno { get; set; }
}
上記のコードを実行すると、エラー メッセージが表示されました。
Server Error in '/' Application.
Error 7200: AQE Error: State = HY000; NativeError = 5174; [iAnywhere Solutions][Advantage SQL][ASA] Error 5174: Advantage failed to open the specified link. dbo: Error 7041: File not found. Verify the specified path and file name is correct. Table name: WEBORDERLN AdsCommand query execution failed.
私が間違っていることを知っている人はいますか?