I have developed headaches since I have been trying to do this for a whole week. What is the proplem?
I just got introduced to dotnet and have been writing a web application as part of my final year thesis project.
I have gotten to a point where I want to insert textbox, dropdownlistbox and other control values into a table at the click of a button.
I have table adapter that has an insert method; however i dont know how to use this method to get the values of my textboxes, dropdownlist box into the database table.
this is a sample code I have written:
public void insertIntoBuyOrder() {OrderTableAdapter buyOrderInsert = new OrderTableAdapter();buyOrderInsert.("@symbol, @userName, @orderType, @orderQuantity, @price, @timeInForce, @side, @priority, @orderDate");
String insertCommand = " INSERT INTO [Order] ([symbol], [userName], [orderType], [orderQuantity], [price], [timeInForce], [side], [priority], [orderDate]) VALUES (@symbol, @userName, @orderType, @orderQuantity, @price, @timeInForce, @side, @priority, @orderDate)";
}
I dont know how to use the insert method of my table adapter to get the values of my textbox, dropdownlistbox, into the order table.
Any help will be much appreciated