Solved

SQL Database...

Posted on 2000-03-07
7
163 Views
Last Modified: 2013-11-23
I have an application I'm working on that uses an MS SQL 7.0 database. This application will installed on many machines.  What I would like to know is if there is a way to not have to use the Enterprise Manager to re-create the database on those machines after the softwares installed.  I would prefer to just include the database with the install, even though I'll still need to set the permissions.  Is there any easy way of doing this?
0
Comment
Question by:dokken
7 Comments
 
LVL 2

Expert Comment

by:kubeerja
ID: 2593791
an easy way is to generate a full script of your DataBase and make your application run this script once installed to create the Database and other Database objects.
0
 
LVL 1

Expert Comment

by:yk030299
ID: 2594236
since all client can connect to the same DBMS server, so I think re-creating database manytimes is not necessary. you just need to create database by sa and grant premessions to all users who need this db.
As Kubeerja said, you can make a script if you still want to re-do anything.
0
 
LVL 1

Expert Comment

by:chengjian
ID: 2594681
In enterprise manager, click the database you need, and click Generate SQL Script, and in option tab, check all options. Now, not only use script all database object but also the permissions.

To give permission to roll instead of single user, so, what you want to do after installation is add user to roll not give specified user permissions.

if all servers is online, what you need perhaps is a DTS Import/Export

good luc
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:dokken
ID: 2596035
Doesn't sound like there's any easy way.  The program will be installed on machines at locations which aren't hooked up to any network so they will require their own database.  Since there will be many people installing the software I had wanted to make this part of it as easy as possible.  How do shareware authors include a MS SQL database?
0
 

Expert Comment

by:Chelly_the_dog
ID: 2601105
Why do you use a MS SQL Database ?
If i understand you correctly you have written a Single user application, that does not need a Client/Server-Database.
Nevertheless, if you want to use MS SQL and you can make it sure, that MS SQL ist installed correctly on the local machine, you can connect within your application and execute the script after you have installed the BDE or a direct access driver.
You can also include this part in your installation program if you do not want your application to do this on first startup. InstallShield can handle this for you !
0
 

Accepted Solution

by:
johnstoned earned 150 total points
ID: 2628576
I would consider converting the program to use MS Access or Paradox tables.  You can then include a blank database with the distrabution and it will just work.  There is no need to even have a database engine installed, as the BDE will work with these types of database as standard.

If you are still determined to use SQL Server, you can do this...

Create a registry setting in HKEY_Local_Machine so that you can tell if your program is running for the first time or not.  If it is, run an SQL statement like..

create database MyDatabase
(name = MyDBData,
 filename = 'c:\mssql7\mydb.mdf',
 size=20mb,
 filegrowth = 10mb)
log on
(name = MyDBLog,
 FileName = 'c:\mssql7\mydb.ldf',
 size = 5mb,
 filegrowth = 1mb)

Executing that will create a new database.
You can then use create table to add tables to the database from within Delphi.

Hope that's of some use,
Dave.
0
 

Author Comment

by:dokken
ID: 2645564
The program is going to be a multi-user program and the data needs to be searchable on the web.  This is why I wanted to use MS SQL.  Unfortunately, after converting my application over to using it, it's way too slow.  I think the problem is ODBC, which is the only way I connect to it with the Delphi Professional, right?

I'll give the points to anyone who can answer this for me... I need a database, which doesn't have the 2 gig size limitation, and preferably the machine it's installed on (it won't always be through a network) doesn't need anything special to use it. And connecting to it through ODBC is not an options since it seems to really slow things down.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
LAN or WAN ? 11 95
Convert MS Word document to a PDF file 9 91
Delphi and Access based Enumeration 9 70
Not able to call Delphi XE10 dll function from Delphi 6.0 4 37
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question