SqlCeRemoteDataAccessとは? わかりやすく解説

SqlCeRemoteDataAccess クラス

SqlCeRemoteDataAccess オブジェクトの新しいインスタンスを初期化します。リモート データ アクセスの詳細については、SQL Server Mobile Books Online を参照してください。

名前空間: System.Data.SqlServerCe
アセンブリ: System.Data.SqlServerCe (system.data.sqlserverce.dll 内)
構文構文

Public NotInheritable Class
 SqlCeRemoteDataAccess
    Implements IDisposable
Dim instance As SqlCeRemoteDataAccess
public sealed class SqlCeRemoteDataAccess :
 IDisposable
public ref class SqlCeRemoteDataAccess sealed
 : IDisposable
public final class SqlCeRemoteDataAccess implements
 IDisposable
public final class SqlCeRemoteDataAccess implements
 IDisposable
使用例使用例

SqlCeRemoteDataAccess オブジェクトの新しいインスタンスを初期化する方法を次の例に示します。

' 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();
}
継承階層継承階層
System.Object
   System.Data.InternalDataCollectionBase
    System.Data.SqlServerCe.SqlCeRemoteDataAccess
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SqlCeRemoteDataAccess メンバ
System.Data.SqlServerCe 名前空間

SqlCeRemoteDataAccess コンストラクタ ()

SqlCeRemoteDataAccess オブジェクトの新しいインスタンスを初期化します。

名前空間: System.Data.SqlServerCe
アセンブリ: System.Data.SqlServerCe (system.data.sqlserverce.dll 内)
構文構文

Dim instance As New SqlCeRemoteDataAccess
public SqlCeRemoteDataAccess ()
public:
SqlCeRemoteDataAccess ()
public SqlCeRemoteDataAccess ()
public function SqlCeRemoteDataAccess ()
解説解説
使用例使用例

SqlCeRemoteDataAccess オブジェクトの新しいインスタンスを初期化する方法を次の例に示します。

' 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();
}
.NET Framework のセキュリティ.NET Framework のセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SqlCeRemoteDataAccess クラス
SqlCeRemoteDataAccess メンバ
System.Data.SqlServerCe 名前空間

SqlCeRemoteDataAccess コンストラクタ (String, String, String, String)

SqlCeRemoteDataAccess オブジェクトの新しいインスタンスを初期化し、Microsoft インターネット インフォメーション サービス (IIS) に対する基本認証または統合 Windows 認証を設定します。

名前空間: System.Data.SqlServerCe
アセンブリ: System.Data.SqlServerCe (system.data.sqlserverce.dll 内)
構文構文

Public Sub New ( _
    internetUrl As String, _
    internetLogin As String, _
    internetPassword As String, _
    localConnectionString As String _
)
Dim internetUrl As String
Dim internetLogin As String
Dim internetPassword As String
Dim localConnectionString As String

Dim instance As New SqlCeRemoteDataAccess(internetUrl,
 internetLogin, internetPassword, localConnectionString)
public SqlCeRemoteDataAccess (
    string internetUrl,
    string internetLogin,
    string internetPassword,
    string localConnectionString
)
public:
SqlCeRemoteDataAccess (
    String^ internetUrl, 
    String^ internetLogin, 
    String^ internetPassword, 
    String^ localConnectionString
)
public SqlCeRemoteDataAccess (
    String internetUrl, 
    String internetLogin, 
    String internetPassword, 
    String localConnectionString
)
public function SqlCeRemoteDataAccess (
    internetUrl : String, 
    internetLogin : String, 
    internetPassword : String, 
    localConnectionString : String
)

パラメータ

internetUrl

SQL Server Mobile サーバー エージェントに接続するときに使用する URL。

internetLogin

SQL Server Mobile サーバー エージェントに接続するときに使用するログイン名。

internetPassword

SQL Server Mobile サーバー エージェントに接続するときに使用するパスワード。

localConnectionString

SQL Server Mobile データベースに接続するための OLE DB 接続文字列。

解説解説

このコンストラクタは InternetUrl、InternetLogin、InternetPassword、および LocalConnectionString の各プロパティを初期化します。それ以外のプロパティには、既定値が代入されます。後から、任意のプロパティの値を変更できます。

使用例使用例
' Connection String to the SQL Server.
Dim rdaOleDbConnectString As String
 = _
    "Provider=sqloledb; Data Source=MySqlServer;Initial Catalog=Northwind;
 " + _
    "User Id=username;Password = <password>"

' Initialize RDA Object.
Dim rda As SqlCeRemoteDataAccess = Nothing

Try
    'Try the Pull Operation.
    rda = New SqlCeRemoteDataAccess()
   
    rda.InternetLogin         = "MyLogin"
    rda.InternetPassword      = "<password>"
    rda.InternetUrl           = "<http://www.northwindtraders.com/sqlce/sscesa20.dll>"
    rda.LocalConnectionString = "Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data
 Source=\ssce.sdf"
   
    rda.Pull("Employees", "Select
 * from Employees", _
       rdaOleDbConnectString, _
       RdaTrackOption.TrackingOnWithIndexes, _
       "ErrorTable")

Catch e As SqlCeException
'Use you own Error Handling Routine.
'ShowErrors(e);
Finally
   'Dispose of the RDA Object.
   rda.Dispose()
End Try
// Connection String to the SQL Server.
string rdaOleDbConnectString  = "Provider=sqloledb; Data
 Source=MySqlServer;Initial Catalog=Northwind; " +
                                "User Id=username;Password = <password>";
 
                              
// Initialize RDA Object.
SqlCeRemoteDataAccess rda = null;

try {
    //Try the Pull Operation.
    rda = new SqlCeRemoteDataAccess();
    
    rda.InternetLogin          = "MyLogin";
    rda.InternetPassword       = "<password>";
    rda.InternetUrl            = "<http://www.northwindtraders.com/sqlce/sscesa20.dll>";
    rda.LocalConnectionString  = @"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data
 Source=\ssce.sdf";
   
    rda.Pull(
        "Employees", 
        "Select * from Employees", 
        rdaOleDbConnectString, 
        RdaTrackOption.TrackingOnWithIndexes , 
        "ErrorTable");
}
catch(SqlCeException) {
    //Use you own Error Handling Routine.
}
finally {
    //Dispose of the RDA Object.
    rda.Dispose();
}
.NET Framework のセキュリティ.NET Framework のセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SqlCeRemoteDataAccess クラス
SqlCeRemoteDataAccess メンバ
System.Data.SqlServerCe 名前空間

SqlCeRemoteDataAccess コンストラクタ (String, String)

SqlCeRemoteDataAccess オブジェクトの新しいインスタンスを初期化し、Microsoft Internet Information Services (IIS) への匿名アクセスを設定します。

名前空間: System.Data.SqlServerCe
アセンブリ: System.Data.SqlServerCe (system.data.sqlserverce.dll 内)
構文構文

Public Sub New ( _
    internetUrl As String, _
    localConnectionString As String _
)
Dim internetUrl As String
Dim localConnectionString As String

Dim instance As New SqlCeRemoteDataAccess(internetUrl,
 localConnectionString)
public SqlCeRemoteDataAccess (
    string internetUrl,
    string localConnectionString
)
public:
SqlCeRemoteDataAccess (
    String^ internetUrl, 
    String^ localConnectionString
)
public SqlCeRemoteDataAccess (
    String internetUrl, 
    String localConnectionString
)
public function SqlCeRemoteDataAccess (
    internetUrl : String, 
    localConnectionString : String
)

パラメータ

internetUrl

SQL Server Mobile サーバー エージェントに接続するときに使用する URL。

localConnectionString

SQL Server Mobile データベースに接続するための OLE DB 接続文字列。

解説解説
使用例使用例
' Connection String to the SQL Server.
Dim rdaOleDbConnectString As String
 = _
    "Provider=sqloledb; Data Source=MySqlServer;Initial Catalog=Northwind;
 " + _
    "User Id=username;Password = <password>"

' Initialize RDA Object.
Dim rda As SqlCeRemoteDataAccess = Nothing

Try
    'Try the Pull Operation.
    rda = New SqlCeRemoteDataAccess()
   
    rda.InternetLogin         = "MyLogin"
    rda.InternetPassword      = "<password>"
    rda.InternetUrl           = "<http://www.northwindtraders.com/sqlce/sscesa20.dll>"
    rda.LocalConnectionString = "Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data
 Source=\ssce.sdf"
   
    rda.Pull("Employees", "Select
 * from Employees", _
       rdaOleDbConnectString, _
       RdaTrackOption.TrackingOnWithIndexes, _
       "ErrorTable")

Catch e As SqlCeException
'Use you own Error Handling Routine.
'ShowErrors(e);
Finally
   'Dispose of the RDA Object.
   rda.Dispose()
End Try
// Connection String to the SQL Server.
string rdaOleDbConnectString  = "Provider=sqloledb; Data
 Source=MySqlServer;Initial Catalog=Northwind; " +
                                "User Id=username;Password = <password>";
 
                              
// Initialize RDA Object.
SqlCeRemoteDataAccess rda = null;

try {
    //Try the Pull Operation.
    rda = new SqlCeRemoteDataAccess();
    
    rda.InternetLogin          = "MyLogin";
    rda.InternetPassword       = "<password>";
    rda.InternetUrl            = "<http://www.northwindtraders.com/sqlce/sscesa20.dll>";
    rda.LocalConnectionString  = @"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data
 Source=\ssce.sdf";
   
    rda.Pull(
        "Employees", 
        "Select * from Employees", 
        rdaOleDbConnectString, 
        RdaTrackOption.TrackingOnWithIndexes , 
        "ErrorTable");
}
catch(SqlCeException) {
    //Use you own Error Handling Routine.
}
finally {
    //Dispose of the RDA Object.
    rda.Dispose();
}
.NET Framework のセキュリティ.NET Framework のセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SqlCeRemoteDataAccess クラス
SqlCeRemoteDataAccess メンバ
System.Data.SqlServerCe 名前空間

SqlCeRemoteDataAccess コンストラクタ


SqlCeRemoteDataAccess プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ LocalConnectionString SQL Server Mobile データベースに接続するための接続文字列を指定します。
参照参照

関連項目

SqlCeRemoteDataAccess クラス
System.Data.SqlServerCe 名前空間

SqlCeRemoteDataAccess メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド も参照)
  名前 説明
パブリック メソッド Dispose アンマネージ リソースをすべて解放します。
パブリック メソッド Equals  オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。)
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。)
パブリック メソッド GetType  現在のインスタンスの Type を取得します。 ( Object から継承されます。)
パブリック メソッド Pull オーバーロードされます。 リモートの Microsoft SQL Server データベースからデータをダウンロードし、ローカルの Microsoft SQL Server Mobile データベース内の単一のテーブルに格納します。
パブリック メソッド Push オーバーロードされます。 プルされ、追跡されている SQL Server Mobile のテーブルから元の SQL Server テーブルへ、変更を送り返します。これらの変更は、個々のトランザクションで、個別にサーバーに適用されます。
パブリック メソッド ReferenceEquals  指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。)
パブリック メソッド SubmitSql リモート サーバー上の Microsoft SQL Server データベースで実行する SQL ステートメントを送信します。
パブリック メソッド ToString  現在の Object を表す String を返します。 ( Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

SqlCeRemoteDataAccess クラス
System.Data.SqlServerCe 名前空間

SqlCeRemoteDataAccess メンバ

SqlCeRemoteDataAccess オブジェクトの新しいインスタンスを初期化します。リモート データ アクセスの詳細については、SQL Server Mobile Books Online を参照してください。

SqlCeRemoteDataAccess データ型で公開されるメンバを以下の表に示します。


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド SqlCeRemoteDataAccess オーバーロードされます。  
パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ LocalConnectionString SQL Server Mobile データベースに接続するための接続文字列を指定します。
パブリック メソッドパブリック メソッド
( プロテクト メソッド も参照)
  名前 説明
パブリック メソッド Dispose アンマネージ リソースをすべて解放します。
パブリック メソッド Equals  オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。)
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。)
パブリック メソッド GetType  現在のインスタンスの Type を取得します。 (Object から継承されます。)
パブリック メソッド Pull オーバーロードされます。 リモートの Microsoft SQL Server データベースからデータをダウンロードし、ローカルの Microsoft SQL Server Mobile データベース内の単一のテーブルに格納します。
パブリック メソッド Push オーバーロードされます。 プルされ、追跡されている SQL Server Mobile のテーブルから元の SQL Server テーブルへ、変更を送り返します。これらの変更は、個々のトランザクションで、個別にサーバーに適用されます。
パブリック メソッド ReferenceEquals  指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。)
パブリック メソッド SubmitSql リモート サーバー上の Microsoft SQL Server データベースで実行する SQL ステートメントを送信します。
パブリック メソッド ToString  現在の Object を表す String を返します。 (Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

SqlCeRemoteDataAccess クラス
System.Data.SqlServerCe 名前空間



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「SqlCeRemoteDataAccess」の関連用語

SqlCeRemoteDataAccessのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SqlCeRemoteDataAccessのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS