473,324 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Considerations for packaging MSDE app

Hi
I have a C# Winform app which runs using SQL Server.

I want to package up the app, so that it deploys with MSDE.

Can anyone offer any pointers or references to help??

Thanks
Nov 16 '05 #1
1 1817
Hi Paul,

I hope my suggestions will help you, because I have gone through pure h#$l
getting this to work right.

I have a VB.Net winforms app and I use Wise Installation System to install
the .Net framework, MSDE, the app.

A couple of things tried and failed:
1. Within wise, we installed MSDE with the command line option where it sets
the password. We decided to install MSDE into its own instance becasue we
don't want anyone coming behind us and hosing it up by installing an
untested service pack or anything.
2. At the end of the install, we run a batch file to stop and restart the
SQL service. In retrospect, this may not be necessary because of our
decision to reboot before the app is executed the first time.
3. We attempted to run a batch file to attach the database, but no matter
what we tried, it just would not work. It didn't matter if we rebooted and
then ran the batch, nothing worked. So, I added the code to my app that does
this:
a. check to see if the SQL service is running, if its not, warn the user and
shut down the app.
b. if this is the first time the app is executed:
b1. check to see if the database exists, of course it does not, so using
ado.net, execute the command against the master database to attach the
database. Test again to make sure the database is attached, if not, throw an
exception.
b2. Update my configuration file to show that the app has successfully
initialized.
4. Now here's the real McKoy - in order to get all this to work the first
time I connect to the database to check the version I had to use
POOLING=False in the connection string. Problem: The app ran as slow as a
turtle because now it wasn't using connection pooling anywhere. Solution:
Two connection strings, one for initial startup (first time connection) then
one for the rest of the time (without POOLING=false)

5. Another issue came up of how we would update our database, we surely
didn't want to have to detach and then re-attach another database and blow
peoples data away, so I added a version table to the database and I run a
check on the current version each time the app is executed. If the versions
are the same, I don't execute the update executable. So you may ask, how do
you know if you have a new database version and an update needs to take
place? Answer: When a patch is applied (or an executable update) I have a
Version.xml file where we will put the new version number to be compared
against. The executable that runs the update is also new since it will have
code in it to do the update.

But, here's the big question, after you install MSDE, do you need to reboot
or not? The answer is that I was able to get my app to work without having
to reboot, but we have decided to require a reboot because I just believe
there are things in MSDE that need to be set correctly and I think rebooting
is the only way to do it. Again, my app works without it, but I just feel
like its more proper to reboot. I mean after all, you are installing the SQL
desktop engine which is no minor thing, not to mention the .Net framework
install.

Now, there are probably many MSDE experts out there reading my steps
thinking, man, he did this totally wrong, but I'm telling YOU these are
things you are in the end, probably going to have to do to (especially the
POOLING = False setting).

There are many things we haven't even gotten to yet like:
1. What happens if a person doesn't reboot the machine, how do you stop them
from running the app?
2. What if a person runs the install, uninstalls, then reinstalls and
reboots, how does that affect the app?
3. Do you want the uninstall to uninstall the .Net framework and MSDE? I
personally don't think so but then both these items are rather large.

Hope this helps.

STom
"Paul Aspinall" <pa**@aspy.co.uk> wrote in message
news:ct****************@fe3.news.blueyonder.co.uk. ..
Hi
I have a C# Winform app which runs using SQL Server.

I want to package up the app, so that it deploys with MSDE.

Can anyone offer any pointers or references to help??

Thanks

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

108
by: Zooko O'Whielacronx | last post by:
I'm a fan of Greg Ewing's PyGUI . I used it to code a simple game for my son , and enjoyed it. Programming with wxPython feels like programming with a C++ tool that has been wrapped in Python....
1
by: izzy | last post by:
I was wondering if any of you guys can kindly help me in finding all the different versions of MSDE 2000 that came out since it's first release. I expected to find something similar like Sun's...
10
by: noname | last post by:
MSDE 2000 Release A installed under windows 2000 pro will not communicate with SQL Server Manager nor MS Access on peer computer. Can someone help? Have set DISABLENETWORKPROTOCOLS=0 at install...
3
by: *no spam* | last post by:
I want to move my Access 2K database into MSDE. The Access Upsizing Wizard crashes (a known bug wi A2K), so I'm using the following suggested method: Access --> New --> Project (Existing...
5
by: Robin Tucker | last post by:
I'm looking for a simple way of telling (inside a stored procedure) if I'm currently using MSDE or a full SQL server. Ideally, there is some pre-defined environment variable that won't cause me...
2
by: Paul Aspinall | last post by:
Hi I have a C# Winform app which runs using SQL Server. I want to package up the app, so that it deploys with MSDE. Can anyone offer any pointers or references to help?? Thanks
3
by: Paul Aspinall | last post by:
Hi I want to package my C# winforms app, to be deployed with MSDE, as easily as possible for the end user. I want to create an MSI or Installshield (prefer MSI), to setup my C# app, together...
2
by: Hitz | last post by:
Hi, Can i know how to package MSDE with vb.net as there is no search topic found on the internet. i want to package MSDE in such a way, that during installation of application MSDE is installed...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.