OK
so I don't know if is that possible or not
but if not possible can I pass the script file path through the patch runing
OK
so I don't know if is that possible or not
but if not possible can I pass the script file path through the patch runing
Hi,
I want to run sql script from patch file
I found how to run script file using sqlcmd
but I don't want to run it from file I want to put the sql code inside the patch file
Yes, It works
thanks
I think you can use the KeyDown event like this
private void textBox1_KeyDown(object sender, KeyEventArgs e)
{
MessageBox.Show(e.KeyData.ToString());
}
HI
I'm trying to insert data in 2 tables one is the master and the other is the details table, let us say it is test details
first table : the master data of the test (name,date,......)
second table : the parameter details (masterID,parameter,value)
I want to do that through stored procedure so I want to pass a table that contains the parameters data
I found some methods at this links
http://vyaskn.tripod.com/passing_arrays_to_stored_procedures.htm
http://www.sqlservercentral.com/articles/Stored+Procedures/2977/
but I don't know how to use it , Please can any one help me
Thank you
it is very helpful article
I want to save the page setup dialog setting because I want the user to choose the setting one time
and this setting will be constant for the application
I searched for this but I didn't find any thing
or I want to set the page setup dialog setting by code
this is my code but it didn't change any thing
PageSetupDialog pageSetupDialog1 = new PageSetupDialog();
PageSettings settings = printDocument1.DefaultPageSettings;
PaperSize pz = new PaperSize("Envelope B5", 15, 6);
pageSetupDialog1.PageSettings = settings;
pageSetupDialog1.PageSettings.PaperSize = pz;
printDocument1.DefaultPageSettings = pageSetupDialog1.PageSettings;
printDocument1.Print();
Can you give me more explanation please
I read the article but I still can't solve the problem
I have a problem with datagridview
I have three columns . 2 of them are combobox and the last one is textbox.
the seconed combobox is depending on the first
the problem is when i'm trying to fill the seconed combobox in the second row the DataSource of the second combobox changed and cell Invalid Value Error appear
private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == 0)
{
com = new SqlCommand("select * from Pharmacy_ItemDetails where ID="+dataGridView1.CurrentRow.Cells[0].Value.ToString());
com.Connection = con;
ad = new SqlDataAdapter(com);
DataTable dt = new DataTable();
ad.Fill(dt);
Column2.DataSource = dt;
Column2.DisplayMember = "ItemUnitName";
Column2.ValueMember = "ItemUnitID";
}
}
I want to fill the second combobox with different values in each row depending on the first combobox selection
can any one help me please
I'm trying to sending Email through my web application from Gmail
by using Sustem.Net.Mail.SmtpClient
My code is
string To = "doctor_ofvet@yahoo.com";
string From = "doctorofvet@gmail.com";
string Subject = "The Famous";
string Body = "Hello World";
SmtpClient Client = new SmtpClient();
Client.Send(From, To, Subject, Body);
I put this code in the web.config file
<system.net>
<mailSettings>
<smtp>
<network host="smtp.gmail.com" port="465" userName="Gmail Username" password="Password"/>
</smtp>
</mailSettings>
</system.net>
but it did not success
There is no "Name" property for the text box
I put the "ID" property of the text box to unique name but it also still give me one ID which is the last one
int s=1;
for (int i = 0; i < 3; i++)
{
TextBox tb = new TextBox();
tb.ID = "text"+s;
Form.Controls.Add(tb);
s++;
}
the 3 text boxes have the same name (tb) but it have 3 IDs (text1,text2,text3)
if (tb.ID == "text1")
{
Label1.Text = tb.Text;
}
else if (tb.ID == "text2")
{
Label1.Text = tb.Text;
}
else if (tb.ID == "text3")
{
Label1.Text = tb.Text;
}
this code will print only the value of the third text box
is that mean that the application can't identify the first 2 text box
I don't Know what do you mean but
I think that you didn't understand the idea
if you apply this code you will find as example 3 textboxes with the same name
(tb)
and you will not be able to retrieve any data from it
Hello everyone
I want to create Textboxes according to the entered number at runtime but with different names because I want to deal with the the data entered in this textboxes
protected void Button1_Click(object sender, EventArgs e)
{
int rows = 0;
int cells = 0;
int counter =int.Parse(TextBox1.Text);
for (int i = 0; i <= counter; i++)
{
HtmlTableRow ro = new HtmlTableRow();
HtmlTableCell ce1 = new HtmlTableCell();
HtmlTableCell ce2 = new HtmlTableCell();
ro.Cells.Add(ce1);
ro.Cells.Add(ce2);
table1.Rows.Add(ro);
if (cells > 1)
{
cells = 0;
rows++;
}
cells++;
TextBox tb =new TextBox();
this.table1.Rows[rows].Cells[cells].Controls.Add(tb);
cells++;
}
}
As previus I created this textboxes but with the same name so I cant deal with the data inserted in it
I want your help Please
Thank you
I want to write a code that can loop inside the (enum consolecolor) and print the 16 color of console in 16 line
can you help me
my program run on console
how can i do this on console screen
I have a task of bank program .
At the begining of the program it will requst from me to enter the user name and password
I want the password to appear like ****
I want your help ,I searched about it but I didn't find how
if i'm not mistaken a for loop can not increase by a decimal number. I think it can only increase by a whole number such as 1, 2, 3, etc...
Thank you for your reply so how can I loop by decimal number and if you run my code without if condition it will run the program
and is thier any other method to calculate the root of a number
thank you for your assistance
Hi
I'm a beginer programer and I need your help
I'm using visual studio 2005 writing with c#, Iwant to make a small program at console
this program give the root of a number.
I writ this code
double one = double.Parse(Console.ReadLine());
for (double x = 1; x <= one; x++)
{
double result = one / x;
if (result == x)
{
Console.WriteLine(result);
}
by this way it will give you the root but if it is a real number like (25-it's root 5)
when i make x increase by0.1 the code didn't do any thing the code will be
double one = double.Parse(Console.ReadLine());
for (double x = 1; x <= one; x+=0.1)
{
double result = one / x;
if (result == x)
{
Console.WriteLine(result);
}
I want to know why