Inserting data into ACCESS using a Web Form

May 16, 2008
Reaction score
When I run the web app in the browser and click on the submit button nothing happs. One would at least think I would get at least one error.

I doing a class project that is due this thursday and what I am doing is building a prototype web mail app for my system analysis class. So I was trying to input Student ID, FirstName, LastName, and Last 4 of SSN using Textboxes. The fields I'm using in Access are the same as above.

asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Email.mdb" 
InsertCommand="INSERT INTO [UserCredentials]([student ID], [FirstName], [LastName], [last 4])VALUES(?,?,?,?)"> 

<asp:ControlParameter ControlID="StudentIDTextBox" Name="student_ID" PropertyName="Text" Type="Int32" /> 
<asp:ControlParameter ControlID="FirstNameTextBox" Name="FirstName" PropertyName="Text" type="String" /> 
<asp:ControlParameter ControlID="LastNameTextBox" Name="LastName" PropertyName="Text" Type="String" /> 
<asp:ControlParameter ControlID="Last4SSNTextBox" Name="Last_4" PropertyName="Text" Type="Int32" /> 

<br />

I also place this code in my event

Private Sub CreateButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CreateButton.Click
End Sub


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question