Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help me to fix the errors in visual studio c# give me steps I can't understand this errors very defcalt please give me example

image text in transcribed

please help me to fix the errors in visual studio c# give me steps

image text in transcribed

image text in transcribed

image text in transcribed

I can't understand this errors very defcalt please give me example how I can fix , I need important today

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

46 48 49. private void EditBut_Click(object sender, EventArgs e) 45 { con.Open(); 47 String myquery = "UPDATE staff_tb1 set StaffName ='" +Staffnametb.Text + "', staffpassi SqlCommand cmd = new SqlCommand (myquery, con); Propertie cmd.ExecuteNonQuery(); is is the next statement to execute when this thread returns from the current function. ted"): 51 con.Close(); Exception Unhandled 4 X 52 populate(); 53 System.Data.SqlClient.SqlException: 'Incorrect syntax near 54 'gender: 1 reference This exception was originally thrown at this call stack: 55 private void DeleteButt_Cli [External Code] 56 { Hotel_System.Staffinfo.EditBut_Click(object, System.EventArgs) ir con.Open(); [External Code] string Myquery = " dele 59 SqlCommand cmd = new Sq cmd.ExecuteNonQuery(); View Details Copy Details Start Live Share session. MessageBoy Show("clinet 57 58 60 61 10% No issues found Exception Settings Exception Settings Error List Succes 13 MessageBox.Show Stati con.close(); populate(); } 45 46 IN 47 EN 51 52 53 54. 1 reference private void EditBut_Click(object sender, EventArgs e) { con.Open(); String myquery "UPDATE staff_tb1 set StaffName +Staffnametb.Text + ", staffpassi Properties SqlCommand cmd = new SqlCommand (myquery, con); md.ExecuteNonQuery(); MessageBox.Show("clinet S ccessfully Edited"): con.Close(); Exception Unhandled 4 x populate(); } Sysa.m.Data.SqlClient.SqlException: 'Incorrect syntax near 'gender': 1 reference This exception was originally thrown at this call stack: private void DeleteButt_Cli [External Code) { con.Open(); Hotel_System.Staffinfo.EditBut_Click(object, System.EventArgs [External Code) string Myquery = " dele SqlCommand cmd = new Sq cmd.ExecuteNonQuery(); View Details | Copy Details Start Live Share session... MessageBox Show("clinet 55 66 7 8 9 No issues found Analyze Tools Extensions Window Help Search Ctrl-Q Continue Thread: (10336] Main Thread Stack Frame: Hotel System.Staffinfo.EditBut_Click ClientInfo.cs (Design) Clientinfo.cs EditBut_Click isinfo.cs (Design) Staffinfo.cs Staffinfo.cs (Design) R$ Hotel System.Staffinfo cmu.ExecuteNonQuery(); MessageBox.Show("Staff Successfully Added"); con.close(); populate(); } 1 reference private void EditBut_Click(object sender, EventArgs e) { con.Open(); String myquery "UPDATE staff_tb1 set StaffName -"" +Staffnametb.Text + "", staffpas SqlCommand cmd = new SqlCommand(myquery, con); cmd.ExecuteNonQuery(); MessageBox.Show("Clinet Successfully Edited"); con.Close(); populate(); 1 reference private void DeleteButt_Click(object sender, EventArgs e) { con.Open(); string Myquery ="delete * from Staff_tb1 where staffid = SqlCommand cmd = new SqlCommand (Myquery, con); cmd.ExecuteNonQuery(); MessageBox Show("clinet Successfully Deleted": found + staffidtb.Text + ""; or List hp in pre se & 8 1 Hotel System 38 Hotel System. umu. EXECULENonQuery(); MessageBox.Show("Staff Successfully Added"); con.close(); populate(); 1 reference private void EditBut_Click(object sender, EventArgs e) 45 { 46 con.Open(); 47 String myquery = "UPDATE staff_tb1 set StaffName +St 48 SqlCommand cmd = new SqlCommand(myquery, con); 49 cmd.ExecuteNonQuery(); This is the next statement to execute when this thread returns from the current function ted"); 51 con.Close(); 52 populate(); 53 } 54 1 reference 55 B private void DeleteButt_Click(object sender, EventArgs e) 56 57 con.Open(); 58 string Myquery - - delete * from Staff_tb1 where staffid = 59 SqlCommand cmd = new SqlCommand (Myquery, con); 60 cmd.ExecuteNonQuery(); 61 MessageBox Show("clinet Successfully Deleted" 110% No issues found Exception Settings Exception Settings Error List C9-2 hp File Edit View Project Build SQL Test Analyze Tools Extensions Win Debug Debug Any CPU Start AF dbo.Table [Data] dbo.Reservation_tt dbo.staff_b1 [Data] Max Rows: 1000 dbo.Room_tb1 [Data] So ClientID ClientName ClientPhone ClientCountry DRA tasmeem 079123445 2 ayman 32564 USA Server Explorer Toolbox Data Sources 22 omar BARAZIL 45 6743468 6743064 021331 9999 USA SPAIN zeina salma batool NULL 99 100 FRANCE NULL NULL NULL Connection Ready (LocalDB) Error List Entire Solution Code O Errors A o Warnings 0 Messages XY Build + IntelliSense Description Pro Data Tools Operations Error List Output File Edit View Project Build Test Analyze Tools Extensions Window Debug SQL Debug Any CPU Start Applicatic dbo.Table [Data] dbo.Room_tb1 [Data] dbo.Reservation_tb1 [Data dbo.staff_tb1 [Data] Max Rows: 1000 Client Room NULL NULL Resid Dataln dataout o NULL NULL NULL Server Explorer Toolbox Data Sources 2 Connection Ready (LocalDB)\MSSQLL- Error List Entire Solution Code O Errors o Warnings 0 Messages Build + IntelliSense Description Project Data Tools Operations Error List Output Server Explorer prver Fynlorer Toolboy Data Sources Tables Client_tb1 Ho Clienti ClientName ClientPhone ClientCountry Reservation_tb1 mo Resid Client Room Dataln dataout Room_tb1 mo Roomid RoomPhone RoomFree staff_tb1 To Staffid Staffname Staffphone gender staffpassword Table mo Staffid Staffname Staffphone gender Views > File Edit View Project Build Debug SQL Test Analyze Tools Extensions Window Debug Any CPU Start Application dbo. Table [Data] * Staffid Server Explorer Toolbox Data Sources dbo.staff_tb1 [Data] + x dbo.Room_tb1 [Data] dbo.Reservation_tb1 [Data) Max Rows: 1000 Staffname Staffphone gender staffpassword omar 1222 male 1234 tasneem 1234 female 12345 aya 23346 female 123456 NULL NULL NULL NULL w N NULL Connection Ready (LocalDB)\MSSQLLOG Error List Entire Solution Code O Errors O Warnings O Messages Build + IntelliSense Description Project File Edit View Analyze Tools Extensions Window Help Project Build Debug SQL Test 19 - - Debug Any CPU Start Application Insights dbo.Reservation_tb1 [Data] dbo. Room_tb1 [Data] SI dbo.Table [Data] + x dbo.staff_tb1 [Data] CY Max Rows: 1000 Staffid Staffname Staffphone NULL NULL NULL gender NULL Connection Ready |(LocalDB)\MSSQLLocalDB IC Error List Entire Solution Code Description O Errors o Warnings O Messages X Build + IntelliSense Project File Edit View SOL Test Analyze Tools Extensions Window Help S Project Build Debug 19 - - Debug Any CPU Start Application Insights dbo.Table [Data] dbo.room_tb1 [Data] + x dbo.Reservation_tb1 [Data] no Roomid 100 dbo.staff_tb1 [Data] Max Rows: 1000 RoomPhone RoomFree 45477 Yes 54646 Busy NULL NULL ID 102 NULL o Connection Ready (LocalDB)\MSSQLLocalDB 10 Error List Entire Solution X 0 Errors Code Description A Warnings O Messages Build + IntelliSense Project Data Tools Operations Error List Output 2 Rows Ln 1 Col 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 23rd International Conference Dexa 2012 Vienna Austria September 2012 Proceedings Part 1 Lncs 7446

Authors: Stephen W. Liddle ,Klaus-Dieter Schewe ,A Min Tjoa ,Xiaofang Zhou

2012th Edition

3642325998, 978-3642325991

More Books

Students also viewed these Databases questions

Question

What is error detection and recovery in an automated system?

Answered: 1 week ago

Question

e. What are notable achievements of the group?

Answered: 1 week ago