wings9697
Member
Hi. I am currently working on an application that pulls data from 7 different sources. I've built a VB/ASP template for each one with a SQL Data Source control to connect them to their defined table. I let the contol write the Insert and Update SQL with no modifications, just straight Input and Edit.
The problem is when I select the button to Insert the data, the page clears as if it posted back to the table, but no data is written. I then put a varaible in to tell me the Row pointer data. I was told the pointer is a Row 3, but there already is a record in Row 3, the last correct record being in Row 5. I thought during the Insert, the pointer goes to the end of the table to insert the new record? I'm not getting any SQL or Server connection errors either.
Can someone tell me if they know what's going on, cause I am totally stumped...
Thanks in advance for any help you can provide....
The problem is when I select the button to Insert the data, the page clears as if it posted back to the table, but no data is written. I then put a varaible in to tell me the Row pointer data. I was told the pointer is a Row 3, but there already is a record in Row 3, the last correct record being in Row 5. I thought during the Insert, the pointer goes to the end of the table to insert the new record? I'm not getting any SQL or Server connection errors either.
Can someone tell me if they know what's going on, cause I am totally stumped...
HTML:
<%@ Page Language="VB" MasterPageFile="~/AppMaster.master" AutoEventWireup="false"
CodeFile="Latent.aspx.vb" Inherits="Latent" title="Untitled Page" %>
<%@ MasterType TypeName="AppMaster" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MessagesPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="WorkPlaceHolder" Runat="Server">
<asp:SqlDataSource ID="LatentDataSource" runat="server" ConnectionString="<%$
ConnectionStrings:mclu_caselogConnectionString %>"
DeleteCommand="DELETE FROM [latent] WHERE [lat_number] = @original_lat_number
AND [lat_rptdate] = @original_lat_rptdate AND [lat_evtdate] = @original_lat_evtdate AND
[lat_cses_num] = @original_lat_cses_num AND [lat_ccn] = @original_lat_ccn AND
[lat_agentnum] = @original_lat_agentnum AND [lat_subtech_lname] =
@original_lat_subtech_lname AND [lat_subtech_fname] = @original_lat_subtech_fname AND
[lat_subtech_unit] = @original_lat_subtech_unit AND [lat_proctech_lname] =
@original_lat_proctech_lname AND [lat_proctech_fname] = @original_lat_proctech_fname
AND [lat_offense] = @original_lat_offense AND [lat_off_locate] =
@original_lat_off_locate AND [lat_district] = @original_lat_district AND [lat_psa] =
@original_lat_psa AND [lat_dece_lname] = @original_lat_dece_lname AND [lat_dece_fname]
= @original_lat_dece_fname AND [lat_date_evd_rec] = @original_lat_date_evd_rec AND
[lat_date_case_asg] = @original_lat_date_case_asg AND [lat_date_proc_cmp] =
@original_lat_date_proc_cmp AND [lat_date_report] = @original_lat_date_report AND
[lat_fingers] = @original_lat_fingers AND [lat_palms] = @original_lat_palms AND
[lat_tips] = @original_lat_tips AND [lat_imprints] = @original_lat_imprints AND
[lat_spec_lname] = @original_lat_spec_lname AND [lat_spec_fname] =
@original_lat_spec_fname AND [lat_notes] = @original_lat_notes" InsertCommand="INSERT
INTO [latent] ([lat_rptdate], [lat_evtdate], [lat_cses_num], [lat_ccn], [lat_agentnum],
[lat_subtech_lname], [lat_subtech_fname], [lat_subtech_unit], [lat_proctech_lname],
[lat_proctech_fname], [lat_offense], [lat_off_locate], [lat_district], [lat_psa],
[lat_dece_lname], [lat_dece_fname], [lat_date_evd_rec], [lat_date_case_asg],
[lat_date_proc_cmp], [lat_date_report], [lat_fingers], [lat_palms], [lat_tips],
[lat_imprints], [lat_spec_lname], [lat_spec_fname], [lat_notes]) VALUES (@lat_rptdate,
@lat_evtdate, @lat_cses_num, @lat_ccn, @lat_agentnum, @lat_subtech_lname,
@lat_subtech_fname, @lat_subtech_unit, @lat_proctech_lname, @lat_proctech_fname,
@lat_offense, @lat_off_locate, @lat_district, @lat_psa, @lat_dece_lname,
@lat_dece_fname, @lat_date_evd_rec, @lat_date_case_asg, @lat_date_proc_cmp,
@lat_date_report, @lat_fingers, @lat_palms, @lat_tips, @lat_imprints, @lat_spec_lname,
@lat_spec_fname, @lat_notes)"
SelectCommand="SELECT * FROM [latent]" UpdateCommand="UPDATE [latent] SET
[lat_rptdate] = @lat_rptdate, [lat_evtdate] = @lat_evtdate, [lat_cses_num] =
@lat_cses_num, [lat_ccn] = @lat_ccn, [lat_agentnum] = @lat_agentnum,
[lat_subtech_lname] = @lat_subtech_lname, [lat_subtech_fname] = @lat_subtech_fname,
[lat_subtech_unit] = @lat_subtech_unit, [lat_proctech_lname] = @lat_proctech_lname,
[lat_proctech_fname] = @lat_proctech_fname, [lat_offense] = @lat_offense,
[lat_off_locate] = @lat_off_locate, [lat_district] = @lat_district, [lat_psa] =
@lat_psa, [lat_dece_lname] = @lat_dece_lname, [lat_dece_fname] = @lat_dece_fname,
[lat_date_evd_rec] = @lat_date_evd_rec, [lat_date_case_asg] = @lat_date_case_asg,
[lat_date_proc_cmp] = @lat_date_proc_cmp, [lat_date_report] = @lat_date_report,
[lat_fingers] = @lat_fingers, [lat_palms] = @lat_palms, [lat_tips] = @lat_tips,
[lat_imprints] = @lat_imprints, [lat_spec_lname] = @lat_spec_lname, [lat_spec_fname] =
@lat_spec_fname, [lat_notes] = @lat_notes WHERE [lat_number] = @original_lat_number AND
[lat_rptdate] = @original_lat_rptdate AND [lat_evtdate] = @original_lat_evtdate AND
[lat_cses_num] = @original_lat_cses_num AND [lat_ccn] = @original_lat_ccn AND
[lat_agentnum] = @original_lat_agentnum AND [lat_subtech_lname] =
@original_lat_subtech_lname AND [lat_subtech_fname] = @original_lat_subtech_fname AND
[lat_subtech_unit] = @original_lat_subtech_unit AND [lat_proctech_lname] =
@original_lat_proctech_lname AND [lat_proctech_fname] = @original_lat_proctech_fname
AND [lat_offense] = @original_lat_offense AND [lat_off_locate] =
@original_lat_off_locate AND [lat_district] = @original_lat_district AND [lat_psa] =
@original_lat_psa AND [lat_dece_lname] = @original_lat_dece_lname AND [lat_dece_fname]
= @original_lat_dece_fname AND [lat_date_evd_rec] = @original_lat_date_evd_rec AND
[lat_date_case_asg] = @original_lat_date_case_asg AND [lat_date_proc_cmp] =
@original_lat_date_proc_cmp AND [lat_date_report] = @original_lat_date_report AND
[lat_fingers] = @original_lat_fingers AND [lat_palms] = @original_lat_palms AND
[lat_tips] = @original_lat_tips AND [lat_imprints] = @original_lat_imprints AND
[lat_spec_lname] = @original_lat_spec_lname AND [lat_spec_fname] =
@original_lat_spec_fname AND [lat_notes] = @original_lat_notes"
ConflictDetection="CompareAllValues" OldValuesParameterFormatString="original_{0}">
<DeleteParameters>
<asp:Parameter Name="original_lat_number" Type="Int32" />
<asp:Parameter Name="original_lat_rptdate" Type="DateTime" />
<asp:Parameter Name="original_lat_evtdate" Type="DateTime" />
<asp:Parameter Name="original_lat_cses_num" Type="String" />
<asp:Parameter Name="original_lat_ccn" Type="String" />
<asp:Parameter Name="original_lat_agentnum" Type="String" />
<asp:Parameter Name="original_lat_subtech_lname" Type="String" />
<asp:Parameter Name="original_lat_subtech_fname" Type="String" />
<asp:Parameter Name="original_lat_subtech_unit" Type="String" />
<asp:Parameter Name="original_lat_proctech_lname" Type="String" />
<asp:Parameter Name="original_lat_proctech_fname" Type="String" />
<asp:Parameter Name="original_lat_offense" Type="String" />
<asp:Parameter Name="original_lat_off_locate" Type="String" />
<asp:Parameter Name="original_lat_district" Type="String" />
<asp:Parameter Name="original_lat_psa" Type="String" />
<asp:Parameter Name="original_lat_dece_lname" Type="String" />
<asp:Parameter Name="original_lat_dece_fname" Type="String" />
<asp:Parameter Name="original_lat_date_evd_rec" Type="DateTime" />
<asp:Parameter Name="original_lat_date_case_asg" Type="DateTime" />
<asp:Parameter Name="original_lat_date_proc_cmp" Type="DateTime" />
<asp:Parameter Name="original_lat_date_report" Type="DateTime" />
<asp:Parameter Name="original_lat_fingers" Type="String" />
<asp:Parameter Name="original_lat_palms" Type="String" />
<asp:Parameter Name="original_lat_tips" Type="String" />
<asp:Parameter Name="original_lat_imprints" Type="String" />
<asp:Parameter Name="original_lat_spec_lname" Type="String" />
<asp:Parameter Name="original_lat_spec_fname" Type="String" />
<asp:Parameter Name="original_lat_notes" Type="String" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="lat_rptdate" Type="DateTime" />
<asp:Parameter Name="lat_evtdate" Type="DateTime" />
<asp:Parameter Name="lat_cses_num" Type="String" />
<asp:Parameter Name="lat_ccn" Type="String" />
<asp:Parameter Name="lat_agentnum" Type="String" />
<asp:Parameter Name="lat_subtech_lname" Type="String" />
<asp:Parameter Name="lat_subtech_fname" Type="String" />
<asp:Parameter Name="lat_subtech_unit" Type="String" />
<asp:Parameter Name="lat_proctech_lname" Type="String" />
<asp:Parameter Name="lat_proctech_fname" Type="String" />
<asp:Parameter Name="lat_offense" Type="String" />
<asp:Parameter Name="lat_off_locate" Type="String" />
<asp:Parameter Name="lat_district" Type="String" />
<asp:Parameter Name="lat_psa" Type="String" />
<asp:Parameter Name="lat_dece_lname" Type="String" />
<asp:Parameter Name="lat_dece_fname" Type="String" />
<asp:Parameter Name="lat_date_evd_rec" Type="DateTime" />
<asp:Parameter Name="lat_date_case_asg" Type="DateTime" />
<asp:Parameter Name="lat_date_proc_cmp" Type="DateTime" />
<asp:Parameter Name="lat_date_report" Type="DateTime" />
<asp:Parameter Name="lat_fingers" Type="String" />
<asp:Parameter Name="lat_palms" Type="String" />
<asp:Parameter Name="lat_tips" Type="String" />
<asp:Parameter Name="lat_imprints" Type="String" />
<asp:Parameter Name="lat_spec_lname" Type="String" />
<asp:Parameter Name="lat_spec_fname" Type="String" />
<asp:Parameter Name="lat_notes" Type="String" />
<asp:Parameter Name="original_lat_number" Type="Int32" />
<asp:Parameter Name="original_lat_rptdate" Type="DateTime" />
<asp:Parameter Name="original_lat_evtdate" Type="DateTime" />
<asp:Parameter Name="original_lat_cses_num" Type="String" />
<asp:Parameter Name="original_lat_ccn" Type="String" />
<asp:Parameter Name="original_lat_agentnum" Type="String" />
<asp:Parameter Name="original_lat_subtech_lname" Type="String" />
<asp:Parameter Name="original_lat_subtech_fname" Type="String" />
<asp:Parameter Name="original_lat_subtech_unit" Type="String" />
<asp:Parameter Name="original_lat_proctech_lname" Type="String" />
<asp:Parameter Name="original_lat_proctech_fname" Type="String" />
<asp:Parameter Name="original_lat_offense" Type="String" />
<asp:Parameter Name="original_lat_off_locate" Type="String" />
<asp:Parameter Name="original_lat_district" Type="String" />
<asp:Parameter Name="original_lat_psa" Type="String" />
<asp:Parameter Name="original_lat_dece_lname" Type="String" />
<asp:Parameter Name="original_lat_dece_fname" Type="String" />
<asp:Parameter Name="original_lat_date_evd_rec" Type="DateTime" />
<asp:Parameter Name="original_lat_date_case_asg" Type="DateTime" />
<asp:Parameter Name="original_lat_date_proc_cmp" Type="DateTime" />
<asp:Parameter Name="original_lat_date_report" Type="DateTime" />
<asp:Parameter Name="original_lat_fingers" Type="String" />
<asp:Parameter Name="original_lat_palms" Type="String" />
<asp:Parameter Name="original_lat_tips" Type="String" />
<asp:Parameter Name="original_lat_imprints" Type="String" />
<asp:Parameter Name="original_lat_spec_lname" Type="String" />
<asp:Parameter Name="original_lat_spec_fname" Type="String" />
<asp:Parameter Name="original_lat_notes" Type="String" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="lat_rptdate" Type="DateTime" />
<asp:Parameter Name="lat_evtdate" Type="DateTime" />
<asp:Parameter Name="lat_cses_num" Type="String" />
<asp:Parameter Name="lat_ccn" Type="String" />
<asp:Parameter Name="lat_agentnum" Type="String" />
<asp:Parameter Name="lat_subtech_lname" Type="String" />
<asp:Parameter Name="lat_subtech_fname" Type="String" />
<asp:Parameter Name="lat_subtech_unit" Type="String" />
<asp:Parameter Name="lat_proctech_lname" Type="String" />
<asp:Parameter Name="lat_proctech_fname" Type="String" />
<asp:Parameter Name="lat_offense" Type="String" />
<asp:Parameter Name="lat_off_locate" Type="String" />
<asp:Parameter Name="lat_district" Type="String" />
<asp:Parameter Name="lat_psa" Type="String" />
<asp:Parameter Name="lat_dece_lname" Type="String" />
<asp:Parameter Name="lat_dece_fname" Type="String" />
<asp:Parameter Name="lat_date_evd_rec" Type="DateTime" />
<asp:Parameter Name="lat_date_case_asg" Type="DateTime" />
<asp:Parameter Name="lat_date_proc_cmp" Type="DateTime" />
<asp:Parameter Name="lat_date_report" Type="DateTime" />
<asp:Parameter Name="lat_fingers" Type="String" />
<asp:Parameter Name="lat_palms" Type="String" />
<asp:Parameter Name="lat_tips" Type="String" />
<asp:Parameter Name="lat_imprints" Type="String" />
<asp:Parameter Name="lat_spec_lname" Type="String" />
<asp:Parameter Name="lat_spec_fname" Type="String" />
<asp:Parameter Name="lat_notes" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
<asp:FormView ID="FormView1" runat="server" DataKeyNames="lat_number"
DataSourceID="LatentDataSource" DefaultMode="Insert">
Thanks in advance for any help you can provide....
Last edited by a moderator: