Hello.

I realize my other post was a bit lengthy, so i'd like to repost this
question.

Developing VS2005, SP1, .NET 2.0, VB Windows form program on WIN XP Pro,
SP2. It has a Dataset with two tables using an SQL 9.0 Server Express.

After creating a new database from the VS server explorer, it seems that the
new database always resides in \C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data.

When i create the datasource, it asks if i want to copy it to my project.
If i answer yes, i cannot update the database.

How do i move the database to another location?

Any help would be gratefully appreciated.

Thanks,
Tony

Re: How do i move an SQLDatabase to another location? by William

William
Mon Mar 19 15:47:09 CDT 2007

This is a multi-part message in MIME format.

------=_NextPart_000_0008_01C76A2D.16C17C00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Where you place your database (.mdf and .ldf) file(s) is up to you. If =
you use the VS UI tools, there are a number of defaults that kick in and =
(as you found) SQL Server uses it's own "favorite" place to keep =
databases--you aren't given a choice to pick your own location. SQL =
Server Express Edition adds even more options (and complexity) as it =
permits you to have a user-instance of SQL server with its own (another) =
copy of the database. Yes, you can choose to put your database in the =
project as well. As I illustrate in the book, you can end up with 6 or =
more versions of the database in minutes. While each of these database =
instances can be updated, it might appear that they are not due to the=20

I'm of the opinion, that one needs to decide on a deployment strategy =
before clicking through the defaults. You need to decide if you want to =
have a shared server-based database, one that's installed independently =
on the client or one that's associated with your project. How you manage =
these SQL Server servers and instances and the databases you create is =
really up to you. Do the VS IDE tools help? Yes, but not very much. SQL =
Server Management Studio gives you a lot more options and (thus) control =
over what gets built where and when.

hth

--=20
____________________________________
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)
-------------------------------------------------------------------------=
----------------------------------------------

"Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message =
news:OOf5a%23laHHA.4788@TK2MSFTNGP04.phx.gbl...
> Hello.
>=20
> I realize my other post was a bit lengthy, so i'd like to repost this=20
> question.
>=20
> Developing VS2005, SP1, .NET 2.0, VB Windows form program on WIN XP =
Pro,
> SP2. It has a Dataset with two tables using an SQL 9.0 Server =
Express.
>=20
> After creating a new database from the VS server explorer, it seems =
that the=20
> new database always resides in \C:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\Data.
>=20
> When i create the datasource, it asks if i want to copy it to my =
project.=20
> If i answer yes, i cannot update the database.
>=20
> How do i move the database to another location?
>=20
> Any help would be gratefully appreciated.
>=20
> Thanks,
> Tony
>=20
>
------=_NextPart_000_0008_01C76A2D.16C17C00
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16414" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Where you place your database (.mdf and =
.ldf)=20
file(s) is up to you. If you use the VS UI tools, there are a number of =
defaults=20
that kick in and&nbsp;(as&nbsp;you found) SQL Server uses it's own =
"favorite"=20
place to keep databases--you aren't given a choice to pick your own =
location.=20
SQL Server Express Edition adds even more options (and complexity) as it =
permits=20
you to have a user-instance of SQL server with its own (another) copy of =
the=20
database. Yes, you can choose to put your database in the project as =
well. As I=20
illustrate in the book, you can end up with 6 or more versions of the =
database=20
in minutes. While each of these database instances can be updated, it =
might=20
appear that they are not due to the </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I'm of the opinion, that one needs to =
decide on a=20
deployment strategy <EM>before</EM> clicking through the defaults. You =
need to=20
decide if you want to have a shared server-based database, one that's =
installed=20
independently on the client or one that's associated with your project. =
How you=20
manage these SQL Server servers and instances and the databases you =
create is=20
really up to you. Do the VS IDE tools help? Yes, but not very much. SQL =
Server=20
Management Studio gives you a lot more options and (thus) control over =
what gets=20
built where and when.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>hth</FONT></DIV>
<DIV><BR><FONT face=3DArial size=3D2>--=20
<BR>____________________________________<BR>William (Bill) =
Vaughn<BR>Author,=20
Mentor, Consultant<BR>Microsoft MVP<BR>INETA Speaker<BR></FONT><A=20
href=3D"http://www.betav.com/blog/billva"><FONT face=3DArial=20
size=3D2>www.betav.com/blog/billva</FONT></A><BR><A=20
href=3D"http://www.betav.com"><FONT face=3DArial=20
size=3D2>www.betav.com</FONT></A><BR><FONT face=3DArial size=3D2>Please =
reply only to=20
the newsgroup so that others can benefit.<BR>This posting is provided =
"AS IS"=20
with no warranties, and confers no=20
rights.<BR>__________________________________<BR>Visit </FONT><A=20
href=3D"http://www.hitchhikerguides.net"><FONT face=3DArial=20
size=3D2>www.hitchhikerguides.net</FONT></A><FONT face=3DArial size=3D2> =
to get more=20
information on my latest book:<BR>Hitchhiker's Guide to Visual Studio =
and SQL=20
Server (7th Edition)<BR>and Hitchhiker's Guide to SQL Server 2005 =
Compact=20
Edition=20
(EBook)<BR>--------------------------------------------------------------=
---------------------------------------------------------<BR></FONT></DIV=
>
<DIV><FONT face=3DArial size=3D2>"Tony Girgenti" =
&lt;tony(nospam)@lakesideos.com&gt;=20
wrote in message </FONT><A=20
href=3D"news:OOf5a%23laHHA.4788@TK2MSFTNGP04.phx.gbl"><FONT face=3DArial =

size=3D2>news:OOf5a%23laHHA.4788@TK2MSFTNGP04.phx.gbl</FONT></A><FONT =
face=3DArial=20
size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>&gt; Hello.<BR>&gt; =
<BR>&gt; I=20
realize my other post was a bit lengthy, so i'd like to repost this =
<BR>&gt;=20
question.<BR>&gt; <BR>&gt; Developing VS2005, SP1, .NET 2.0, VB Windows =
form=20
program on WIN XP Pro,<BR>&gt; SP2.&nbsp; It has a Dataset with two =
tables using=20
an SQL 9.0 Server Express.<BR>&gt; <BR>&gt; After creating a new =
database from=20
the VS server explorer, it seems that the <BR>&gt; new database always =
resides=20
in \C:\Program Files\Microsoft SQL<BR>&gt; =
Server\MSSQL.1\MSSQL\Data.<BR>&gt;=20
<BR>&gt; When i create the datasource, it asks if i want to copy it to =
my=20
project. <BR>&gt; If i answer yes, i cannot update the database.<BR>&gt; =

<BR>&gt; How do i move the database to another location?<BR>&gt; =
<BR>&gt; Any=20
help would be gratefully appreciated.<BR>&gt; <BR>&gt; Thanks,<BR>&gt;=20
Tony<BR>&gt; <BR>&gt;</FONT></BODY></HTML>

------=_NextPart_000_0008_01C76A2D.16C17C00--


Re: How do i move an SQLDatabase to another location? by Tony

Tony
Mon Mar 19 16:55:51 CDT 2007

Hello Bill.

From your reply, i thought you were trying to give me a hint as to where to
look to figure out what i want to do. I read some of the SQL Server
Management Studio Express documentation and it does not seem to contain info
about what i want to do.

I guess i should have been more specific in explaining what i ultimately
want to do.

I want to be able to take a finished project with an empty database to a
client location, install it and have it run using the database without
having connection string, security, SQL error message and program bombing
issues.

I figured this could be done inside the program by creating some kind of
dynamic connection string, but i just don't know where to look to find out
how to do it.

Do i need to bring SQL Server Express with me to the clients?

Do i need to know what the connection string will look like before i go
there?

How do i determine if i want to have a shared server-based database or do i
want to have one that installed independently on the client?

I don't even know what these terms mean. I just want to be able to take my
stuff somewhere and have it work without getting a bunch of error messages.

Thanks,
Tony

"William (Bill) Vaughn" <billvaRemoveThis@nwlink.com> wrote in message
news:uB1YEfmaHHA.808@TK2MSFTNGP04.phx.gbl...
Where you place your database (.mdf and .ldf) file(s) is up to you. If you
use the VS UI tools, there are a number of defaults that kick in and (as you
found) SQL Server uses it's own "favorite" place to keep databases--you
aren't given a choice to pick your own location. SQL Server Express Edition
adds even more options (and complexity) as it permits you to have a
user-instance of SQL server with its own (another) copy of the database.
Yes, you can choose to put your database in the project as well. As I
illustrate in the book, you can end up with 6 or more versions of the
database in minutes. While each of these database instances can be updated,
it might appear that they are not due to the

I'm of the opinion, that one needs to decide on a deployment strategy before
clicking through the defaults. You need to decide if you want to have a
shared server-based database, one that's installed independently on the
client or one that's associated with your project. How you manage these SQL
Server servers and instances and the databases you create is really up to
you. Do the VS IDE tools help? Yes, but not very much. SQL Server Management
Studio gives you a lot more options and (thus) control over what gets built
where and when.

hth

--
____________________________________
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)
-----------------------------------------------------------------------------------------------------------------------

"Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message
news:OOf5a%23laHHA.4788@TK2MSFTNGP04.phx.gbl...
> Hello.
>
> I realize my other post was a bit lengthy, so i'd like to repost this
> question.
>
> Developing VS2005, SP1, .NET 2.0, VB Windows form program on WIN XP Pro,
> SP2. It has a Dataset with two tables using an SQL 9.0 Server Express.
>
> After creating a new database from the VS server explorer, it seems that
> the
> new database always resides in \C:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\Data.
>
> When i create the datasource, it asks if i want to copy it to my project.
> If i answer yes, i cannot update the database.
>
> How do i move the database to another location?
>
> Any help would be gratefully appreciated.
>
> Thanks,
> Tony
>
>


Re: How do i move an SQLDatabase to another location? by William

William
Mon Mar 19 17:40:41 CDT 2007

Well, yes. SQL Server is not a "file-based" database like JET or SQL Server
Express Edition. It requires that the SQL Server service be installed and
configured (somewhere). This "somewhere" can be on the client system for a
single-user application or on a LAN/WAN share that's properly exposed by the
server and the service. This means that when you design your application,
you should have one of these scenarios in mind. It also means you'll
typically need to take steps to either ensure that the SQLEXPRESS instance
of SQL Server is running "somewhere" visible or install it yourself during
application setup. The new UserInstance approach can get you very close to
this scenario, but again, it requires SQL Server Express (and only Express)
be installed on the client system (along with your application). To that you
would copy your .MDF file which would be attached automatically the first
time it was opened.

Another approach you might consider is the SQL Server Compact Edition which
is NOT a service-type DBMS engine--it can be installed with or without admin
rights along with the single-file .SDF database.

I expect you would benefit a great deal from my new book that walks through
all of these issues from your point of view.

hth

--
____________________________________
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)
-----------------------------------------------------------------------------------------------------------------------

"Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message
news:ePe$dFnaHHA.1240@TK2MSFTNGP04.phx.gbl...
> Hello Bill.
>
> From your reply, i thought you were trying to give me a hint as to where
> to look to figure out what i want to do. I read some of the SQL Server
> Management Studio Express documentation and it does not seem to contain
> info about what i want to do.
>
> I guess i should have been more specific in explaining what i ultimately
> want to do.
>
> I want to be able to take a finished project with an empty database to a
> client location, install it and have it run using the database without
> having connection string, security, SQL error message and program bombing
> issues.
>
> I figured this could be done inside the program by creating some kind of
> dynamic connection string, but i just don't know where to look to find out
> how to do it.
>
> Do i need to bring SQL Server Express with me to the clients?
>
> Do i need to know what the connection string will look like before i go
> there?
>
> How do i determine if i want to have a shared server-based database or do
> i want to have one that installed independently on the client?
>
> I don't even know what these terms mean. I just want to be able to take
> my stuff somewhere and have it work without getting a bunch of error
> messages.
>
> Thanks,
> Tony
>
> "William (Bill) Vaughn" <billvaRemoveThis@nwlink.com> wrote in message
> news:uB1YEfmaHHA.808@TK2MSFTNGP04.phx.gbl...
> Where you place your database (.mdf and .ldf) file(s) is up to you. If you
> use the VS UI tools, there are a number of defaults that kick in and (as
> you found) SQL Server uses it's own "favorite" place to keep
> databases--you aren't given a choice to pick your own location. SQL Server
> Express Edition adds even more options (and complexity) as it permits you
> to have a user-instance of SQL server with its own (another) copy of the
> database. Yes, you can choose to put your database in the project as well.
> As I illustrate in the book, you can end up with 6 or more versions of the
> database in minutes. While each of these database instances can be
> updated, it might appear that they are not due to the
>
> I'm of the opinion, that one needs to decide on a deployment strategy
> before clicking through the defaults. You need to decide if you want to
> have a shared server-based database, one that's installed independently on
> the client or one that's associated with your project. How you manage
> these SQL Server servers and instances and the databases you create is
> really up to you. Do the VS IDE tools help? Yes, but not very much. SQL
> Server Management Studio gives you a lot more options and (thus) control
> over what gets built where and when.
>
> hth
>
> --
> ____________________________________
> 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)
> -----------------------------------------------------------------------------------------------------------------------
>
> "Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message
> news:OOf5a%23laHHA.4788@TK2MSFTNGP04.phx.gbl...
>> Hello.
>>
>> I realize my other post was a bit lengthy, so i'd like to repost this
>> question.
>>
>> Developing VS2005, SP1, .NET 2.0, VB Windows form program on WIN XP Pro,
>> SP2. It has a Dataset with two tables using an SQL 9.0 Server Express.
>>
>> After creating a new database from the VS server explorer, it seems that
>> the
>> new database always resides in \C:\Program Files\Microsoft SQL
>> Server\MSSQL.1\MSSQL\Data.
>>
>> When i create the datasource, it asks if i want to copy it to my project.
>> If i answer yes, i cannot update the database.
>>
>> How do i move the database to another location?
>>
>> Any help would be gratefully appreciated.
>>
>> Thanks,
>> Tony
>>
>>
>



Re: How do i move an SQLDatabase to another location? by Tony

Tony
Mon Mar 19 19:19:01 CDT 2007

Hello Bill.

I'm just looking for an answer to where i can look to learn how to do what i
want to do.

These forums are not a place for you to sell your book.

Thanks,
Tony

"William (Bill) Vaughn" <billvaRemoveThis@nwlink.com> wrote in message
news:e4hwgenaHHA.4716@TK2MSFTNGP02.phx.gbl...
> Well, yes. SQL Server is not a "file-based" database like JET or SQL
> Server Express Edition. It requires that the SQL Server service be
> installed and configured (somewhere). This "somewhere" can be on the
> client system for a single-user application or on a LAN/WAN share that's
> properly exposed by the server and the service. This means that when you
> design your application, you should have one of these scenarios in mind.
> It also means you'll typically need to take steps to either ensure that
> the SQLEXPRESS instance of SQL Server is running "somewhere" visible or
> install it yourself during application setup. The new UserInstance
> approach can get you very close to this scenario, but again, it requires
> SQL Server Express (and only Express) be installed on the client system
> (along with your application). To that you would copy your .MDF file which
> would be attached automatically the first time it was opened.
>
> Another approach you might consider is the SQL Server Compact Edition
> which is NOT a service-type DBMS engine--it can be installed with or
> without admin rights along with the single-file .SDF database.
>
> I expect you would benefit a great deal from my new book that walks
> through all of these issues from your point of view.
>
> hth
>
> --
> ____________________________________
> 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)
> -----------------------------------------------------------------------------------------------------------------------
>
> "Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message
> news:ePe$dFnaHHA.1240@TK2MSFTNGP04.phx.gbl...
>> Hello Bill.
>>
>> From your reply, i thought you were trying to give me a hint as to where
>> to look to figure out what i want to do. I read some of the SQL Server
>> Management Studio Express documentation and it does not seem to contain
>> info about what i want to do.
>>
>> I guess i should have been more specific in explaining what i ultimately
>> want to do.
>>
>> I want to be able to take a finished project with an empty database to a
>> client location, install it and have it run using the database without
>> having connection string, security, SQL error message and program bombing
>> issues.
>>
>> I figured this could be done inside the program by creating some kind of
>> dynamic connection string, but i just don't know where to look to find
>> out how to do it.
>>
>> Do i need to bring SQL Server Express with me to the clients?
>>
>> Do i need to know what the connection string will look like before i go
>> there?
>>
>> How do i determine if i want to have a shared server-based database or do
>> i want to have one that installed independently on the client?
>>
>> I don't even know what these terms mean. I just want to be able to take
>> my stuff somewhere and have it work without getting a bunch of error
>> messages.
>>
>> Thanks,
>> Tony
>>
>> "William (Bill) Vaughn" <billvaRemoveThis@nwlink.com> wrote in message
>> news:uB1YEfmaHHA.808@TK2MSFTNGP04.phx.gbl...
>> Where you place your database (.mdf and .ldf) file(s) is up to you. If
>> you use the VS UI tools, there are a number of defaults that kick in and
>> (as you found) SQL Server uses it's own "favorite" place to keep
>> databases--you aren't given a choice to pick your own location. SQL
>> Server Express Edition adds even more options (and complexity) as it
>> permits you to have a user-instance of SQL server with its own (another)
>> copy of the database. Yes, you can choose to put your database in the
>> project as well. As I illustrate in the book, you can end up with 6 or
>> more versions of the database in minutes. While each of these database
>> instances can be updated, it might appear that they are not due to the
>>
>> I'm of the opinion, that one needs to decide on a deployment strategy
>> before clicking through the defaults. You need to decide if you want to
>> have a shared server-based database, one that's installed independently
>> on the client or one that's associated with your project. How you manage
>> these SQL Server servers and instances and the databases you create is
>> really up to you. Do the VS IDE tools help? Yes, but not very much. SQL
>> Server Management Studio gives you a lot more options and (thus) control
>> over what gets built where and when.
>>
>> hth
>>
>> --
>> ____________________________________
>> 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)
>> -----------------------------------------------------------------------------------------------------------------------
>>
>> "Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message
>> news:OOf5a%23laHHA.4788@TK2MSFTNGP04.phx.gbl...
>>> Hello.
>>>
>>> I realize my other post was a bit lengthy, so i'd like to repost this
>>> question.
>>>
>>> Developing VS2005, SP1, .NET 2.0, VB Windows form program on WIN XP Pro,
>>> SP2. It has a Dataset with two tables using an SQL 9.0 Server Express.
>>>
>>> After creating a new database from the VS server explorer, it seems that
>>> the
>>> new database always resides in \C:\Program Files\Microsoft SQL
>>> Server\MSSQL.1\MSSQL\Data.
>>>
>>> When i create the datasource, it asks if i want to copy it to my
>>> project.
>>> If i answer yes, i cannot update the database.
>>>
>>> How do i move the database to another location?
>>>
>>> Any help would be gratefully appreciated.
>>>
>>> Thanks,
>>> Tony
>>>
>>>
>>
>
>



Re: How do i move an SQLDatabase to another location? by Earl

Earl
Mon Mar 19 21:07:38 CDT 2007

That's funny. Almost. Very gracious too. Bill answers a ton of technical
questions that could make up many books if you took the time to algamate the
answers. Frankly I've found that without some books to put all the pieces
together, you are just floundering in the forums. There is simply no way you
can navigate through all of the different scenarios without a comprehensive
view of the problem and the various solutions. In your case, good luck
figuring out how to deal with the various idiosyncracies of an SQL
installation, or as you say, "take a finished project with an empty database
to a client location, install it and have it run using the database without
having connection string, security, SQL error message and program bombing
issues." That is a book all unto itself, encompassing ADO.Net, SQLExpress,
deployment, scripting, exception handling, and persistence of settings. You
might get some of those answers over in the SQL forums, but bring your heat
shields, as they are not generally as diplomatic.

"Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message
news:%23mFqdVoaHHA.808@TK2MSFTNGP04.phx.gbl...
> Hello Bill.
>
> I'm just looking for an answer to where i can look to learn how to do what
> i want to do.
>
> These forums are not a place for you to sell your book.
>
> Thanks,
> Tony
>
> "William (Bill) Vaughn" <billvaRemoveThis@nwlink.com> wrote in message
> news:e4hwgenaHHA.4716@TK2MSFTNGP02.phx.gbl...
>> Well, yes. SQL Server is not a "file-based" database like JET or SQL
>> Server Express Edition. It requires that the SQL Server service be
>> installed and configured (somewhere). This "somewhere" can be on the
>> client system for a single-user application or on a LAN/WAN share that's
>> properly exposed by the server and the service. This means that when you
>> design your application, you should have one of these scenarios in mind.
>> It also means you'll typically need to take steps to either ensure that
>> the SQLEXPRESS instance of SQL Server is running "somewhere" visible or
>> install it yourself during application setup. The new UserInstance
>> approach can get you very close to this scenario, but again, it requires
>> SQL Server Express (and only Express) be installed on the client system
>> (along with your application). To that you would copy your .MDF file
>> which would be attached automatically the first time it was opened.
>>
>> Another approach you might consider is the SQL Server Compact Edition
>> which is NOT a service-type DBMS engine--it can be installed with or
>> without admin rights along with the single-file .SDF database.
>>
>> I expect you would benefit a great deal from my new book that walks
>> through all of these issues from your point of view.
>>
>> hth
>>
>> --
>> ____________________________________
>> 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)
>> -----------------------------------------------------------------------------------------------------------------------
>>
>> "Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message
>> news:ePe$dFnaHHA.1240@TK2MSFTNGP04.phx.gbl...
>>> Hello Bill.
>>>
>>> From your reply, i thought you were trying to give me a hint as to where
>>> to look to figure out what i want to do. I read some of the SQL Server
>>> Management Studio Express documentation and it does not seem to contain
>>> info about what i want to do.
>>>
>>> I guess i should have been more specific in explaining what i ultimately
>>> want to do.
>>>
>>> I want to be able to take a finished project with an empty database to a
>>> client location, install it and have it run using the database without
>>> having connection string, security, SQL error message and program
>>> bombing issues.
>>>
>>> I figured this could be done inside the program by creating some kind of
>>> dynamic connection string, but i just don't know where to look to find
>>> out how to do it.
>>>
>>> Do i need to bring SQL Server Express with me to the clients?
>>>
>>> Do i need to know what the connection string will look like before i go
>>> there?
>>>
>>> How do i determine if i want to have a shared server-based database or
>>> do i want to have one that installed independently on the client?
>>>
>>> I don't even know what these terms mean. I just want to be able to take
>>> my stuff somewhere and have it work without getting a bunch of error
>>> messages.
>>>
>>> Thanks,
>>> Tony
>>>
>>> "William (Bill) Vaughn" <billvaRemoveThis@nwlink.com> wrote in message
>>> news:uB1YEfmaHHA.808@TK2MSFTNGP04.phx.gbl...
>>> Where you place your database (.mdf and .ldf) file(s) is up to you. If
>>> you use the VS UI tools, there are a number of defaults that kick in and
>>> (as you found) SQL Server uses it's own "favorite" place to keep
>>> databases--you aren't given a choice to pick your own location. SQL
>>> Server Express Edition adds even more options (and complexity) as it
>>> permits you to have a user-instance of SQL server with its own (another)
>>> copy of the database. Yes, you can choose to put your database in the
>>> project as well. As I illustrate in the book, you can end up with 6 or
>>> more versions of the database in minutes. While each of these database
>>> instances can be updated, it might appear that they are not due to the
>>>
>>> I'm of the opinion, that one needs to decide on a deployment strategy
>>> before clicking through the defaults. You need to decide if you want to
>>> have a shared server-based database, one that's installed independently
>>> on the client or one that's associated with your project. How you manage
>>> these SQL Server servers and instances and the databases you create is
>>> really up to you. Do the VS IDE tools help? Yes, but not very much. SQL
>>> Server Management Studio gives you a lot more options and (thus) control
>>> over what gets built where and when.
>>>
>>> hth
>>>
>>> --
>>> ____________________________________
>>> 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)
>>> -----------------------------------------------------------------------------------------------------------------------
>>>
>>> "Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message
>>> news:OOf5a%23laHHA.4788@TK2MSFTNGP04.phx.gbl...
>>>> Hello.
>>>>
>>>> I realize my other post was a bit lengthy, so i'd like to repost this
>>>> question.
>>>>
>>>> Developing VS2005, SP1, .NET 2.0, VB Windows form program on WIN XP
>>>> Pro,
>>>> SP2. It has a Dataset with two tables using an SQL 9.0 Server Express.
>>>>
>>>> After creating a new database from the VS server explorer, it seems
>>>> that the
>>>> new database always resides in \C:\Program Files\Microsoft SQL
>>>> Server\MSSQL.1\MSSQL\Data.
>>>>
>>>> When i create the datasource, it asks if i want to copy it to my
>>>> project.
>>>> If i answer yes, i cannot update the database.
>>>>
>>>> How do i move the database to another location?
>>>>
>>>> Any help would be gratefully appreciated.
>>>>
>>>> Thanks,
>>>> Tony
>>>>
>>>>
>>>
>>
>>
>
>



Re: How do i move an SQLDatabase to another location? by Tony

Tony
Mon Mar 19 21:56:56 CDT 2007

Hello Earl.

I'm new at all this and i might have more "luck" if someone wouldn't mine
telling me what kinds of subjects to research so that i can figure this
stuff out myself.

I'm not looking to the forums to give me the exact details of how to code
this project, i provide the details to people like Bill so that they can use
those details to point me in the right direction. I'm not asking for
anybody to navigate through any scenarios. I can do that. Just tell me
where to go.

I'm sure that Bill really knows what he is talking about because i see a lot
of his replies in these forums and i'm sure he knows a heck of a lot more
than i do. It seems the people in this forum hold him in high regard.
However, i don't like Bill pointing me to his website for answers.

Does the SQL forum answer questions about windows forms/database projects
and how to deploy them?

Thanks,
Tony

"Earl" <brikshoe@newsgroups.nospam> wrote in message
news:OBVQ1RpaHHA.1220@TK2MSFTNGP03.phx.gbl...
> That's funny. Almost. Very gracious too. Bill answers a ton of technical
> questions that could make up many books if you took the time to algamate
> the answers. Frankly I've found that without some books to put all the
> pieces together, you are just floundering in the forums. There is simply
> no way you can navigate through all of the different scenarios without a
> comprehensive view of the problem and the various solutions. In your case,
> good luck figuring out how to deal with the various idiosyncracies of an
> SQL installation, or as you say, "take a finished project with an empty
> database to a client location, install it and have it run using the
> database without having connection string, security, SQL error message and
> program bombing issues." That is a book all unto itself, encompassing
> ADO.Net, SQLExpress, deployment, scripting, exception handling, and
> persistence of settings. You might get some of those answers over in the
> SQL forums, but bring your heat shields, as they are not generally as
> diplomatic.
>
> "Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message
> news:%23mFqdVoaHHA.808@TK2MSFTNGP04.phx.gbl...
>> Hello Bill.
>>
>> I'm just looking for an answer to where i can look to learn how to do
>> what i want to do.
>>
>> These forums are not a place for you to sell your book.
>>
>> Thanks,
>> Tony
>>
>> "William (Bill) Vaughn" <billvaRemoveThis@nwlink.com> wrote in message
>> news:e4hwgenaHHA.4716@TK2MSFTNGP02.phx.gbl...
>>> Well, yes. SQL Server is not a "file-based" database like JET or SQL
>>> Server Express Edition. It requires that the SQL Server service be
>>> installed and configured (somewhere). This "somewhere" can be on the
>>> client system for a single-user application or on a LAN/WAN share that's
>>> properly exposed by the server and the service. This means that when you
>>> design your application, you should have one of these scenarios in mind.
>>> It also means you'll typically need to take steps to either ensure that
>>> the SQLEXPRESS instance of SQL Server is running "somewhere" visible or
>>> install it yourself during application setup. The new UserInstance
>>> approach can get you very close to this scenario, but again, it requires
>>> SQL Server Express (and only Express) be installed on the client system
>>> (along with your application). To that you would copy your .MDF file
>>> which would be attached automatically the first time it was opened.
>>>
>>> Another approach you might consider is the SQL Server Compact Edition
>>> which is NOT a service-type DBMS engine--it can be installed with or
>>> without admin rights along with the single-file .SDF database.
>>>
>>> I expect you would benefit a great deal from my new book that walks
>>> through all of these issues from your point of view.
>>>
>>> hth
>>>
>>> --
>>> ____________________________________
>>> 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)
>>> -----------------------------------------------------------------------------------------------------------------------
>>>
>>> "Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message
>>> news:ePe$dFnaHHA.1240@TK2MSFTNGP04.phx.gbl...
>>>> Hello Bill.
>>>>
>>>> From your reply, i thought you were trying to give me a hint as to
>>>> where to look to figure out what i want to do. I read some of the SQL
>>>> Server Management Studio Express documentation and it does not seem to
>>>> contain info about what i want to do.
>>>>
>>>> I guess i should have been more specific in explaining what i
>>>> ultimately want to do.
>>>>
>>>> I want to be able to take a finished project with an empty database to
>>>> a client location, install it and have it run using the database
>>>> without having connection string, security, SQL error message and
>>>> program bombing issues.
>>>>
>>>> I figured this could be done inside the program by creating some kind
>>>> of dynamic connection string, but i just don't know where to look to
>>>> find out how to do it.
>>>>
>>>> Do i need to bring SQL Server Express with me to the clients?
>>>>
>>>> Do i need to know what the connection string will look like before i go
>>>> there?
>>>>
>>>> How do i determine if i want to have a shared server-based database or
>>>> do i want to have one that installed independently on the client?
>>>>
>>>> I don't even know what these terms mean. I just want to be able to
>>>> take my stuff somewhere and have it work without getting a bunch of
>>>> error messages.
>>>>
>>>> Thanks,
>>>> Tony
>>>>
>>>> "William (Bill) Vaughn" <billvaRemoveThis@nwlink.com> wrote in message
>>>> news:uB1YEfmaHHA.808@TK2MSFTNGP04.phx.gbl...
>>>> Where you place your database (.mdf and .ldf) file(s) is up to you. If
>>>> you use the VS UI tools, there are a number of defaults that kick in
>>>> and (as you found) SQL Server uses it's own "favorite" place to keep
>>>> databases--you aren't given a choice to pick your own location. SQL
>>>> Server Express Edition adds even more options (and complexity) as it
>>>> permits you to have a user-instance of SQL server with its own
>>>> (another) copy of the database. Yes, you can choose to put your
>>>> database in the project as well. As I illustrate in the book, you can
>>>> end up with 6 or more versions of the database in minutes. While each
>>>> of these database instances can be updated, it might appear that they
>>>> are not due to the
>>>>
>>>> I'm of the opinion, that one needs to decide on a deployment strategy
>>>> before clicking through the defaults. You need to decide if you want to
>>>> have a shared server-based database, one that's installed independently
>>>> on the client or one that's associated with your project. How you
>>>> manage these SQL Server servers and instances and the databases you
>>>> create is really up to you. Do the VS IDE tools help? Yes, but not very
>>>> much. SQL Server Management Studio gives you a lot more options and
>>>> (thus) control over what gets built where and when.
>>>>
>>>> hth
>>>>
>>>> --
>>>> ____________________________________
>>>> 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)
>>>> -----------------------------------------------------------------------------------------------------------------------
>>>>
>>>> "Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message
>>>> news:OOf5a%23laHHA.4788@TK2MSFTNGP04.phx.gbl...
>>>>> Hello.
>>>>>
>>>>> I realize my other post was a bit lengthy, so i'd like to repost this
>>>>> question.
>>>>>
>>>>> Developing VS2005, SP1, .NET 2.0, VB Windows form program on WIN XP
>>>>> Pro,
>>>>> SP2. It has a Dataset with two tables using an SQL 9.0 Server
>>>>> Express.
>>>>>
>>>>> After creating a new database from the VS server explorer, it seems
>>>>> that the
>>>>> new database always resides in \C:\Program Files\Microsoft SQL
>>>>> Server\MSSQL.1\MSSQL\Data.
>>>>>
>>>>> When i create the datasource, it asks if i want