Board index » delphi » Installing a database on SQL7/MSDE

Installing a database on SQL7/MSDE

You can ship the file with the .mdf extension, however you have to detach
the database correctly you can't just copy the file.

Look at sp_attachdb/sp_detachdb in Books online.

-Euan

Quote
"Mark Derricutt" <derricu...@pbworld.com> wrote in message

news:8F61A95B1markchalicegennz@207.105.83.62...
Quote
> Hi, I've got a wee problem one of you guys could help me with.  I need to
> ship a sample database with my application (written for SQL7/MSDE) and was
> wondering how to actually ship it?

> Unlike an access database I can't just plonk the file on the harddrive and
> open it, I have to go through the server, but how?

> I was just thinking about how in a connection string for sql7 there was an
> option for specifying a filename to use as the database, but i'm not sure
> how that works, or if thats a good way to go about it.

> Any ideas?

> --
> Inspired by the taste of horror, proud to be insane forever
> Let out the killer in me! (c) Dismal Euphony
> Now Playing: <no audio cd present>

 

Re:Installing a database on SQL7/MSDE


Hi, I've got a wee problem one of you guys could help me with.  I need to
ship a sample database with my application (written for SQL7/MSDE) and was
wondering how to actually ship it?

Unlike an access database I can't just plonk the file on the harddrive and
open it, I have to go through the server, but how?

I was just thinking about how in a connection string for sql7 there was an
option for specifying a filename to use as the database, but i'm not sure
how that works, or if thats a good way to go about it.

Any ideas?

--
Inspired by the taste of horror, proud to be insane forever
Let out the killer in me! (c) Dismal Euphony
Now Playing: <no audio cd present>

Re:Installing a database on SQL7/MSDE


derricu...@pbworld.com (Mark Derricutt) wrote in
<8F61A95B1markchalicege...@207.105.83.62>:

Quote
>I was just thinking about how in a connection string for sql7 there was
>an option for specifying a filename to use as the database, but i'm not
>sure how that works, or if thats a good way to go about it.

Well, I just tried copying one of my existing databases to another
directory but I guess the .mdf has some internal stuff referencing other
files:

16:10:02.642 newsteamfieldmanager.exe    DATABASE: Unabled to Open Test
Local SFMAN (Device activation error. The physical file name 'D:\M
SSQL7\data\new_sfman_log.LDF' may be incorrect, 0)

--
Inspired by the taste of horror, proud to be insane forever
Let out the killer in me! (c) Dismal Euphony
Now Playing: <no audio cd present>

Re:Installing a database on SQL7/MSDE


Quote
>Unlike an access database I can't just plonk the file on the harddrive and
>open it, I have to go through the server, but how?

You need to use the DetatchDb and AttatchDb SQL methods to properly disconnect a
database and then reconnect it on another server.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Installing a database on SQL7/MSDE


euan.gar...@spicedham.gte.net (Euan Garden) wrote in
<8jc1s8$a...@bornews.borland.com>:

Quote
>You can ship the file with the .mdf extension, however you have to
>detach the database correctly you can't just copy the file.
>Look at sp_attachdb/sp_detachdb in Books online.

Excellent, many thanks :-)  I just wrote a wee util to use attach/detach a
db which I'm gonna call from my install set.

Mark

--
Inspired by the taste of horror, proud to be insane forever
Let out the killer in me! (c) Dismal Euphony
Now Playing: <no audio cd present>

Other Threads