|
sql
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SQL Server 2005 compact edition with VB
I just wanted a nice easy to deploy db to use with my VB 6 app and although the size is now great it doesn't seem to be doing much else. Nothing in the start menu, sys tray, desktop, etc. Just a folder in my program files with a few dlls in it. How do I start the system? How do I connect, create a db and work with that db? Does the target machine have to have .Net 2, XP Pro SP2, etc installed before it will even work? Why can't they make things easier. You always have to get the user to install various alien progs before your simple app can run. I'm familiar with SQL Server and MSDE, but there seems to be a complete dead end once you install the run-time. Any ideas? Thanks This is why it is named "Compact" edition... :) No extra stuff so it has
small footprint and easy to get on both mobile devices and desktops. When you installed the only item you should have on your Programs menu is the Books On Line. And you should start there... It has answers to most of your questions. Just to get you started: - If you already have SQL Server Management Studio (or you can download SSMS Express from here http://www.microsoft.com/downloads/details.aspx?familyid=6053c6f8-82c8-479c-b25b-9aca13141c9e&displaylang=en), then on the login screen in SSMS you select "SQL Server Mobile" for Server type. Then browse to the database file or create a new database. - To create database programmatically in VB you do something like this: Dim ConnectionString As String = "Data Source='MyDatabase.sdf'; LCID=1033; Password="myp@ssw0rd"; Encrypt = TRUE;" Dim engine As New SqlCeEngine(ConnectionString) engine.CreateDatabase() - There is nothing to start, the Compact edition does not run as a service. It is initiated automatically when you access it programmatically. - If you use the OLE DB provider (SQLCEOLEDB30.DLL), then no need for .NET 2.0 - If you use the ADO.NET data provider (System.Data.SqlServerCe.dll), then you need .NET 2.0 (since the ADO.NET provider is using the SQL Server Native Client) The Compact edition works great, just have in mind that there are some limitations (it has been optimized to me small and efficient on various devices): - Procedural T-SQL code is not supported (stored procedures, views, triggers). - The T- SQL language is limited (for example, no TOP, IF, ROW_NUMBER). - No distributed transactions support. - No native XML and XQuery support (XML is stored as NTEXT). Here are a few great samples and tutorials to get you started with development: http://msdn2.microsoft.com/en-us/sql/bb219480.aspx BTW, when I first started with the Compact edition, I found the Compact edition home site to have plenty of information: http://www.microsoft.com/sql/editions/compact/default.mspx And if this doesn't fit you can always use the Express edition (of course, at the expense of the heavy installation, but you get the full functionality). HTH, Plamen Ratchev http://www.SQLStudio.com I suggest downloading a copy of my EBook on the SQL Server Compact Edition.
It answers all of these questions and more. See www.hitchhikerguides.net. -- Show quoteHide quote____________________________________ William (Bill) Vaughn Author, Mentor, Consultant Microsoft MVP INETA Speaker www.betav.com/blog/billva www.betav.com Please reply only to the newsgroup so that others can benefit. This posting is provided "AS IS" with no warranties, and confers no rights. __________________________________ Visit www.hitchhikerguides.net to get more information on my latest book: Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition) and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook) ----------------------------------------------------------------------------------------------------------------------- "Yobbo" <info@NoSpamIt.com> wrote in message news:eJLP$r0ZHHA.4888@TK2MSFTNGP06.phx.gbl... > OK so I've downloaded and installed this 1.7MB wonder, but now what? > > I just wanted a nice easy to deploy db to use with my VB 6 app and > although > the size is now great it doesn't seem to be doing much else. > > Nothing in the start menu, sys tray, desktop, etc. Just a folder in my > program files with a few dlls in it. > > How do I start the system? > > How do I connect, create a db and work with that db? > > Does the target machine have to have .Net 2, XP Pro SP2, etc installed > before it will even work? > > Why can't they make things easier. You always have to get the user to > install various alien progs before your simple app can run. > > I'm familiar with SQL Server and MSDE, but there seems to be a complete > dead > end once you install the run-time. > > Any ideas? > > Thanks > > >
Other interesting topics
Changing the text of the code of multiple stored procedure
moving a database causes it to be read-only How to configure SQLExpress on a workgroup SQL Server Backup How to avoid creating duplicate indexes on the same column SQL Server Backup and Transactions Can not change index INCLUDE fields order.... SA Password help Restore Failure OS Related ? ISNULL not working |
|||||||||||||||||||||||