can anybody help me in this
20 7398
We'll need a little more information then that. What type of database, where is it going etc.
while installing product iuser can select database installation by checking chekbox then i have to install database on his system, database meanse in sql server.
Sorry, still not enough information, what product, did you create it, if so, in what language.
With what we have so far.
As far as creating the database, with MS Sql Server (and I assume others) you can create a script that will create the database. Create the script, design your program (If you wrote it) to connect to the server and run the script.
Hmm, maybe i need to setup a post guidelines.
Banfa 9,065
Expert Mod 8TB
Hmm, maybe i need to setup a post guidelines.
Definately, I have been thinking the same thing for several weeks. I might even chip in and write some myself :D
we have doveloped a product in c# and it has diffrent applications ie.
according to the clients role we have to install database . for ur clear idea
i have created a custom diloguebox in setup&deployment project it looks some what like
() cashier
() central server option button
() manager
[] install database checkbox
if user selects manager then only the installdatabase checkbox will be enabled and if he checks it we have to install local database. so i need some way to install or attach database to his local sql server using c#.net
I hope u understand this, n expecting a goo help from u ...
thanku
Use SQL server (I'm assuming MS SQL Server) to create the scripts to build each of the databases. Then, based off the selection, connect to the database and run the script for that database.
i need some examples
if possible some links to this kind of examples
thanku
I did some research and ran a test through VB6 (I'm learning C#)
I used the Shell feature and ran osql with the command line arguments and it worked. You'll need to write the code for C# to do the same. When I get time later I'll see what I can do in C#.
Here is some info on both programs.
If you're installing on SQL Sever 2005 then you'll use a program call SqlCmd.exe otherwise oSql.exe
OSql help from MSDN http://support.microsoft.com/default...-us;325003#kb1
SqlCmd help from MSDN http://msdn2.microsoft.com/en-us/lib...4(SQL.90).aspx
If you need all the command line arguments go to the command prompt and run osql /? or sqlcmd /?
That will give you a listing of all the command line arguments for each
Took some research but I got it to work in C#. My biggest catch was C# requires two "\\" for the drive spec where I entered one "\"
("C:\\" instead of "C:\") The following code will run a SQL Script. In my case I wrote a script to query a database and put the data in a text file. your SQL script will create the database. (Through Enterprise manager, right click over the database, all task, Generate sql script and set the properties under Options) - private void button1_Click(object sender, EventArgs e)
-
-
{
-
try
-
{
-
Process RunSQLScript = new Process();
-
RunSQLScript.StartInfo.FileName = "sqlcmd";
-
RunSQLScript.StartInfo.Arguments = "-E -S clovis-003 -i c:\\test.sql -o c:\\testData.txt";
-
RunSQLScript.Start();
-
}
-
catch(Exception f)
-
{
-
Console.WriteLine("An error occurred: '{0}'", f);
-
}
-
-
}
-
hope that helps
I got another question, while installing i have to give the source path of the .mdf and .ldf files so that i can copy these in to Sql Servers Data folder and from there i can attach them to server but, how to specify the source path of these files. if i give source path of custom action property then it is a debug folder of the installer so when i build it all the files in that folder are being re-generated. so how do i do that. Is there any way to refer to the parent folder of this installer folder ie if the installer folder is
h:\myproduct\installer\debug then i want to store my files in
h:\myproduct\installer so how to do this
thanku
Regards
prashanth
I dont know the answer to that one. you might want to start a new thread and see if someone else can answer it for you. I've never created a custom action. I did look it up on MSDN but I did not see anything pointing me in that direction.
To find the source path of my database files just i have used a small trick
here first i srored the path to my database files in a string variable it contains all path except the drive name because we can't say in clint sys what is drive name of cd drive so i get this drive from source path - private string GetConfigFilePath(string fpath)
-
{
-
string filePath = "";
-
string dd = "";
-
string Resources=@"\application\databasefolder\";
-
dd=sourcePath.Substring(0, 3);
-
string strConfigLoc = dd + Resources
-
string strTemp = System.IO.Path.GetDirectoryName(strConfigLoc).ToString();
-
-
filePath = strTemp+@"\";
-
EventLog.WriteEntry("filepath", filePath , EventLogEntryType.SuccessAudit);
-
return filePath;
-
-
}
-
I like your solution. I was trying to find the equivilant to VB6's "App.Path" but was unable to locate it. What namespace is "SourcePath" under?
SourcePath is not from namespace. do one thing , in custom action editor
|
----Install
..........|
...........---UrCustomAction.dll
----Commit
----RollBack
----Uninstall
go to properties of that UrCustomAction.dll is what ever ur custom action file
in that
CustomActionData property is there
enter following in to that property
/SourceFolder="[SourceDir]\" /DestinationFolder="[TARGETDIR]\"
here [SourceDir] is source folder of ur custom action dll
njoy n all the best
How to find werther the SqlExpress is installed on current machine or not
i need this to install Sqlexpress on selection of client but i have to check first werther its alredy installed in sys
Hi friends , i am developing a setup and deployment project for our application here i have to include two other applications with our product installer, and they must be installed only when use selects them. can any body have any idea abt this
just how to create nested installer. clear idea
thank u
Sign in to post your reply or Sign up for a free account.
Similar topics
by: yossi |
last post by:
Hello.
I'm trying to install Oracle 9i Rel 2 on Windows 2000 server.
During the installation I choose to create a general purpose database,
and choose all the default options.
Everything...
|
by: Ken Lindner |
last post by:
I have a need to become familiar with SQL Server 2000 for work.
Needless to say I am new to SQL Server any version, but not IT in
general. My employer has provided me with the SQL Server 2000...
|
by: Chris Halcrow |
last post by:
Hi
I've spent ALL DAY trying to re-install SQL Server 2000 on Windows XP.
I continually get the error 'cannot configure server' just at the end
of the installation. I've tried the following:
...
|
by: Gerald Hernandez |
last post by:
One of my development PC's died, and I need to have legacy VS and VS.Net
installed at the same time. On the now dead PC, I had VS6 installed prior to
installing VS.Net. This worked just fine.
On...
|
by: Ed Stevens |
last post by:
A tale of woe, and a question . . .
Last week my boss said to me "we've installed DB2 Connect on this
Solaris box. Make it work."
Now, I've barely seen DB2 Connect on Windows, having fumbled...
|
by: C. Hughes |
last post by:
Hi,
I have used the standard tools in VS 2005 to compile my VB application into
a setup file. After executing the setup file and installing the program,
starting the program often presents an...
|
by: vijaykumars |
last post by:
+-----------------------------------------------------------------------------+
Summaries:
+-----------------------------------------------------------------------------+
Installation...
|
by: Aussie Rules |
last post by:
Hi,
I have a vb.net application that uses a SQL Express database.
The end user already has SQL Express setup on there server, but they have no
skills at using it.
Is there a way I can have my...
|
by: Chris Leonard |
last post by:
James - you could be running into a known issue with installing Oracle8i
software on a P4. Here is a plain-text section of our internal
documentation of the issue:
Subject/Title: Installing...
|
by: =?Utf-8?B?VmFuZXNzYQ==?= |
last post by:
Hi all!
I am having problems on installing .NET Framework 3.5 on some machines. In
one machine the error is:
'.NET Framework 3.5' RunCheck result: Install Needed
Verifying file integrity of...
|
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...
|
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...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
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)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
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
|
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...
|
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...
| |