SqlCeRemoteDataAccess.InternetLogin プロパティ
アセンブリ: System.Data.SqlServerCe (system.data.sqlserverce.dll 内)
構文
Dim instance As SqlCeRemoteDataAccess Dim value As String value = instance.InternetLogin instance.InternetLogin = value
/** @property */ public String get_InternetLogin () /** @property */ public void set_InternetLogin (String value)
SQL Server Mobile サーバー エージェントに接続するときに使用する IIS のログイン名。既定では、ログインはありません。
SQL Server Mobile サーバー エージェントが置かれている仮想ディレクトリが基本認証または統合 Windows 認証を使用するように設定されている場合、InternetLogin プロパティは必須です。統合 Windows 認証を使用する場合、InternetLogin は、ネットワーク経由では渡されません。
SqlCeRemoteDataAccess オブジェクトの InternetLogin プロパティを設定する例を次に示します。
' Connection String to the SQL Server ' Dim rdaOleDbConnectString As String = "Data Source=MySqlServer;Initial Catalog=AdventureWorks; " & _ "User Id=username;Password = <password>" ' Initialize RDA Object ' Dim rda As SqlCeRemoteDataAccess = Nothing Try ' Try the Pull Operation ' rda = New SqlCeRemoteDataAccess( _ "http://www.adventure-works.com/sqlmobile/sqlcesa30.dll", _ "MyLogin", _ "<password>", _ "Data Source=MyDatabase.sdf") rda.Pull("Employees", "SELECT * FROM DimEmployee", rdaOleDbConnectString, _ RdaTrackOption.TrackingOnWithIndexes, "ErrorTable") ' or, try one of these overloads: ' rda.Pull("Employees", "SELECT * FROM DimEmployee", rdaOleDbConnectString, _ ' RdaTrackOption.TrackingOnWithIndexes) ' ' rda.Pull("Employees", "SELECT * FROM DimEmployee", rdaOleDbConnectString) Catch ' Handle errors here ' Finally ' Dispose of the RDA object ' rda.Dispose() End Try
// Connection String to the SQL Server // string rdaOleDbConnectString = "Data Source=MySqlServer;Initial Catalog=AdventureWorks; " + "User Id=username;Password = <password>"; // Initialize RDA Object // SqlCeRemoteDataAccess rda = null; try { // Try the Pull Operation // rda = new SqlCeRemoteDataAccess( "http://www.adventure-works.com/sqlmobile/sqlcesa30.dll" , "MyLogin", "<password>", "Data Source=MyDatabase.sdf"); rda.Pull("Employees", "SELECT * FROM DimEmployee", rdaOleDbConnectString , RdaTrackOption.TrackingOnWithIndexes, "ErrorTable"); // or, try one of these overloads: // // rda.Pull("Employees", "SELECT * FROM DimEmployee", rdaOleDbConnectString, // RdaTrackOption.TrackingOnWithIndexes); // // rda.Pull("Employees", "SELECT * FROM DimEmployee", rdaOleDbConnectString); } catch (SqlCeException) { // Handle errors here // } finally { // Dispose of the RDA object // rda.Dispose(); }
プラットフォーム
Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows XP Professional x64 Edition, Windows XP SP2
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
- SqlCeRemoteDataAccess.InternetLogin プロパティのページへのリンク