Microsoft KB Archive/317341

= Error occurs on RDA.LocalConnectionString when you use a large string =

Article ID: 317341

Article Last Modified on 2/12/2007

-

APPLIES TO


 * Microsoft Encarta Interactive World Atlas 2001
 * Microsoft SQL Server 2000 Windows CE Edition 1.1

-



This article was previously published under Q317341



SYMPTOMS
A Microsoft SQL Server 2000 Windows CE Edition (SQL Server CE) Remote Data Access (RDA) application may fail with the following error message:

Set Property Failed

The error message may occur if you specify a large string by using the LocalConnectionString property of the RDA object that is used to specify the local database connection properties.



CAUSE
RDA fails if the LocalConnectionString property of the RDA object has more than 130 characters.



RESOLUTION
To resolve this problem, specify a string less than 130 characters for the RDA LocalConnectionString property.



MORE INFORMATION
This problem does not occur if you specify a long connection string for the Replication object's AddSubscription method or for the Microsoft ActiveX Data Objects for Windows CE (ADOCE) Connection object's Open method

Steps to Reproduce Behavior
The following sample code assumes that you have applied Microsoft SQL Server CE 1.1 Service Pack 1 (SP1). SQL Server CE 1.1 SP1 adds support for the SSCE:Temp File Directory property in the connection string to change the location of temporary database files. For more information about use of this property and to obtain SQL Server CE 1.1 SP1, see the following articles in the Microsoft Knowledge Base:

305349 FIX: SSCE:Temp File Directory Property Allows You to Change the Temp Database Location for SQL Server CE

317032 HOW TO: Change the Temp Database Location in SQL Server CE

'Local connection string for SSCE Const strLocalConnect = &quot;Provider=Microsoft.SQLServer.OLEDB.CE.1.0;Data Source=\Windows\RDA.SDF;SSCE:Database Password='pass';SSCE:Encrypt Database=TRUE;SSCE:Temp File Directory =\&quot;

'Connection string for backend SQL Server Const strRemoteConnect = &quot;provider=sqloledb;data source=mySQLServerName;Initial Catalog=Northwind;user id=myUser;password=myPwd&quot;

'Initialize variable for objects in RDA and ADOCE

Dim ceRDA As SSCE.RemoteDataAccess Dim ceRepl As SSCE.Replication

' Create database using Replication Object Set ceRepl = CreateObject(&quot;SSCE.Replication.1.0&quot;) ceRepl.SubscriberConnectionString = strLocalConnect ceRepl.AddSubscription CREATE_DATABASE Set ceRepl = Nothing

'initialize RDA Set ceRDA = CreateObject(&quot;SSCE.RemoteDataAccess.1.0&quot;) 'Set properties for RDA 'This property tell RDA what database to reference ceRDA.LocalConnectionString = strLocalConnect

ceRDA.InternetURL = &quot;http://myIISServer/VirtualDir/Sscesa10.dll&quot;

'define SQL string for Pull method sqlString = &quot;SELECT * FROM Customers;&quot; MsgBox sqlString ceRDA.Pull &quot;lCustomers&quot;, sqlString, strRemoteConnect, TRACKINGON

The following line of code ceRDA.LocalConnectionString = strLocalConnect fails with this error message:

Set Property Failed

Keywords: kbprb KB317341

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.