Showing posts with label screen. Show all posts
Showing posts with label screen. Show all posts

Wednesday, March 7, 2012

Need a hand...

i've been writing an app for my company that has a front end screen in which the user types in all infos needed (ie. name, address, city, state, etc - 82 fields to be exact) then clicks an "add" button, which i put at the bottom, and have that data dumped into a SQL table... the page is then redirected to another page which reads the record just added and displays all the fields that the user submitted...

here is my front end "add" screen code behind written in C#:

using System;

using System.Data;

using System.Data.SqlClient;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

publicpartialclassVinny_Credit_Application_AddCredApp : System.Web.UI.Page

{

protectedvoid Page_Load(object sender,EventArgs e)

{

}

protectedvoid SubmitButton_Click(object sender,EventArgs e)

{

string ConnectionString =ConfigurationManager.ConnectionStrings["ws2dbConnectionString2"].ConnectionString;

SqlConnection connection =newSqlConnection(ConnectionString);

SqlCommand cmd =newSqlCommand(@."INSERT INTO CreditAppFile (

GI_RB_Div,

GI_RB_ExistCust,

GI_TB_LegalFirmName,

GI_TB_Address,

GI_TB_City,

GI_DDL_State,

GI_TB_Zip,

GI_TB_TradeName,

GI_TB_BillAddress,

GI_TB_BillCity,

GI_DDL_BillState,

GI_TB_BillZip,

GI_TB_ContName,

GI_TB_Title,

GI_TB_MobilePager,

GI_TB_Email,

GI_TB_Fax,

GI_TB_BusDesc,

GI_TB_BusStartDate,

GI_TB_BusPhone,

GI_RB_PuchOrdsReq,

GI_RB_BusType,

GI_RB_LiensJudges,

GI_RB_TaxExempt,

GI_TB_FedIDNO,

GI_RB_PriorBankrupt,

GI_TB_PriorBankr,

BFR_TB_ContPhone,

BFR_TB_AcctNum1,

BFR_TB_AcctNum2,

BFR_TB_CurrBal1,

BFR_TB_CurrBal2,

BFR_TB_CurrBal3,

BFR_TB_CurrBal4,

BFR_RB_AcctType,

TR_TB_ContName1,

TR_TB_ContAddr1,

TR_TB_ContCity1,

TR_DDL_ContSt1,

TR_TB_ContZip1,

TR_TB_ContPhone1,

TR_TB_Cont_Acct1,

TR_TB_ContName2,

TR_TB_ContAddr2,

TR_TB_ContCity2,

TR_DDL_ContSt2,

TR_TB_ContZip2,

TR_TB_ContPhone2,

TR_TB_Cont_Acct2,

TR_TB_ContName3,

TR_TB_ContAddr3,

TR_TB_ContCity3,

TR_DDL_ContSt3,

TR_TB_ContZip3,

TR_TB_ContPhone3,

TR_TB_Cont_Acct3,

PI_TB_Name1,

PI_TB_HomeAddr1,

PI_TB_BDay1,

PI_TB_SSNum1,

PI_TB_HomePh1,

PI_TB_PrcntOwn1,

PI_TB_NetWorth1,

PI_TB_AnnInc1,

PI_TB_MonHouPay1,

PI_TB_Name2,

PI_TB_HomeAddr2,

PI_TB_BDay2,

PI_TB_SSNum2,

PI_TB_HomePh2,

PI_TB_PrcntOwn2,

PI_TB_NetWorth2,

PI_TB_AnnInc2,

PI_TB_MonHouPay2,

PI_TB_Name3,

PI_TB_HomeAddr3,

PI_TB_BDay3,

PI_TB_SSNum3,

PI_TB_HomePh3,

PI_TB_PrcntOwn3,

PI_TB_NetWorth3,

PI_TB_AnnInc3,

PI_TB_MonHouPay3

)

VALUES (

@.GI_RB_Div,

@.GI_RB_ExistCust,

@.GI_TB_LegalFirmName,

@.GI_TB_Address,

@.GI_TB_City,

@.GI_DDL_State,

@.GI_TB_Zip,

@.GI_TB_TradeName,

@.GI_TB_BillAddress,

@.GI_TB_BillCity,

@.GI_DDL_BillState,

@.GI_TB_BillZip,

@.GI_TB_ContName,

@.GI_TB_Title,

@.GI_TB_MobilePager,

@.GI_TB_Email,

@.GI_TB_Fax,

@.GI_TB_BusDesc,

@.GI_TB_BusStartDate,

@.GI_TB_BusPhone,

@.GI_RB_PuchOrdsReq,

@.GI_RB_BusType,

@.GI_RB_LiensJudges,

@.GI_RB_TaxExempt,

@.GI_TB_FedIDNO,

@.GI_RB_PriorBankrupt,

@.GI_TB_PriorBankr,

@.BFR_TB_ContPhone,

@.BFR_TB_AcctNum1,

@.BFR_TB_AcctNum2,

@.BFR_TB_CurrBal1,

@.BFR_TB_CurrBal2,

@.BFR_TB_CurrBal3,

@.BFR_TB_CurrBal4,

@.BFR_RB_AcctType,

@.TR_TB_ContName1,

@.TR_TB_ContAddr1,

@.TR_TB_ContCity1,

@.TR_DDL_ContSt1,

@.TR_TB_ContZip1,

@.TR_TB_ContPhone1,

@.TR_TB_Cont_Acct1,

@.TR_TB_ContName2,

@.TR_TB_ContAddr2,

@.TR_TB_ContCity2,

@.TR_DDL_ContSt2,

@.TR_TB_ContZip2,

@.TR_TB_ContPhone2,

@.TR_TB_Cont_Acct2,

@.TR_TB_ContName3,

@.TR_TB_ContAddr3,

@.TR_TB_ContCity3,

@.TR_DDL_ContSt3,

@.TR_TB_ContZip3,

@.TR_TB_ContPhone3,

@.TR_TB_Cont_Acct3,

@.PI_TB_Name1,

@.PI_TB_HomeAddr1,

@.PI_TB_BDay1,

@.PI_TB_SSNum1,

@.PI_TB_HomePh1,

@.PI_TB_PrcntOwn1,

@.PI_TB_NetWorth1,

@.PI_TB_AnnInc1,

@.PI_TB_MonHouPay1,

@.PI_TB_Name2,

@.PI_TB_HomeAddr2,

@.PI_TB_BDay2,

@.PI_TB_SSNum2,

@.PI_TB_HomePh2,

@.PI_TB_PrcntOwn2,

@.PI_TB_NetWorth2,

@.PI_TB_AnnInc2,

@.PI_TB_MonHouPay2,

@.PI_TB_Name3,

@.PI_TB_HomeAddr3,

@.PI_TB_BDay3,

@.PI_TB_SSNum3,

@.PI_TB_HomePh3,

@.PI_TB_PrcntOwn3,

@.PI_TB_NetWorth3,

@.PI_TB_AnnInc3,

@.PI_TB_MonHouPay3

); Select Scope_Identity()"

, connection);

try

{

cmd.Parameters.AddWithValue("@.GI_RB_Div", GI_RB_Div.SelectedValue);

cmd.Parameters.AddWithValue("@.GI_RB_ExistCust", GI_RB_ExistCust.SelectedValue);

cmd.Parameters.AddWithValue("@.GI_TB_LegalFirmName", GI_TB_LegalFirmName.Text);

cmd.Parameters.AddWithValue("@.GI_TB_Address", GI_TB_Address.Text);

cmd.Parameters.AddWithValue("@.GI_TB_City", GI_TB_City.Text);

cmd.Parameters.AddWithValue("@.GI_DDL_State", GI_DDL_State.SelectedValue);

cmd.Parameters.AddWithValue("@.GI_TB_Zip", GI_TB_Zip.Text);

cmd.Parameters.AddWithValue("@.GI_TB_TradeName", GI_TB_TradeName.Text);

cmd.Parameters.AddWithValue("@.GI_TB_BillAddress", GI_TB_BillAddress.Text);

cmd.Parameters.AddWithValue("@.GI_TB_BillCity", GI_TB_BillCity.Text);

cmd.Parameters.AddWithValue("@.GI_DDL_BillState", GI_DDL_BillState.SelectedValue);

cmd.Parameters.AddWithValue("@.GI_TB_BillZip", GI_TB_BillZip.Text);

cmd.Parameters.AddWithValue("@.GI_TB_ContName", GI_TB_ContName.Text);

cmd.Parameters.AddWithValue("@.GI_TB_Title", GI_TB_Title.Text);

cmd.Parameters.AddWithValue("@.GI_TB_MobilePager", GI_TB_MobilePager.Text);

cmd.Parameters.AddWithValue("@.GI_TB_Email", GI_TB_Email.Text);

cmd.Parameters.AddWithValue("@.GI_TB_Fax", GI_TB_Fax.Text);

cmd.Parameters.AddWithValue("@.GI_TB_BusDesc", GI_TB_BusDesc.Text);

cmd.Parameters.AddWithValue("@.GI_TB_BusStartDate", GI_TB_BusStartDate.Text);

cmd.Parameters.AddWithValue("@.GI_TB_BusPhone", GI_TB_BusPhone.Text);

cmd.Parameters.AddWithValue("@.GI_RB_PuchOrdsReq", GI_RB_PuchOrdsReq.SelectedValue);

cmd.Parameters.AddWithValue("@.GI_RB_BusType", GI_RB_BusType.SelectedValue);

cmd.Parameters.AddWithValue("@.GI_RB_LiensJudges", GI_RB_LiensJudges.SelectedValue);

cmd.Parameters.AddWithValue("@.GI_RB_TaxExempt", GI_RB_TaxExempt.SelectedValue);

cmd.Parameters.AddWithValue("@.GI_TB_FedIDNO", GI_TB_FedIDNO.Text);

cmd.Parameters.AddWithValue("@.GI_RB_PriorBankrupt", GI_RB_PriorBankrupt.SelectedValue);

cmd.Parameters.AddWithValue("@.GI_TB_PriorBankr", GI_TB_PriorBankr.Text);

cmd.Parameters.AddWithValue("@.BFR_TB_ContPhone", BFR_TB_ContPhone.Text);

cmd.Parameters.AddWithValue("@.BFR_TB_AcctNum1", BFR_TB_AcctNum1.Text);

cmd.Parameters.AddWithValue("@.BFR_TB_AcctNum2", BFR_TB_AcctNum2.Text);

cmd.Parameters.AddWithValue("@.BFR_TB_CurrBal1", BFR_TB_CurrBal1.Text);

cmd.Parameters.AddWithValue("@.BFR_TB_CurrBal2", BFR_TB_CurrBal2.Text);

cmd.Parameters.AddWithValue("@.BFR_TB_CurrBal3", BFR_TB_CurrBal3.Text);

cmd.Parameters.AddWithValue("@.BFR_TB_CurrBal4", BFR_TB_CurrBal4.Text);

cmd.Parameters.AddWithValue("@.BFR_RB_AcctType", BFR_RB_AcctType.Text);

cmd.Parameters.AddWithValue("@.TR_TB_ContName1", TR_TB_ContName1.Text);

cmd.Parameters.AddWithValue("@.TR_TB_ContAddr1", TR_TB_ContAddr1.Text);

cmd.Parameters.AddWithValue("@.TR_TB_ContCity1", TR_TB_ContCity1.Text);

cmd.Parameters.AddWithValue("@.TR_DDL_ContSt1", TR_DDL_ContSt1.SelectedValue);

cmd.Parameters.AddWithValue("@.TR_TB_ContZip1", TR_TB_ContZip1.Text);

cmd.Parameters.AddWithValue("@.TR_TB_ContPhone1", TR_TB_ContPhone1.Text);

cmd.Parameters.AddWithValue("@.TR_TB_Cont_Acct1", TR_TB_Cont_Acct1.Text);

cmd.Parameters.AddWithValue("@.TR_TB_ContName2", TR_TB_ContName2.Text);

cmd.Parameters.AddWithValue("@.TR_TB_ContAddr2", TR_TB_ContAddr2.Text);

cmd.Parameters.AddWithValue("@.TR_TB_ContCity2", TR_TB_ContCity2.Text);

cmd.Parameters.AddWithValue("@.TR_DDL_ContSt2", TR_DDL_ContSt2.SelectedValue);

cmd.Parameters.AddWithValue("@.TR_TB_ContZip2", TR_TB_ContZip2.Text);

cmd.Parameters.AddWithValue("@.TR_TB_ContPhone2", TR_TB_ContPhone2.Text);

cmd.Parameters.AddWithValue("@.TR_TB_Cont_Acct2", TR_TB_Cont_Acct2.Text);

cmd.Parameters.AddWithValue("@.TR_TB_ContName3", TR_TB_ContName3.Text);

cmd.Parameters.AddWithValue("@.TR_TB_ContAddr3", TR_TB_ContAddr3.Text);

cmd.Parameters.AddWithValue("@.TR_TB_ContCity3", TR_TB_ContCity3.Text);

cmd.Parameters.AddWithValue("@.TR_DDL_ContSt3", TR_DDL_ContSt3.SelectedValue);

cmd.Parameters.AddWithValue("@.TR_TB_ContZip3", TR_TB_ContZip3.Text);

cmd.Parameters.AddWithValue("@.TR_TB_ContPhone3", TR_TB_ContPhone3.Text);

cmd.Parameters.AddWithValue("@.TR_TB_Cont_Acct3", TR_TB_Cont_Acct3.Text);

cmd.Parameters.AddWithValue("@.PI_TB_Name1", PI_TB_Name1.Text);

cmd.Parameters.AddWithValue("@.PI_TB_HomeAddr1", PI_TB_HomeAddr1.Text);

cmd.Parameters.AddWithValue("@.PI_TB_BDay1", PI_TB_BDay1.Text);

cmd.Parameters.AddWithValue("@.PI_TB_SSNum1", PI_TB_SSNum1.Text);

cmd.Parameters.AddWithValue("@.PI_TB_HomePh1", PI_TB_HomePh1.Text);

cmd.Parameters.AddWithValue("@.PI_TB_PrcntOwn1", PI_TB_PrcntOwn1.Text);

cmd.Parameters.AddWithValue("@.PI_TB_NetWorth1", PI_TB_NetWorth1.Text);

cmd.Parameters.AddWithValue("@.PI_TB_AnnInc1", PI_TB_AnnInc1.Text);

cmd.Parameters.AddWithValue("@.PI_TB_MonHouPay1", PI_TB_MonHouPay1.Text);

cmd.Parameters.AddWithValue("@.PI_TB_Name2", PI_TB_Name2.Text);

cmd.Parameters.AddWithValue("@.PI_TB_HomeAddr2", PI_TB_HomeAddr2.Text);

cmd.Parameters.AddWithValue("@.PI_TB_BDay2", PI_TB_BDay2.Text);

cmd.Parameters.AddWithValue("@.PI_TB_SSNum2", PI_TB_SSNum2.Text);

cmd.Parameters.AddWithValue("@.PI_TB_HomePh2", PI_TB_HomePh2.Text);

cmd.Parameters.AddWithValue("@.PI_TB_PrcntOwn2", PI_TB_PrcntOwn2.Text);

cmd.Parameters.AddWithValue("@.PI_TB_NetWorth2", PI_TB_NetWorth2.Text);

cmd.Parameters.AddWithValue("@.PI_TB_AnnInc2", PI_TB_AnnInc2.Text);

cmd.Parameters.AddWithValue("@.PI_TB_MonHouPay2", PI_TB_MonHouPay2.Text);

cmd.Parameters.AddWithValue("@.PI_TB_Name3", PI_TB_Name3.Text);

cmd.Parameters.AddWithValue("@.PI_TB_HomeAddr3", PI_TB_HomeAddr3.Text);

cmd.Parameters.AddWithValue("@.PI_TB_BDay3", PI_TB_BDay3.Text);

cmd.Parameters.AddWithValue("@.PI_TB_SSNum3", PI_TB_SSNum3.Text);

cmd.Parameters.AddWithValue("@.PI_TB_HomePh3", PI_TB_HomePh3.Text);

cmd.Parameters.AddWithValue("@.PI_TB_PrcntOwn3", PI_TB_PrcntOwn3.Text);

cmd.Parameters.AddWithValue("@.PI_TB_NetWorth3", PI_TB_NetWorth3.Text);

cmd.Parameters.AddWithValue("@.PI_TB_AnnInc3", PI_TB_AnnInc3.Text);

cmd.Parameters.AddWithValue("@.PI_TB_MonHouPay3", PI_TB_MonHouPay3.Text);

cmd.Connection = connection;

cmd.Connection.Open();

string NewID = cmd.ExecuteScalar().ToString();

cmd.Connection.Close();

Response.Redirect("DisplayCredApp.aspx?ID=" + Request["NewID"]);

}

catch (Exception ex)

{

lblMessage.Text ="ERROR: " + ex.Message;lblMessage.Visible =true;

}

}

}

this seems to be ok... but i get a load of errors on my "read/display" page which looks like the folowing... (this is the code behind, again, written in C#)

using System;

using System.Data;

using System.Data.SqlClient;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

publicpartialclassVinny_Credit_Application_DisplayCredApp : System.Web.UI.Page

{

protectedvoid Page_Load(object sender,EventArgs e)

{

if (!IsPostBack && Response["NewID"] !=null)

{

string ConnectionString =ConfigurationManager.ConnectionStrings["ws2dbConnectionString"].ConnectionString;

SqlConnection connection =newSqlConnection(ConnectionString);

SqlCommand cmd =newSqlCommand(@."SELECT * FROM CreditAppFile WHERE ID = @.ID", connection);cmd.Parameters.Add("@.ID", Response["NewID"].ToString());

connection.Open();

SqlDataReader reader = cmd.ExecuteReader();

reader.Read();

GI_RB_Div.Text = reader["GI_RB_Div"].ToString();

GI_RB_ExistCust.Text = reader["GI_RB_ExistCust"].ToString();

GI_TB_LegalFirmName.Text = reader["GI_TB_LegalFirmName"].ToString();

GI_TB_Address.Text = reader["GI_TB_Address"].ToString();

GI_TB_City.Text = reader["GI_TB_City"].ToString();

GI_DDL_State.Text = reader["GI_DDL_State"].ToString();

GI_TB_Zip.Text = reader["GI_TB_Zip"].ToString();

GI_TB_TradeName.Text = reader["GI_TB_TradeName"].ToString();

GI_TB_BillAddress.Text = reader["GI_TB_BillAddress"].ToString();

GI_TB_BillCity.Text = reader["GI_TB_BillCity"].ToString();

GI_DDL_BillState.Text = reader["GI_DDL_BillState"].ToString();

GI_TB_BillZip.Text = reader["GI_TB_BillZip"].ToString();

GI_TB_ContName.Text = reader["GI_TB_ContName"].ToString();

GI_TB_Title.Text = reader["GI_TB_Title"].ToString();

GI_TB_MobilePager.Text = reader["GI_TB_MobilePager"].ToString();

GI_TB_Email.Text = reader["GI_TB_Email"].ToString();

GI_TB_Fax.Text = reader["GI_TB_Fax"].ToString();

GI_TB_BusDesc.Text = reader["GI_TB_BusDesc"].ToString();

GI_TB_BusStartDate.Text = reader["GI_TB_BusStartDate"].ToString();

GI_TB_BusPhone.Text = reader["GI_TB_BusPhone"].ToString();

GI_RB_PuchOrdsReq.Text = reader["GI_RB_PuchOrdsReq"].ToString();

GI_RB_BusType.Text = reader["GI_RB_BusType"].ToString();

GI_RB_LiensJudges.Text = reader["GI_RB_LiensJudges"].ToString();

GI_RB_TaxExempt.Text = reader["GI_RB_TaxExempt"].ToString();

GI_TB_FedIDNO.Text = reader["GI_TB_FedIDNO"].ToString();

GI_RB_PriorBankrupt.Text = reader["GI_RB_PriorBankrupt"].ToString();

GI_TB_PriorBankr.Text = reader["GI_TB_PriorBankr"].ToString();

BFR_TB_ContPhone.Text = reader["BFR_TB_ContPhone"].ToString();

BFR_TB_AcctNum1.Text = reader["BFR_TB_AcctNum1"].ToString();

BFR_TB_AcctNum2.Text = reader["BFR_TB_AcctNum2"].ToString();

BFR_TB_CurrBal1.Text = reader["BFR_TB_CurrBal1"].ToString();

BFR_TB_CurrBal2.Text = reader["BFR_TB_CurrBal2"].ToString();

BFR_TB_CurrBal3.Text = reader["BFR_TB_CurrBal3"].ToString();

BFR_TB_CurrBal4.Text = reader["BFR_TB_CurrBal4"].ToString();

BFR_RB_AcctType.Text = reader["BFR_RB_AcctType"].ToString();

TR_TB_ContName1.Text = reader["TR_TB_ContName1"].ToString();

TR_TB_ContAddr1.Text = reader["TR_TB_ContAddr1"].ToString();

TR_TB_ContCity1.Text = reader["TR_TB_ContCity1"].ToString();

TR_DDL_ContSt1.Text = reader["TR_DDL_ContSt1"].ToString();

TR_TB_ContZip1.Text = reader["TR_TB_ContZip1"].ToString();

TR_TB_ContPhone1.Text = reader["TR_TB_ContPhone1"].ToString();

TR_TB_Cont_Acct1.Text = reader["TR_TB_Cont_Acct1"].ToString();

TR_TB_ContName2.Text = reader["TR_TB_ContName2"].ToString();

TR_TB_ContAddr2.Text = reader["TR_TB_ContAddr2"].ToString();

TR_TB_ContCity2.Text = reader["TR_TB_ContCity2"].ToString();

TR_DDL_ContSt2.Text = reader["TR_DDL_ContSt2"].ToString();

TR_TB_ContZip2.Text = reader["TR_TB_ContZip2"].ToString();

TR_TB_ContPhone2.Text = reader["TR_TB_ContPhone2"].ToString();

TR_TB_Cont_Acct2.Text = reader["TR_TB_Cont_Acct2"].ToString();

TR_TB_ContName3.Text = reader["TR_TB_ContName3"].ToString();

TR_TB_ContAddr3.Text = reader["TR_TB_ContAddr3"].ToString();

TR_TB_ContCity3.Text = reader["TR_TB_ContCity3"].ToString();

TR_DDL_ContSt3.Text = reader["TR_DDL_ContSt3"].ToString();

TR_TB_ContZip3.Text = reader["TR_TB_ContZip3"].ToString();

TR_TB_ContPhone3.Text = reader["TR_TB_ContPhone3"].ToString();

TR_TB_Cont_Acct3.Text = reader["TR_TB_Cont_Acct3"].ToString();

PI_TB_Name1.Text = reader["PI_TB_Name1"].ToString();

PI_TB_HomeAddr1.Text = reader["PI_TB_HomeAddr1"].ToString();

PI_TB_BDay1.Text = reader["PI_TB_BDay1"].ToString();

PI_TB_SSNum1.Text = reader["PI_TB_SSNum1"].ToString();

PI_TB_HomePh1.Text = reader["PI_TB_HomePh1"].ToString();

PI_TB_PrcntOwn1.Text = reader["PI_TB_PrcntOwn1"].ToString();

PI_TB_NetWorth1.Text = reader["PI_TB_NetWorth1"].ToString();

PI_TB_AnnInc1.Text = reader["PI_TB_AnnInc1"].ToString();

PI_TB_MonHouPay1.Text = reader["PI_TB_MonHouPay1"].ToString();

PI_TB_Name2.Text = reader["PI_TB_Name2"].ToString();

PI_TB_HomeAddr2.Text = reader["PI_TB_HomeAddr2"].ToString();

PI_TB_BDay2.Text = reader["PI_TB_BDay2"].ToString();

PI_TB_SSNum2.Text = reader["PI_TB_SSNum2"].ToString();

PI_TB_HomePh2.Text = reader["PI_TB_HomePh2"].ToString();

PI_TB_PrcntOwn2.Text = reader["PI_TB_PrcntOwn2"].ToString();

PI_TB_NetWorth2.Text = reader["PI_TB_NetWorth2"].ToString();

PI_TB_AnnInc2.Text = reader["PI_TB_AnnInc2"].ToString();

PI_TB_Name2.Text = reader["PI_TB_MonHouPay2"].ToString();

PI_TB_Name3.Text = reader["PI_TB_Name3"].ToString();

PI_TB_HomeAddr3.Text = reader["PI_TB_HomeAddr3"].ToString();

PI_TB_BDay3.Text = reader["PI_TB_BDay3"].ToString();

PI_TB_SSNum3.Text = reader["PI_TB_SSNum3"].ToString();

PI_TB_HomePh3.Text = reader["PI_TB_HomePh3"].ToString();

PI_TB_PrcntOwn3.Text = reader["PI_TB_PrcntOwn3"].ToString();

PI_TB_NetWorth3.Text = reader["PI_TB_NetWorth3"].ToString();

PI_TB_AnnInc3.Text = reader["PI_TB_AnnInc3"].ToString();PI_TB_MonHouPay3.Text = reader["PI_TB_MonHouPay3"].ToString();

connection.Close();

}

}

}

been working on this for days... everytime i get a little closer i seem to get that much farther away... if you can help by all means give me what you got...

thanks for all the help in advance!!!!

- Vinny

Hi Vinny,

Thats alot of columns in that table. Anyway what is the error message you are getting. It would help to know where it stops.

|||

VinnyPip:

string NewID = cmd.ExecuteScalar().ToString();

cmd.Connection.Close();

Response.Redirect("DisplayCredApp.aspx?ID=" + Request["NewID"]);

.

.

.

SqlCommand cmd =newSqlCommand(@."SELECT * FROM CreditAppFile WHERE ID = @.ID", connection);cmd.Parameters.Add("@.ID", Response["NewID"].ToString());

Change

Response.Redirect("DisplayCredApp.aspx?ID=" + Request["NewID"]);

to

Response.Redirect("DisplayCredApp.aspx?ID=" +NewID);

Change

SqlCommand cmd =newSqlCommand(@."SELECT * FROM CreditAppFile WHERE ID = @.ID", connection);cmd.Parameters.Add("@.ID", Response["NewID"].ToString());

to

SqlCommand cmd =newSqlCommand(@."SELECT * FROM CreditAppFile WHERE ID = @.ID", connection);cmd.Parameters.Add("@.ID", Request.QueryString["NewID"]);

|||

made the above changes Mike suggested and the main error is still the same...

Description:An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message:CS0021: Cannot apply indexing with [] to an expression of type 'System.Web.HttpResponse'

Source Error:

Line 15: protected void Page_Load(object sender, EventArgs e)Line 16: {Line 17: if (!IsPostBack && Response["NewID"] != null)Line 18: {Line 19: string ConnectionString = ConfigurationManager.ConnectionStrings["ws2dbConnectionString"].ConnectionString;

|||

Damn. Missed that one. Change it to

if (!IsPostBack && Request.QueryString["ID"] != null)

And - where I changed something to Request,QueryString["NewID"] before (in the parameters), change that to

Request.QueryString["ID"]
|||

that seemed to compile ok...

and for my next trick... uhh... i mean error:

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.InvalidOperationException: Invalid attempt to read when no data is present.

Source Error:

Line 29: reader.Read();Line 30:Line 31: GI_RB_Div.Text = reader["GI_RB_Div"].ToString();Line 32: GI_RB_ExistCust.Text = reader["GI_RB_ExistCust"].ToString();Line 33: GI_TB_LegalFirmName.Text = reader["GI_TB_LegalFirmName"].ToString();


keep em comin' mike... really appreciate this!!!

|||

NEVERMIND MIKE!!!!!!!!

IT WORKS!!!!!!

next time you're in NYC the drinks are on me... thanks a ton!!!

|||That suggests there is no data. Check the value of ID in the querystring of the page to make sure it was passed correctly (no spaces or odd urlencoded chars), then try running the query in SSMS to see that it works.

Need a good start on matrix type report, please

I've got the following data I need to report in this format:
Stage P Screen RE-Screen GrdTotal
user1 1 2
3
user2 2 1
6
user3 1 2 1
4
From a sproc the data looks like:
User Type
user1 Stage
user1 RE-Screen
user1 RE-Screen
user2 P-Screen
user2 P-Screen
User2 RE-Screen
I created a report with a subreport for each type count but I haven't been
able to
figure out a way to total up the output from the Sub-Reports. In Crystal I
think I remember passing a gloval value between the report and sub. From
reading on this forum it sounds like there is no way to do this. If you know
how please let me know, then I would have it.
The other ideas is mabe I should have a different SQL and do the
accumulating before I enter the report or I'm gettign ready to write the
report with a grouping on each type. The report has 6 types however.
I haven't worked with Matrix's much and that data regions seems to fit this
need, but...what do you all think?
THANKS!!!
Robert HansenA matrix would exactly do what you want.
The User field would become a matrix row grouping (just drop the field on
row group section of the matrix). The Type field would be a matrix column
grouping with a subtotal (after dropping the field into the column group
section, right click and select "Subtotal"). For the matrix cell you would
use an expression like =Count(Fields!User.Value).
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Bob Hansen" <BobHansen@.discussions.microsoft.com> wrote in message
news:396F1769-F8F5-4AFD-A659-3A84F97BA142@.microsoft.com...
> I've got the following data I need to report in this format:
> Stage P Screen RE-Screen GrdTotal
> user1 1 2
> 3
> user2 2 1
> 6
> user3 1 2 1
> 4
> From a sproc the data looks like:
> User Type
> user1 Stage
> user1 RE-Screen
> user1 RE-Screen
> user2 P-Screen
> user2 P-Screen
> User2 RE-Screen
> I created a report with a subreport for each type count but I haven't been
> able to
> figure out a way to total up the output from the Sub-Reports. In Crystal
> I
> think I remember passing a gloval value between the report and sub. From
> reading on this forum it sounds like there is no way to do this. If you
> know
> how please let me know, then I would have it.
> The other ideas is mabe I should have a different SQL and do the
> accumulating before I enter the report or I'm gettign ready to write the
> report with a grouping on each type. The report has 6 types however.
> I haven't worked with Matrix's much and that data regions seems to fit
> this
> need, but...what do you all think?
> THANKS!!!
> Robert Hansen|||Thanks!!! Robert
The one thing about a matrix that is throwing me for a loop, is that I need
to display all my Users even if thay have NO activity records (That is
within a data
range) I need their name to show up with blanks counts and 0 GrdTot.
I can do this so nicely with subreports and a real simple table of all users
to drive the report to make all user names show on each row.
I haven't been able to write an SQL to get the data in that form, where I've
got all Users with a row in my dataset. Is there any custom programming
way to get the totals from the subreports? I'm going to try to create a
more complex SQL to get the data I need for thre port so it can include ALL
USERS.
Thanks again for your help!!!
--
Robert Hansen
"Robert Bruckner [MSFT]" wrote:
> A matrix would exactly do what you want.
> The User field would become a matrix row grouping (just drop the field on
> row group section of the matrix). The Type field would be a matrix column
> grouping with a subtotal (after dropping the field into the column group
> section, right click and select "Subtotal"). For the matrix cell you would
> use an expression like =Count(Fields!User.Value).
>
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Bob Hansen" <BobHansen@.discussions.microsoft.com> wrote in message
> news:396F1769-F8F5-4AFD-A659-3A84F97BA142@.microsoft.com...
> > I've got the following data I need to report in this format:
> >
> > Stage P Screen RE-Screen GrdTotal
> > user1 1 2
> > 3
> > user2 2 1
> > 6
> > user3 1 2 1
> > 4
> >
> > From a sproc the data looks like:
> > User Type
> > user1 Stage
> > user1 RE-Screen
> > user1 RE-Screen
> > user2 P-Screen
> > user2 P-Screen
> > User2 RE-Screen
> >
> > I created a report with a subreport for each type count but I haven't been
> > able to
> > figure out a way to total up the output from the Sub-Reports. In Crystal
> > I
> > think I remember passing a gloval value between the report and sub. From
> > reading on this forum it sounds like there is no way to do this. If you
> > know
> > how please let me know, then I would have it.
> >
> > The other ideas is mabe I should have a different SQL and do the
> > accumulating before I enter the report or I'm gettign ready to write the
> > report with a grouping on each type. The report has 6 types however.
> >
> > I haven't worked with Matrix's much and that data regions seems to fit
> > this
> > need, but...what do you all think?
> >
> > THANKS!!!
> > Robert Hansen
>
>|||If you want all users to show up, you need to use an OUTER JOIN in your SQL
query to get them into the resulting data set. Depending on the data source,
the actual SQL syntax for outer joins will vary.
You will also need to modify the expression in the matrix cell to take into
account those users without activity, but showing up in the data set.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Bob Hansen" <BobHansen@.discussions.microsoft.com> wrote in message
news:7735073D-1D95-4D72-B66A-AE56F696E2EE@.microsoft.com...
> Thanks!!! Robert
> The one thing about a matrix that is throwing me for a loop, is that I
> need
> to display all my Users even if thay have NO activity records (That is
> within a data
> range) I need their name to show up with blanks counts and 0 GrdTot.
> I can do this so nicely with subreports and a real simple table of all
> users
> to drive the report to make all user names show on each row.
> I haven't been able to write an SQL to get the data in that form, where
> I've
> got all Users with a row in my dataset. Is there any custom programming
> way to get the totals from the subreports? I'm going to try to create a
> more complex SQL to get the data I need for thre port so it can include
> ALL
> USERS.
> Thanks again for your help!!!
> --
> Robert Hansen
>
> "Robert Bruckner [MSFT]" wrote:
>> A matrix would exactly do what you want.
>> The User field would become a matrix row grouping (just drop the field on
>> row group section of the matrix). The Type field would be a matrix column
>> grouping with a subtotal (after dropping the field into the column group
>> section, right click and select "Subtotal"). For the matrix cell you
>> would
>> use an expression like =Count(Fields!User.Value).
>>
>> -- Robert
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "Bob Hansen" <BobHansen@.discussions.microsoft.com> wrote in message
>> news:396F1769-F8F5-4AFD-A659-3A84F97BA142@.microsoft.com...
>> > I've got the following data I need to report in this format:
>> >
>> > Stage P Screen RE-Screen GrdTotal
>> > user1 1 2
>> > 3
>> > user2 2 1
>> > 6
>> > user3 1 2 1
>> > 4
>> >
>> > From a sproc the data looks like:
>> > User Type
>> > user1 Stage
>> > user1 RE-Screen
>> > user1 RE-Screen
>> > user2 P-Screen
>> > user2 P-Screen
>> > User2 RE-Screen
>> >
>> > I created a report with a subreport for each type count but I haven't
>> > been
>> > able to
>> > figure out a way to total up the output from the Sub-Reports. In
>> > Crystal
>> > I
>> > think I remember passing a gloval value between the report and sub.
>> > From
>> > reading on this forum it sounds like there is no way to do this. If
>> > you
>> > know
>> > how please let me know, then I would have it.
>> >
>> > The other ideas is mabe I should have a different SQL and do the
>> > accumulating before I enter the report or I'm gettign ready to write
>> > the
>> > report with a grouping on each type. The report has 6 types however.
>> >
>> > I haven't worked with Matrix's much and that data regions seems to fit
>> > this
>> > need, but...what do you all think?
>> >
>> > THANKS!!!
>> > Robert Hansen
>>