1
Answer

solve concurrency if multiple users update the same record a

Gurjeet Singh

Gurjeet Singh

11y
1.2k
1
Hi,

How can i solve concurrency if multiple users update the same record at the same time.

I want to use only stored Procedure.

Answers (1)
0
Vulpes

Vulpes

NA 98.3k 1.5m 12y
That code should work as long as the accessibility of textBox1 has been changed from private to either internal or public.

To deal with the ListBox, you'd need this code:

if (p1.listBox1.SelectedIndex > -1)
{
    label2.Text = p1.listBox1.SelectedItem.ToString();
}
else
{
    label2.Text = "";
}


Accepted
0
Vishal Gilbile

Vishal Gilbile

NA 13.9k 2.9m 12y
Hello Friend,
                As per my suggestion what you can do is in your form2 create a constructor which accepts two arguements. So your code for form2 will be somewhat like the following

public class Form2:Form
{
        private string _val1,_val2;
        public Form2()
        {
                //Default Constructor
        }
        public Form2(string value1,string value2)
        {
                //Set the value of value1 and value2 to the class level variables of your form2
        }
}

And finally when you are creating the instance of form2 in your form1 class try to call your this constructor, like the following.

Form2 objForm2=new Form2(txtTextBox1.Text,ListBox1.SelectedItem.Text);

Hope that solves your problem.


With Regards,
Vishal Gilbile.