Groups | Blog | Home
all groups > dotnet windows forms > july 2006 >

dotnet windows forms : Embed SQL2K5 Express into windows apps


carol chen
7/13/2006 12:00:00 AM
I have developed a desktop applicatio with synchronization feature. I wanna
embed
the sql into my application, and have following questions:

1. I can't just attach the database file (.mdf) as connectivity components
are required for sync function, right?

2. When install the sql2k5 express, the default instance is
MachineName/SQLEXPRESS, is there anyway to set it to Local/SQLEXPRESS?

3. Is there any sample code on the Internet in Visual Basic I can look at?

Any help and advice are very much appreciated!!

Morgan Fears
7/14/2006 12:19:28 AM
As part of the connection string, you can pass in a parameter in the connection
string that indicates the database to be used without
providing a server name. Or you can use the "." for the server name, which
denotes the local computer.

"Server=.\SQLExpress;AttachDbFilename=c:\asd\qwe\mydbfile.mdf;Database=dbname;Trusted_Connection=Yes;"


Connection string pulled from :
http://www.connectionstrings.com/


Morgan

[quoted text, click to view]

Steve B.
7/17/2006 12:00:00 AM
Take a look at Sql 2005 Everywhere which is the desktop version of Sql
Mobile (unfortunately still under CTP).
This allow the application to host a lighter sql engine that can replicate
against a sql server 2005 (or 2000). The advantage is that you do not have
to "install" a sql engine on the client computer, and the engine is good
enough to hold some small databases.

Hope that helps
Steve

"carol chen" <carol@hotmail.com> a écrit dans le message de news:
58e007d8ce3b4a74881210546d2bf739@ureader.com...
[quoted text, click to view]

AddThis Social Bookmark Button