|
zead wrote: is it possible to do that?.
Yes. But I doubt it is easy.
As I suggested custom actions with the MS install would be required.
Or buy an installer and learn out to use that.
|
|
|
|
|
Why not just have an installment of SQL Server be a requirement to install your application? Have you looked into SQL Server Compact Edition?
As jschell said, you may run into licensing issues if you have your set up install SQL Server when setting up your application.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
It is possible to create a VBScript which installs SQL Server and sets some values like instance name. I do not know if the sa password can be set also. The call is something like
SQLEXPR_x86_DEU.exe /QS /Action=Install /IAcceptSQLServerLicenseTerms=true /Features=SQL,Tools /InstanceName="MyInstance"
It could be necessary to install a new version of Windows Installer before that.
After installation of SQL server, the database can be restored/attached by a call to osql with many parameters.
I don't know all the details, but with this information you can start and try.
|
|
|
|
|
Hi,
I did that using procss.start and i pass the arguments, this is the code:
Process myProcess = new Process();
string sqlExpressSetupFileLocation=@"C:\Users\Administrator\Desktop\SID.Installer.BootStrap\bin\Debug\SQLEXPR_x64_ENU.exe"
myProcess.StartInfo.FileName = sqlExpressSetupFileLocation;
string startupPath = sqlExpressSetupFileLocation.Substring(0, sqlExpressSetupFileLocation.LastIndexOf("\\"));
myProcess.StartInfo.Arguments = " [SQLSERVER2008] /INSTANCEID=\"" + instanceName + "\" /ACTION=Install " +
" //IAcceptSQLServerLicenseTerms=true /FEATURES=SQLENGINE,REPLICATION " +
" /INDICATEPROGRESS=True /QUIET=False /QUIETSIMPLE=True " +
" /INSTALLSHAREDWOWDIR=C:\\Program Files (x86)\\Microsoft SQL Server " +
" /INSTANCEDIR=C:\\Program Files\\Microsoft SQL Server\\ " +
" /INSTANCENAME=" + instanceName + " " +
" /MEDIASOURCE=" + startupPath + "\\" + " " + " /SAPWD=" + saPassword + " ";
myProcess.StartInfo.UseShellExecute = false;
myProcess.Start();
myProcess.WaitForExit();
the installation run but at the end not completed successfully
and i can't know what is the reason
thanks all;
|
|
|
|
|
you can use Install shield Software
|
|
|
|
|
open windowform in a specified area of other windowform
|
|
|
|
|
And what, exactly, is your question? When you post it, don't forget to tell us what you have done and what code you have put in place?
|
|
|
|
|
You can do it - just put it inside a panel:
frmInputBox fib = new frmInputBox();
fib.TopLevel = false;
fib.Visible = true;
panContainer.Controls.Add(fib);
fib.Dock = DockStyle.Fill;
But I strongly advise against it - it never looks particularly good.
Instead, put the controls you want on the form into a UserControl, and display that on the Form and the Panel instead.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
I believe that it is always a serious mistake to show a Form inside another Form ! Only in the long outmoded, so called, "MDI interface" mode did you have Child Forms within a 'master' Parent Form: that is no longer considered a useful interface model.
I second OriginalGriff's suggestion to either use a Panel, or a UserControl, to display whatever inside a Form.
The really good thing about building UserControls, is their potential for re-use in other projects, or use of multiple instances of them in one project.
best, Bill
"Everything we call real is made of things that cannot be regarded as real." Niels Bohr
|
|
|
|
|
There is a way: Using MDI Forms.
Regards
Christian Amado
MCITP | MCTS | MOS | MTA
Olimpia ☆ ★★★
Please mark as answer, if it helps.
|
|
|
|
|
you can use below Code
[DllImport("user32.dll")]
static extern int SetParent( int hWndChild, int hWndNewParent);
[DllImport("user32.dll", EntryPoint="SetWindowPos")]
static extern bool SetWindowPos(
int hWnd,
int hWndInsertAfter,
int X,
int Y,
int cx,
int cy,
uint uFlags
);
[DllImport("user32.dll", EntryPoint="MoveWindow")]
static extern bool MoveWindow(
int hWnd,
int X,
int Y,
int nWidth,
int nHeight,
bool bRepaint
);
SetParent( wordWnd, this.Handle.ToInt32());
SetWindowPos(wordWnd,this.Handle.ToInt32(),0,0,this.Bounds.Width+20,this.Bounds.Height+20, SWP_NOZORDER | SWP_NOMOVE | SWP_DRAWFRAME);
MoveWindow(wordWnd,-5,-33,this.Bounds.Width+10,this.Bounds.Height+57,true);
this.Parent.Focus();
|
|
|
|
|
In a linq to sql data context object that points to a sql server 2008 r2 database in a C# 2010 application, I want to change the size of a column from varchar(500) to varchar(900). To acoomplish this task, can you tell me what I need to do so the data context object picks up the expanded size?
|
|
|
|
|
The datacontext schema is created when you drag and drop the database items from the explorer.
Since this is just a column size change, you can change this manually in the code generated.
The other option is to manually delete all the table mappings and then re-create them - this would be a slightly more cumbersome task.
|
|
|
|
|
Create another field with the HASH of that varchar(500), and put a UNIQUE CONSTRAINT on the hash field: HASH BYTES('md5', My Long VarcharField)
This will cause poor performance but if you have a varchar(500) where you need to enforce uniqueness I'm assuming performance isn't on the forefront of your considerations anyways.
http://www.dapfor.com/en/net-suite/net-grid/tutorial/data-binding
|
|
|
|
|
AnnieCalvert wrote: Create another field with the HASH...
What does that have to do with the question?
|
|
|
|
|
Any varchar column is mapped to a string, isn't it? So you should just be able to change the schema and everything should still work fine.
|
|
|
|
|
|
Yes, there is one.
Start Menu -> All Programs -> Accessories -> Calculator...
There are also 7.2 million results if you would have done a google[^] search.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Random nonsensical sentence of the week?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Try something and post your queries here - someone might be able to help you.
|
|
|
|
|
What have you tried so far?
Vande Matharam - Jai Hind
|
|
|
|
|
You can try one of the following: Google Search[^]
Christian Amado
MCITP | MCTS | MOS | MTA
Olimpia ☆ ★★★
Please mark as answer, if it helps.
|
|
|
|
|
Hi all,
actually what I need it's so simple (but not for beginner just like me) I read two articles about registry manipulating but I couldn't do what I need, it's to add these values and data using C#:
"Key"="000000000000"
"VID"="AAAADjUuMC4xMTMzNy4xOTY4"
to the existing key:
[HKEY_CURRENT_USER\Software\Google\Google Earth Plus]
could anyone help me please?.
Many thanks in advance.
modified 3-Aug-12 10:34am.
|
|
|
|
|
The following is untested code but should give you something to get started, add:
using Microsoft.Win32;
to your class, then where needed try the following code. I believe that CreateSubKey and SetValue will create the required Key/Value if they do not already exist, or update them if they do.
RegistryKey software = Registry.CurrentUser.CreateSubKey("Software");
RegistryKey google = software.CreateSubKey("Google");
RegistryKey googleEarth = google.CreateSubKey("Google Earth Plus");
googleEarth.SetValue("Key", "000000000000");
googleEarth.SetValue("VID", "AAAADjUuMC4xMTMzNy4xOTY4");
edit: correction of typeo in the word goolge google
modified 3-Aug-12 12:22pm.
|
|
|
|
|
Hi,
I tried this code but I got some errors like:
------------------
The name 'google' does not exist in the current context
The name 'goolgeEarth' does not exist in the current context
------------------
Anyway I also tried this code but nothing happened:
RegistryKey mykey = Registry.CurrentUser.CreateSubKey(@"Software\Google\Google Earth Plus");
mykey.SetValue("VID", "AAAADjUuMC4xMTMzNy4xOTY4");
Thank you.
|
|
|
|