Please can anyone cheack my work its not working with me !
Also if you have any simple Solution can I use, it will be better !
Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click Dim conString As String = "Data Source=BUSH;Initial Catalog=HOTEL;Integrated Security=True" Dim sqlCom As SqlCommand = New SqlCommand() Dim sqlCon As SqlConnection = New SqlConnection(conString) sqlCom.Connection = sqlCon sqlCom.CommandText = " SELECT distinct Type_of_Room, No_of_Days, Charge ,Date , Crand_Total FROM Room INNER JOIN BookingRoom ON Room.Room_ID <> BookingRoom.Room_ID INNER JOIN Booking ON BookingRoom.BookingID = Booking.BookingID WHERE [B]([/B]('" + TextBox4.Text + "' NOT BETWEEN booking.arrivedate AND booking.enddate) AND ('" + TextBox2.Text + "' NOT BETWEEN Bookingg.ArraieDate AND Booking.EndDate)[B])[/B] or Booking.BookingId = null" sqlCom.CommandType = CommandType.Text sqlCon.Open() sqlCom.ExecuteNonQuery() sqlCon.Close() End Sub
It showing me error in ExecuteNonQuery !! I don't Whay ! Also the insert data in my web not saving in database SQL server 2010 !
Please help me !!!