指定连接到 SQL Server Compact 3.5 服务器代理时使用的 URL。SQL Server Compact 3.5 服务器代理是用于将 SQL Server Compact 3.5 客户端与 MicrosoftSQL Server 数据库连接的 Microsoft Internet 信息服务 (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();
}