I have two asp.net 3.5 listview controls on seperate pages. When a user clicks a link from the first listview I am passing an int ID variable (TrustID) through the query string to populate the second listview. I want to be able to insert new data into this list view using a stored procedure within my datacontext. I have attached the stored procedure (code below) to my datacontext and declared it within the insert properties of the appropriate table within my datacontext. I keep getting an out of range datetime error upon insert so I'm not too sure if my insert stored procedure is written correctly? "TrustID" is the foreign key in the TrustAccounts table used to pull through data attached to another table.
ALTER PROCEDURE proc_InsertTrustAccount
Insert into TrustAccounts (TrustID, DueDate, FrequencyCode, ActionCode, Notes)
Values (@TrustID, @DueDate, @FrequencyCode, @ActionCode, @Notes)