Thanks, but your solution did not help. I also tried to use an SqlDataSource, but I am not experienced enough, so I try to stick to the documets written by Michael Washington... If I give you some of my code, maybe you see what's wrong. I guess I have been troubleshooting for too long, so I'm getting blinded by the code.
Here is the insert code of the controller file:
<DataObjectMethod(DataObjectMethodType.Insert)> _
Public Shared Sub QBirthdayToday_Insert(ByVal BirthdayTodayInfo As QBirthdayTodayInfo)
'Dim intModuleId As Integer
DataProvider.Instance().ExecuteNonQuery("Q_spAddIndividual", BirthdayTodayInfo.ModuleId, GetNull(BirthdayTodayInfo.IndividualFirstName.ToString), GetNull(BirthdayTodayInfo.IndividualLastName.ToString), GetNull(BirthdayTodayInfo.Individual.ToString), GetNull(BirthdayTodayInfo.Day), GetNull(BirthdayTodayInfo.Month), GetNull(BirthdayTodayInfo.Year), GetNull(BirthdayTodayInfo.IsLiving))
End Sub
Here is the definition in my info file:
Private _ModuleId As Integer
Public Property ModuleId() As Integer
Get
Return _ModuleId
End Get
Set(ByVal value As Integer)
_ModuleId = value
End Set
End Property
And finally here is my ObjectDataSource:
<asp:Label ID="lblModuleId" runat="server"></asp:Label>
<asp:ObjectDataSource ID="ObjectDataSource_QBirthdayToday"
runat="server"
DataObjectTypeName="Q.Modules.BirthdayToday.QBirthdayTodayInfo"
SelectMethod="QBirthdayToday_Select"
InsertMethod="QBirthdayToday_Insert"
UpdateMethod="QBirthdayToday_Update"
DeleteMethod="QBirthdayTodayInfo_Delete"
OldValuesParameterFormatString="original_{0}"
OnInit="Page_Load"
TypeName="Q.Modules.BirthdayToday.QBirthdayTodayController">
<SelectParameters>
<asp:Parameter DefaultValue="00" Name="ModuleId" Type="Int32" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="Original_ID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="ModuleId" Type="Int32" />
<asp:Parameter Name="Id" Type="Int32" />
<asp:Parameter Name="IndividualFirstName" Type="String" />
<asp:Parameter Name="IndividualLastName" Type="String" />
<asp:Parameter Name="Individual" Type="String" />
<asp:Parameter Name="Day" Type="Int32" />
<asp:Parameter Name="Month" Type="Int32" />
<asp:Parameter Name="Year" Type="Int32" />
<asp:Parameter Name="IsLiving" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:ControlParameter ControlID="lblModuleId" Name="ModuleId" PropertyName="Text" Type="Int16" />
<asp:Parameter Name="IndividualFirstName" Type="String" />
<asp:Parameter Name="IndividualLastName" Type="String" />
<asp:Parameter Name="Individual" Type="String" />
<asp:Parameter Name="Day" Type="Int32" />
<asp:Parameter Name="Month" Type="Int32" />
<asp:Parameter Name="Year" Type="Int32" />
<asp:Parameter Name="IsLiving" Type="Int32" />
</InsertParameters>
</asp:ObjectDataSource>