View Full Version : SLQ Server CE for DUMMIES????
LKing
02-25-2003, 01:07 PM
OK. I used to use real(ational) db's back in the day......you know the days of Fortran and DOS. I downloaded (I think) Visual tools and SQL Server CE. Stupid question of the week award: how do I get started? It says to open up VisualBasic or CE and add SQL Server something or other.....and already I'm lost. Is there a REALLY basic book or manual? I know what basic or C code looks like (it's not REAL code like Fortran or assembler) but I can't seem to be able to get the right windows and options to open. Or should I just crawl back under my rock?
David McNamee
02-25-2003, 06:27 PM
http://www.devbuzz.com/ has some good articles on using SQL CE.
There are also some good beginner articles on the MSDN web site.
Doug Haacke
03-07-2003, 06:40 AM
One of my favorites apps on my PPC is the Query Analyzer, which installs along with SQL Server CE. It allows you to create, modify and delete tables, and run queries on those databases. Its surprisingly fast and powerful. The trick is 'importing' SQL databases from SQL Server PC. The SSCE uses an *.sdf file for its SQL database. You can create queries to manipulate the data (including adding and deleting records). To move a database or table from a host, I wrote a little VB program to 'pull' the tables from my server. It very fast and works like a champ, and best of all, it works remotely if your SQL Server installation allows remote access. Here's some sample VB code (I'm a C++ programmer, so excuse my lack of expertise with VB):
' Create the RDA object.
Set ceRDA = CreateObject("SSCE.RemoteDataAccess.2.0")
' Set RDA properties.
ceRDA.InternetURL = "http://myserver/sqlce/sscesa20.dll"
ceRDA.InternetLogin = ""
ceRDA.InternetPassword = ""
ceRDA.LocalConnectionString = "Data Source=\My Documents\MyPocketPCdb.sdf"
' import the Forums table from a SQL Server database call SQLDB
' into my Pocket PC table call MyPocketPCdb.sdf
strSQL = "SELECT * FROM Forums WHERE Subject ='SQL Server'"
ceRDA.Pull "Forums", strSQL, "Provider=sqloledb;Data Source=123.45.67.89;Initial Catalog=SQLDB;user id=sa;password=whatever;
' import the Tips table from a SQL Server database call SQLDB
' into my Pocket PC table call MyPocketPCdb.sdf
strSQL = "SELECT * FROM Tips WHERE Subject ='SQL Server'"
ceRDA.Pull "Tips", strSQL, "Provider=sqloledb;Data Source=123.45.67.89;Initial Catalog=SQLDB;user id=sa;password=whatever;
The example above will Pull two tables. Of course, you'll want to change the database names, IP addresses, etc. You'll need to make sure you've installed the SQL Server CE components on your SQL Server machine as well as your Pocket PC, and don't forget to create the empty database on your Pocket PC (using Query Analyzer) before pulling tables in to it.
Hope that helps. Have fun!
-Doug
vBulletin® v3.8.9, Copyright ©2000-2019, vBulletin Solutions, Inc.