Thearon,
Yes. Here are the queries I am using:
usp_DeleteLease
DELETE *
FROM Leases
WHERE LeaseID = @LeaseID;
usp_InsertLease
INSERT INTO Leases ( LeaseID, Branch, Due-
Date, StartDate, EndDate, BranchID, LandlordID)
VALUES (@LeaseID, @Branch, @DueDate, @
StartDate, @EndDate, @BranchID, @LandlordID);
usp_UpdateLease
UPDATE Leases SET Branch = @Branch, Due-
Date = @DueDate, StartDate=@StartDate, End-
Date = @EndDate, BranchID = @BranchID,
LandlordID = @LandlordID
WHERE LeaseID = LeaseID;
usp_InsertBranch
INSERT INTO Branches ( BranchID, brName )
VALUES (@BranchID, @brName);
I'm able to insert, update, and delete data using text boxes. Here is some code from the update routine:
objData.SQL = "usp_UpdateLease"
'Initialize the Command object
objData.InitializeCommand()
'Add Lease primary key
objData.AddParameter("@LeaseID", _
OleDb.OleDbType.Guid, 16, New Guid(txtUserID.Text))
objData.AddParameter("@Branch", _
OleDb.OleDbType.VarChar, 50, txtLogin.Text)
objData.AddParameter("@DueDate", _
OleDb.OleDbType.VarChar, 10, txtFirstName.Text)
objData.AddParameter("@StartDate", _
OleDb.OleDbType.VarChar, 10, txtEmail.Text)
objData.AddParameter("@EndDate", _
OleDb.OleDbType.VarChar, 10, txtPassword.Text)
Mark
|