VB Code:
Private Sub SetSQLStatements()
'Add parameters to use in SQL statements
With cmdStaff.Parameters
.Add("@EmpID", txtEmpID.Text)
.Add("@Surname", txtSurname.Text)
.Add("@Forename", txtForename.Text)
.Add("@Gender", txtGender.Text)
.Add("@DOB", dtpDOB.Text)
.Add("@Address", txtAddress.Text)
.Add("@Postcode", txtPostcode.Text)
.Add("@TelNum", txtTelNum.Text)
.Add("@Contract", txtContract.Text)
.Add("@Salary", txtSalary.Text)
.Add("@Position", txtPosition.Text)
.Add("@StartDate", dtpStartDate.Text)
.Add("@BookRight", cboBookingRights.Text)
.Add("@LoginRight", cboLoginRights.Text)
.Add("@MemberRight", cboMemberRights.Text)
.Add("@ManageRight", cboManageRights.Text)
End With
'Set SQL statements
With daStaff
.DeleteCommand.CommandText = "DELETE FROM Staff" 'Delete statement
.InsertCommand.CommandText = "INSERT INTO Staff" 'Insert statement
.[B]UpdateCommand.CommandText = "UPDATE Staff SET Address = @Address, BookingRights = @BookRight, Contract = @Contract, DOB = @DOB, Forename = @Forename, Gender = @Gender, LoginRights = @LoginRight, ManageRights = @ManageRight, MemberRights = @MemberRight, Position = @Position, Postcode = @Postcode, Salary = @Salary, StartDate = @StartDate, Surname = @Surname, [Telephone Number] = @TelNum" 'Update statement[/B]
End With
End Sub
What can i do make the SQL statement in bold stretch over more lines of code, so that the whole statement can be seen without scrolling the code window?