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!!

Carol

Re: Embed SQL2K5 Express into windows apps by Morgan

Morgan
Thu Jul 13 19:19:28 CDT 2006

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

> 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!!
>
> Carol
>



Re: Embed SQL2K5 Express into windows apps by Steve

Steve
Mon Jul 17 04:31:41 CDT 2006

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...
>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!!
>
> Carol