Problem with syncronization - but also a simple question about conditional compile

S

Steve

Hi. I'm a bit of a newbie, so please be gentle. :)

First, my configuration: I am using VB.NET 2003, Pocket PC 2002
(Thera) and a PPC 2000 IPAQ. My main problem is, when trying to
replicate, I get the message:

HResult: -2147012867 Message: A request to send data to the computer
running IIS has failed. For more information, see HRESULT.[,,,,,]
NativeError: 28037.

I found a MSDN page about this, but I'm not sure I'm able to follow it
correctly. But first, let me ask the easy question:

Question 1: Can someone explain conditional compilation a bit better
to me? I have the following snippet of code (which may be related to
my ultimate problem).

#If RSDIntranet Then
Public Const g_sSQLCEInternetUrl As String =
"http://128.1.1.1/sqlce/sscesa20.dll" 'RSDNET
#Else
Public Const g_sSQLCEInternetUrl As String =
"http://204.1.1.1/SQLCE/sscesa20.dll" 'Internet
#End If

In the above code, I basically need to see if I'm trying to access SQL
Server 2000 using either the LAN (internal), or using CDMA or dial-up
(external). Thus, I have two different IP addresses. Can someone
explain to me where the "RSDIntranet" is defined? I searched my
entire project, but found no Constant or variable being defined. Am I
that igorant?

Question 2: I am using merge replication, and am setting up my
connection with the following:

Dim repl As SqlCeReplication = New SqlCeReplication
repl.InternetUrl = g_sSQLCEInternetUrl
repl.Publisher = "wwwdev"
repl.PublisherSecurityMode = SecurityType.DBAuthentication
repl.InternetLogin = "TechMobile"
repl.InternetPassword = "ooLe&$3jJ;9x"
repl.PublisherLogin = "mylogin"
repl.PublisherPassword = "password"
repl.Publication = "TechMobile114Pub"
repl.SubscriberConnectionString = "Data Source=" &
MainMod.g_sDBPath
repl.Subscriber = "TechMobileSubscriber"
repl.PublisherDatabase = "TechMobile114"
repl.HostName = sEmployeeID
repl.QueryTimeout = 300

When I try to syncronize with my LAN connection, it works like a
champ. But when trying to synchronize using my Wireless WAN (again,
CDMA or dial-up), I get the "HResult..." error message at the
beginning of this post.

I'm really hoping someone can help me out. I'm very stuck. :(

Thanks!
Steve
 
T

Timothy Ng [MSFT]

Hi Steve,

To answer your first question first, if there are no #define in your code
that defines the RSDIntranet symbol, then you can check the build system
(makefiles, etc) for a /D<macro> option. This command line argument
instructs the compiler to do the same thing:

/DRSDIntranet is equivalent to having #define RSDIntranet in your code.

For the second question, is this the msdn article you are referring to?

http://support.microsoft.com/default.aspx?scid=kb;en-us;285865

It seems like, according to the article, that the connection could not be
established using the wireless WAN. Are there limitations to the wireless
WAN that would prevent connections to the SQL server?

Timothy Ng
Software Design Engineer
Visual Studio for Devices

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: (e-mail address removed) (Steve)
Newsgroups: microsoft.public.pocketpc.developer,microsoft.public.dotnet.framework.compac
tframework,microsoft.public.sqlserver.ce
Subject: Problem with syncronization - but also a simple question about conditional compile
Date: 8 Sep 2003 16:12:33 -0700
Organization: http://groups.google.com/
Lines: 60
Message-ID: <[email protected]>
NNTP-Posting-Host: 204.250.115.130
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1063062754 29178 127.0.0.1 (8 Sep 2003 23:12:34 GMT)
X-Complaints-To: (e-mail address removed)
NNTP-Posting-Date: 8 Sep 2003 23:12:34 GMT
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
e.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-
xit-05!sn-xit-09!supernews.com!postnews1.google.com!not-for-mail
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:33029
microsoft.public.sqlserver.ce:9255 microsoft.public.pocketpc.developer:60121
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

Hi. I'm a bit of a newbie, so please be gentle. :)

First, my configuration: I am using VB.NET 2003, Pocket PC 2002
(Thera) and a PPC 2000 IPAQ. My main problem is, when trying to
replicate, I get the message:

HResult: -2147012867 Message: A request to send data to the computer
running IIS has failed. For more information, see HRESULT.[,,,,,]
NativeError: 28037.

I found a MSDN page about this, but I'm not sure I'm able to follow it
correctly. But first, let me ask the easy question:

Question 1: Can someone explain conditional compilation a bit better
to me? I have the following snippet of code (which may be related to
my ultimate problem).

#If RSDIntranet Then
Public Const g_sSQLCEInternetUrl As String =
"http://128.1.1.1/sqlce/sscesa20.dll" 'RSDNET
#Else
Public Const g_sSQLCEInternetUrl As String =
"http://204.1.1.1/SQLCE/sscesa20.dll" 'Internet
#End If

In the above code, I basically need to see if I'm trying to access SQL
Server 2000 using either the LAN (internal), or using CDMA or dial-up
(external). Thus, I have two different IP addresses. Can someone
explain to me where the "RSDIntranet" is defined? I searched my
entire project, but found no Constant or variable being defined. Am I
that igorant?

Question 2: I am using merge replication, and am setting up my
connection with the following:

Dim repl As SqlCeReplication = New SqlCeReplication
repl.InternetUrl = g_sSQLCEInternetUrl
repl.Publisher = "wwwdev"
repl.PublisherSecurityMode = SecurityType.DBAuthentication
repl.InternetLogin = "TechMobile"
repl.InternetPassword = "ooLe&$3jJ;9x"
repl.PublisherLogin = "mylogin"
repl.PublisherPassword = "password"
repl.Publication = "TechMobile114Pub"
repl.SubscriberConnectionString = "Data Source=" &
MainMod.g_sDBPath
repl.Subscriber = "TechMobileSubscriber"
repl.PublisherDatabase = "TechMobile114"
repl.HostName = sEmployeeID
repl.QueryTimeout = 300

When I try to syncronize with my LAN connection, it works like a
champ. But when trying to synchronize using my Wireless WAN (again,
CDMA or dial-up), I get the "HResult..." error message at the
beginning of this post.

I'm really hoping someone can help me out. I'm very stuck. :(

Thanks!
Steve
 
Top