SQL Server CE RDA replication configuration –zz

來源:互聯網
上載者:User
SQL Server CE RDA replication configuration

What needs be installed before this tutorial

To complete this tutorial I am using the following configuration:

  • Win 2000
  • IIS 5 running
  • eVB (eMbedded Visual Basic)
  • SQL Server 2000 Developer Edition (this is what I use on my development Desktop PC)
  • SQL Server 2000 Windows CE Edition
  • lastly but not least your Pocket PC docked or attached via a wireless LAN

In my next tutorial you will be able to use this configuration together with the RemoteDataAccess object of SSCE (SQL Server CE Edition) to 'Pull' data from a remote SQL 2000 database populating a local SSCE table. The actual code to do this is pretty straight forward, however the tasks of setting up both the remote SQL Server and IIS are critical. It's a bit like a house of cards, missing one of these steps will cause the whole thing to fail with some cryptic message which will have you hankering after those DBASE days! Configuration is always a pain but in the immortal words of 'Tony Soprano' - "What you gonna do?'

Setting up SQL Server for CE

All the information in this section is contained in the SQL Server help file ("C:\Program Files\Microsoft SQL Server CE\sqlce.chm") - I will attempt to workflow it in as simple a fashion as possible - if all else fails you may have to RTFM - "read the manual".

To get it all hanging together just right we need to configure both SQL Server and Internet Information Server (IIS). What's IIS got to do with all of this you ask incredulously? Communication between the SQL Server (SS) CE Client Agent (residing on your Pocket PC) and SS CE Server Manager (residing on the SQL Server) is handled using the HTTP protocol. If you stop to contemplate this it's a very logical if not ingenious approach. SS CE uses IIS to enforce access authentication and permissions in addition to then using HTTP to transmit the data between the WINCE device and the SQL Server.

I would encourage you if possible to set up a development environment with Win 2000, IIS 5 and SQL Server 2000 all on the same system. I have done this and find that it makes trouble shooting connectivity issues and permissions very easy. I then installed MS ActiveSync, eVb and SS CE on this same PC for a complete SS CE test box. Since RDA supports 802.11b I threw in an Orinoco PC Card to make the whole thing wireless - but that's a topic for another rainy day.

Configuring SQL Server 2000 - the shortcut

A shortcut to configuring the SS access permissions is to use the 'SA' username to access the remote server from your WINCE device. Make sure you have the SA user name and password at hand. Since this is a test box - I'm not worried about restricting permissions just yet and doing it this way skips some of the potential permissions issues. You can always revisit this section and 'lock it down'.

Now let's configure IIS

We begin by configuring the SS CE server agent which is an ISAPI DLL.

1) create a directory which IIS will use for the SS CE server agent, e.g.
c:\inetpub\wwwroot\northwind

2) grab the sscesa10.dll file from it's default install directory:
c:\Program Files\Microsoft SQL Server CE\Server
and copy it to the directory you created in step 1:
c:\inetpub\wwwroot\northwind

3) Open a command prompt and register the DLL:
regsvr32 C:\Inetpub\wwwroot\NorthWind\sscesa10.dll

4) Now open the Internet Services Manager to create the virtual directory:
Right click the web site you want to create the new virtual directory in, in most cases using the 'Default Web Site' will be the right place.

Choose New then Virtual Directory. Click Next.
Choose an alias name, since we are using the Northwind data call it 'Northwind'. Click Next and navigate to the directory you created in #1: i.e. 'C:\Inetpub\wwwroot\northwind'
In the Access Permissions list check 'Execute' and disable all the rest.
Click Next then Finish.

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.