windows application deployment with sql

B

BC

hi all,

I have create a windows application that uses ms sql2000 as the
database. Can someone tell me how can i deploy my windows application
and creating the sql tables to the sql2000 database? some articles will
be a great help.


cheers,

benny
 
C

Cathal Connolly [VB MVP]

You can either use a commercial solution such sqlpackager
(http://www.red-gate.com/sql/sql_packager.htm) or else do those steps within
your application. Typically the easiest way is to detach your sample
database in MSDE, and then deploy it along with your windows app. When the
app starts if it's the first time its run, it uses the sql command line to
reattach the database

osql -U yourusername -P "yourpassword" -Q "sp_attach_db 'yourdatabasename',
'c:\yourdatabasename_data.mdf', 'c:\yourdatabasename_log.ldf'"

Heres an article on detaching db's in MSDE -
http://www.prd-software.com.au/prd/support/kb/kbarticle.asp?id=106

Alternatively, you can automate the whole process via SQL-DMO
(http://www.windowsitpro.com/Articles/Print.cfm?ArticleID=23180), but I
usually find thats overkill

Cathal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top