Re: integrating sql with my software application: a little urgent, please

  • From: Jamal Mazrui <empower@xxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Sat, 23 Oct 2010 14:40:48 -0400

The following utility can install Microsoft SQL Server Express 2005 (note that the long URL may wrap):


Microsoft Component Installer Software Development Kit
http://www.microsoft.com/downloads/en/details.aspx?familyid=2A5E4EBC-651C-40AA-9525-1810AF47C317&displaylang=en

This utility -- PSetup.exe, which is configured by PSetup.ini -- may be run by an installer built with the Free Inno Setup software from
http://InnoSetup.org

The Inno Setup script file for installing EdSharp, edsetup.iss, includes a line that calls this utility in order to install the .NET Framework 2.0 if it is not detected on the user's system. The same approach could be used to install SQL Express if not detected by the same utility. EdSharp is open source, available from
http://EmpowermentZone.com/edsetup.exe

In order to instal SQL Server Compact Edition, I think you would need to include its redistributable package as an executable to be run by an Inno Setup script (or equivalent with another installer technology). When that executable runs, I think it first checks whether SQLCE is already installed. The redistributable is a free download from microsoft.com.

Another option is to use the version of SQLite for .NET. It fully supports the ADO.NET 2.0 API, and also has the advantage of a console mode, command-line interface for managing tables, which SQLCE does not offer as an option (I think a GUI is necessary to manage such databases).

It is available from
http://sqlite.phxsoftware.com/

The assembly called System.Data.SQLite.dll is the only file you would need to distribute with your application to provide this database support.

Jamal

On 10/22/2010 10:51 PM, sameer manohtra wrote:
Guys,
I’ve been trying to do some investigation on the internet, but
unfortunately it has confused me even more, instead of giving any
helpful pointer.

I found  out that i need to install either sql server express or
something called sql compact edition to target computer.

ok, that would have not been a big problem, but from some other
sources on the internet I got to know that express edition does not
configure the databases automatically and one need to do a lot of
manual work around.
I did not understand anything much from the description I got to read
from many ssources about how to accomplish this, hence i’ve got even
much puzzled

Seriously, I did not know that its going to be this much difficult to
accomplish when I was developed this application.
Though I’m not losing hope because I know this is how I will get to
learn, but still I don’t have a proper clue about how should I perform
the operation.

Its just an application that’s using one database, having 2  tables,
and simple storing and retrieving works are needed to be performed.

I will still appreciate if someone can suggest me a clear,
step-by-step way on how should I make the setup of a software that
I’ve developed, that contains database.
Anything which can make this work on target computer.

At some places, I got to know that i can add sql express edition as a
prerequisite in my setup project, but I found out that it still
doesn’t solve the problem, since the database instance and creation
still doesn’t work in this situation.

Help, please!

Regards,
Sameer!



On 10/23/10, sameer manohtra<sameermanohtra@xxxxxxxxx>  wrote:
hi,
thanks for the response.
I’m glad to know that these many ways exist, but should I tell you
frankly, I have no idea  which one to use, and how.

About the third option, though that sounds easy, but still the
question is, how will the MDF file work if user doesn’t have the SQL
installed on the computer.

The first and second ways sounds interesting too, but again, I haven’t
used it, so no idea on how will it be done.

Just a humble request, could you please  be more specific on what
should I do here?

The problem is that I am asked to deliver it quick, so I just don’t
have much time to investigate this in depth.

@black, if you say that you use the first option frequently, please,
could you explain me how do you do it, and how can I make it work
quick?

Its just a very simple application as I said, which has a c# form
which takes the inputs from the user, stores it in the sql database,
and retrieves the values back when requested.

Please, help me doing this, will really appreciate.

Regards,
Sameer!



On 10/22/10, black ares<matematicianu2003@xxxxxxxxxxx>  wrote:
you have two or three solutions to investigate.
1. The setup and deployment feature has a nice thing.
You can write custom actions and custom class installers, which can even
have ui elements.
So you must create an window and an installer class, get from the user
the
data necesary to connect to sql server and create all the database and
populate the database.
For this you simply need a script which you can generate using your sql
server management studio.\
2. When you develop such an application, you can use an database project.
This project then has the create and update scripts for your database and
when you make a setup
you will include the output of this ile on your setup and it will
populate
your database.
3. You can use an attached database.
So the mdf file will be in your project and when you will get from the
user
necesary data to build the connection string, you can attach the database
to
the client server.

Personally I've used irst version, but if you can quickly investigate,
the
third seems to be the quickest.

----- Original Message -----
From: "sameer manohtra"<sameermanohtra@xxxxxxxxx>
To: "programmingblind"<programmingblind@xxxxxxxxxxxxx>
Sent: Friday, October 22, 2010 6:38 PM
Subject: integrating sql with my software application: a little urgent,
please


Hi guys,
i am in need of a help urgently, please help me as quick as you can,
I’ll be very thankful.

I have developed an application using c# as front end and sql server
2005 as backend.

Its working perfect and everything done now.
Now I need to give the application to a client for who this windows
based application has been developed.

The problem is, that I’m not able to find how can I add the database
in my application installer?

I am aware of setup and deployment feature of vs.net and have used it
once, but that was an application without database, so had no problem
in doing it.

Its as simple as it:
My application simply stores some inputs given by users and displays
it when needed.
The database therefore is extensively needed, which is located in sql
server at present.

Obviously I won’t install the full sql server package to client’s
computer, so how should I do it then?
Also, my connection strings are of those specified according to my
computer, how can I assure it to work on client’s  computer?

All that I’m looking for is a setup that can install my application
with sql, which can assure the program to work successfully.
Please, it’s a little urgent, as I need to supply the application right
away
Hoping for a quick help, sorry for the troubles.

Regards,
Sameer!
__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind



__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: