InternetUrl 屬性
指定用來連接到 SQL Server Compact 3.5 伺服器代理程式的 URL。SQL Server Compact 3.5 伺服器代理程式是將 SQL Server Compact 3.5 用戶端連接到 MicrosoftSQL Server 資料庫的 Microsoft Internet Information Services (IIS) ISAPI DLL。必須指定這個屬性。
命名空間: System.Data.SqlServerCe
組件: System.Data.SqlServerCe (在 System.Data.SqlServerCe.dll 中)
語法
'宣告
Public Property InternetUrl As String
Get
Set
'用途
Dim instance As SqlCeRemoteDataAccess
Dim value As String
value = instance.InternetUrl
instance.InternetUrl = value
public string InternetUrl { get; set; }
public:
property String^ InternetUrl {
String^ get ();
void set (String^ value);
}
member InternetUrl : string with get, set
function get InternetUrl () : String
function set InternetUrl (value : String)
屬性值
型別:System. . :: . .String
包含 SQL Server Compact 3.5 伺服器代理程式之 URL 的字串 (包括它的檔案名稱 Sqlcesa35.dll)。
範例
下列範例顯示如何設定 SqlCeRemoteDataAccess 物件的 InternetUrl 屬性。
' 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( _
"https://www.adventure-works.com/sqlmobile/sqlcesa35.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(
"https://www.adventure-works.com/sqlmobile/sqlcesa35.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();
}