Need Hand Holding

Oct 7, 2007

Hi -
Is there a resource I can go to that lists people who I pay to talk me through stuff like getting SQL Server Express installed, get some sample data input and then get that data into Excel? I just cannot seem to get any help that works for me to learn SQL Server; the books are obtuse, the online help too indirect. Once I get something working I hope to enhance it on my own, but I have been stuck at the start for a very long time. There is stuff for me to do that is not getting done.

Doug

View 1 Replies


ADVERTISEMENT

Variables Holding Filename

Feb 8, 2007

I already posted this question in the Wrong Forum.

However I was wondering if it is possible to create a variable that holds the filename as an expression. I am using a For each loop to pick up files and i want to insert the 'Filename' as a colum so that i can differentiate among the rows in my destination Table.

Using the 'Derived Colum' in DTS I can link the colum to the variable. However i do not know how to create the variable which will store the filename for each file....

Any Clues...
Would really appreciate the help.....

View 2 Replies View Related

SQL Configuration Holding Connections To DS

May 27, 2006

Hello All,

I have about 160 packages in my system, all using about 20 shared datasources.
When changing one of the datasource's connection (changing the server name), I need to open every one of my packages and press OK to allow the remapping to the new server. (this is something I don't understand: wasn't this the meaning of using a share datasource in the first place? what's the advantages in that case?)

So, I have heard about Package configuration, and how it supposed to support all of this, But I don't understand something: The configuration is set to a certain package. If I have 2 packages, using the same two (of four) Datasources. Using the configuration wizard from one of the packages, I mark the connection string from the datasource. I need to do the same in the other package? will the configuration table hold only one value for that connection? If I change the value of the connection string will it affect all the packages using that datasource or only the ones using configuration?

Thanks,



Liran

View 10 Replies View Related

Need A Hand...

May 30, 2007

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;
public partial class Vinny_Credit_Application_AddCredApp : System.Web.UI.Page
{protected void Page_Load(object sender, EventArgs e)
{
}protected void SubmitButton_Click(object sender, EventArgs e)
{string ConnectionString = ConfigurationManager.ConnectionStrings["ws2dbConnectionString2"].ConnectionString;
SqlConnection connection = new SqlConnection(ConnectionString);SqlCommand cmd = new SqlCommand(@"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;
public partial class Vinny_Credit_Application_DisplayCredApp : System.Web.UI.Page
{protected void Page_Load(object sender, EventArgs e)
{if (!IsPostBack && Response["NewID"] != null)
{string ConnectionString = ConfigurationManager.ConnectionStrings["ws2dbConnectionString"].ConnectionString;
SqlConnection connection = new SqlConnection(ConnectionString);SqlCommand cmd = new SqlCommand(@"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

View 7 Replies View Related

Variable Not Holding Value For Select Statement

Dec 7, 2005

this querry below works perfect when i assign the us.UserID = 29 but i need to be able to use the @UsersMaxID variable..... when i debug all of my values are right where they need to be... even this on (((   @UsersMaxID  ))) but for some reason it will not work with the next select statement...
 
can someone make the pain go away and help me here..??
 
erik..
 
GOSET ANSI_NULLS ON GO
ALTER  PROCEDURE AA
ASDECLARE @GenericColumn Varchar (200) DECLARE @GenericValue Varchar (200)
SET @GenericColumn = 'FirstName'SET @GenericValue = 'Erik'
 DECLARE @SQL NVARCHAR(4000)  DECLARE @UserID INT  DECLARE @UsersMaxID INT  DECLARE @MaxID INT
declare @tempResult varchar (1000)
-------------------------------------------Define the #Temporary Table----------------------------------------------CREATE TABLE #UsersTempTable ( ID int IDENTITY PRIMARY KEY,
UserID [int], FirstName [varchar](30), LastName [varchar](30), CompanyName [varchar](200), Address1 [varchar](75), Address2 [varchar](75), City [varchar](75),ActiveInd [int], Zip [varchar](10), WkPhone [varchar](12),HmPhone [varchar](12), Fax [varchar](12), Email [varchar](200), Website [varchar](200), UserType [varchar](20),Title [varchar](100),Note [text], StateCD [char](2), CountryCD [char](2), CompanyPhoto [varchar](50), CompanyDescr [varchar](2000)) ---------------------------------------Fill the temp table with the Customers data-----------------------------------SET @SQL = 'INSERT INTO #UsersTempTable (UserID, FirstName, LastName, CompanyName, Address1, Address2, City, ActiveInd, Zip, WkPhone, HmPhone,Fax, Email, Website, UserType, Title, Note, StateCD, CountryCD, CompanyPhoto, CompanyDescr)
Select Users.UserID, Users.FirstName,Users.LastName, Users.CompanyName, Users.Address1, Users.Address2, Users.City, Users.ActiveInd, Users.Zip, Users.WkPhone, Users.HmPhone,Users.Fax,Users.Email,Users.Website, Users.UserType,Users.Title, Users.Note,Users.StateCD, Users.CountryCD,Users.CompanyPhoto,Users.CompanyDescr
FROM USERS
 WHERE ' + @GenericColumn +' = ''' + @GenericValue  + ''''
EXEC sp_executesql @SQL
SET @MaxID = (SELECT MAX(ID) FROM #UsersTempTable)SET @UsersMaxID = (SELECT UserID From #UsersTempTable WHERE ID = @MaxID)
SELECT SpecialtyName FROM Specialty s                           INNER JOIN UserSpecialty us                           ON s.SpecialtyCD = us.SpecialtyCD                           WHERE us.UserID = 29
SELECT * FROM #UsersTempTable
 
 ==========================================================================================SET @UsersMaxID = (SELECT UserID From #UsersTempTable WHERE ID = @MaxID)
SELECT SpecialtyName FROM Specialty s                           INNER JOIN UserSpecialty us                           ON s.SpecialtyCD = us.SpecialtyCD                           WHERE us.UserID = 29 <<<<<<<<<<<<<<<<< i need @UserMaxID ........RIGHT HERE

View 1 Replies View Related

T-SQL (SS2K8) :: Changes Not Holding In Stored Procedure

Apr 8, 2014

I am connecting to a new SQL Server 2008 R2 database using SSMS from my ADMIN VM workstation. I bring up a Stored Procedure and make a change.... I execute the Stored Procedure... after it finishes.... I exit out without saving to a file.... I go back in and my change was not held.

I can do the exact same process with an old SQL Server 2005 database. Is there a permission I am missing to set to be able to do this on the 2008 database.

View 9 Replies View Related

Return Name Of Column Holding Highest Value

Apr 25, 2008

I have this query that returns the largest value in a row, but i need to know the column name that this value is in as well. any help in advance is appreciated

select clientID,
(select max(incomeValue)
from
(select earnings as incomeValue
union all
select unemployment
union all
select pensionRetirement
union all
select alimony
union all
select childSupport
union all
select dividendInterest
union all
select SS
union all
select SSI
union all
select SSDI
union all
select veteranBenefits
union all
select FIP
union all
select workStudy
union all
select other
union all
select otherHHWS) as income) as MaxIncomeValue
from tbl_income

View 12 Replies View Related

Who Is Holding A Database Backup-file?

Jun 23, 2007

I don't know where to post this kind of stuff so here goes...



I have maintenance plans which sometimes fail because the delete step reports that the old backup file is "in use." I have no idea how to determine what Windows thinks is holding the file. HOw do you determine who is holding a file hostage??



Thanks.

View 3 Replies View Related

Hey.. Two Issues At Hand.

May 15, 2008

Hello !

I came across some interesting issues that solving them will definately help me a lot !

1) Is there a way to insert my database a row, and that it will automatically fill up the datetime column with the local machine time ? (so that I won't have to worry about users local time)

2) I'm trying to synchronize between two data sources - one is my DB and the other is a file. The data in the file should represent the data to be in the DB. However, I don't want to delete all the records and then just insert everything in the file, but to perform Insert, Update or Delete operations according to the file's changes. I managed to do the Insert and Update, but I can't find a solution to a scenario where old data, which is on the DB but not on the file, could be deleted from the DB.

I appreciate the help A LOT !

View 3 Replies View Related

Hand Needed With T-sql

Jul 20, 2005

Is it possible to write these two blocks of code as one? The onlydifference between them is the AND clause: AND is_trade_date = 1 versus ANDis_sett_date = 1.Cheers,DavidIF (@trade_dates = 1)BEGINIF EXISTS (SELECT 1 FROM calendarWHERE calendar_date = @dateAND is_trade_date = 1)BEGINSELECT @day_cnt = @day_cnt + 1ENDENDELSEBEGINIF EXISTS (SELECT 1 FROM calendarWHERE calendar_date = @dateAND is_sett_date = 1)BEGINSELECT @day_cnt = @day_cnt + 1ENDENDEND

View 3 Replies View Related

Process Being Freed While Holding Dataserver Semaphore

Feb 25, 1999

Warning: Process Being Freed While Holding Dataserver Semaphore

I understand that this is a bug. And that it is supposed to be fixed in
service pack 4.
However, has anyone experienced or figured out how to get rid of this message?

Thanks for your help.

View 1 Replies View Related

Script: Get Inputbuffer For Spid's Holding Locks

Jul 20, 2002

Here's a quick script that will return the inputbuffer of processes that are holding more than a certain threshold of locks (by default, 10, but it's easy to modify). Handy for tracking down what query is holding those 1400 locks.

Yes, it uses a cursor. I'd welcome amendment by anyone who has the insight on converting it to pure set-based.

Cheers
-b

CREATE PROCEDURE sp_lock4 AS
set nocount on

DECLARE @tSpids table(spid int PRIMARY KEY CLUSTERED,count int)
DECLARE @iSpid int,@iCount int

insert into @tSpids (spid,count)
select convert (smallint, req_spid) As spid,
count(*) as count

from master.dbo.syslockinfo,
master.dbo.spt_values v,
master.dbo.spt_values x,
master.dbo.spt_values u

where master.dbo.syslockinfo.rsc_type = v.number
and v.type = 'LR'
and master.dbo.syslockinfo.req_status = x.number
and x.type = 'LS'
and master.dbo.syslockinfo.req_mode + 1 = u.number
and u.type = 'L'
group by converT(smallint,req_spid),'dbcc inputbuffer(' + cast(req_spid as varchar(4)) + ')'
having count(*)>10
order by count(*) desc

DECLARE cLoop cursor for
select spid,count from @tSpids

OPEN cLoop

FETCH NEXT FROM cLoop INTO @iSpid,@iCount
WHILE @@FETCH_STATUS=0
BEGIN
select 'spid ' + cast(@iSpid as varchar(4)) + ' has ' + cast(@iCount as varchar(5)) + ' locks.'
exec ("dbcc inputbuffer (" + @ispid + ")")
FETCH NEXT FROM cLoop INTO @iSpid,@iCount
END

CLOSE cLoop
DEALLOCATE cLoop

return (0) -- sp_lock
GO

View 1 Replies View Related

Lend A Hand With A Query

Aug 23, 2007

I have a question about a query.I have 2 tables:As an example I have the following tables (not my real tables)1) lstParts: Complete list of parts with 2 fields:  partID, partName.2) tblOrders: table of orders with 2 fields:  partID, custIDObviously the partID’s are keys to each other.
What I want is a list of all the records in lstParts that are not in tblOrders for an individual customer.  So it might answer, “what parts has this customer NOT ordered?â€?
What I have so far is close but it is repeating the correct result for each row in tblOrders. 
Here is what I have so far
 SELECT
p.partID,
p.partName
FROM
lstParts p
LEFT OUTER JOIN tblOrders o
ON p.partID <> o.partID
WHERE
o.custID = ‘123’ 
Any help would be appreciated-Thanks

View 2 Replies View Related

Right Hand Side Of Report Is Cut Off

Mar 28, 2006

I have a table control on a report that is when it is displayed it shows the right side of the report being cut off. If I go to the next page the report displays properly. When I go back to the first page it then displays properly.

How can I get it to display properly the first time it is viewed?

View 2 Replies View Related

Right-hand Side Of Report Being Cut Off

Jan 18, 2006

 
Folks,
 
On matrix reports, when viewed with IE through the ReportServer URL access page, Matrix reports are getting cut off on the right-hand side to the original size of the report.  However, this corrects itself immediately if you toggle any item, or change the zoom level.
 
What's really confusing is that most of our reports that have expanding functionality work just fine -- there's just a couple that don't.  We have spent a couple days trying to figure out what's different with no luck.
 
EDITED: navigating away from the page by typing another URL in the address bar, and then hitting back, corrects this.  The problem is also not present with &rc:Toolbar=false, but with the toolbar on, it's there.
 
Any ideas?
 
Thanks so much!
--randy
 

View 1 Replies View Related

Database Design Question - Holding Additional Data

Oct 1, 2007

I've done some basic database design in the past, but am a relative newbie to design. I have recently come across a situation I'm not sure how to handle. Here's the situation...

Assume we've got a contacts table which holds information about our contacts. All contacts have the same basic information - name, address, telephone, etc. Each contact is of a certain type - let's just say a, b, and c, for ease. This contact type is stored in the contacts table. Now, on contacts of type b, I also have to store some additional data. What it is doesn't really matter. I found a way to set this up, but I'm not sure that I'm going about it the right way, and would love some advice on the proper way to do this. Basically, what I did is create my contacts table:
Contact_id, contactName, ContactAddress, ContactPhone, ContactType.
Created a contacttype table
ContactType, ContactTypeDescription, ContactAddInfo

What I've done is left contactaddInfo as a nullable field. When it has a value, that value is the name of a table which holds the additional information that I need for the contact... So when I'm running a query, I can tell if I need to reference another table by checking the value of ContactAddInfo.

I can't imagine that this is the best solution, but it was the first thing that popped into my head, and it's a really small database that's using it. However, I'm now being faced with the same situation in a much more important, larger database, and I'd love to know the 'right' way.

Thanks for any guidance you can provide!
Erin

View 4 Replies View Related

HAND SYMBOL ON DATABASE BARREL

Oct 27, 1999

We are running SQL Version 7.0.
I recently set up a simple snapshot replication. After restarting enterprise manager a hand symbol showed up under the database barrel as if a share symbol.
Am I correct in assuming the symbol means replication. Is there a source that explains what the various symbols mean?

View 1 Replies View Related

Prelogin Shake Hand Error

Jan 16, 2008

Dear All,
i'm getting this error while trying to connect to any of the servers.
on that perticular system, sqlserver2000, 2005 client tools are there.

the error is :
a connection was established successfully to the server but an error was occured prelogin handshake. how can i overcome this?


thank you very much

Vinod
Even you learn 1%, Learn it with 100% confidence.

View 1 Replies View Related

Newbie Needs A Hand With SQL2005 Reports

May 24, 2007

I'm trying to run some reports on SQL 2005, but can't even pass the first step of launching the report builder. I have SQL2005 on my local machine, but the report server is installed on a remote server. I launched SQL Business Intelligence Development Studio, which brings Visual studio, but i keep getting a prompt to enter a connection string. How do i get the connection string, or how do i set up my datasource?



Help!

View 1 Replies View Related

Need A Quick Hand Using ORDER BY With Two Fields In The Same Table.

Aug 6, 2004

I have a problem with ordering and I am hoping that someone is able to help.

In my table I have two fields, "requestdate" and "sentdate", and when I display the records I would like to sort by BOTH fields. I want to do this so that the full query is in order by date.

I tried:

ORDER BY requestdate, sentdate DESC

But obviously all that does is order by requestdate (which is NULL or a date) and than it will order by sentdate.

Can somebody tell me how to order by both as if they were the same field?

Thanks!

View 2 Replies View Related

SQL Server 2008 :: Rows Holding Group-wise Maximum Of Certain Column?

May 13, 2015

is there any more efficient way for example to implement the next query?

SELECT s1.article, dealer, s1.price
FROM shop s1
JOIN (
SELECT article, MAX(price) AS price
FROM shop
GROUP BY article) AS s2
ON s1.article = s2.article AND s1.price = s2.price;
WHERE dealer = 'dealer sample'

What indexes I should create for this query?

View 2 Replies View Related

Vs2005 Helpï¼?ï¼?ï¼?ï¼? Give Me A Hand ! Waiting On Line

Feb 24, 2006

vs2005  helpï¼?ï¼?ï¼?ï¼? a textbox ,a button , a sqldatasource ,a dataview    when click the button  execute sql:  select * from authors where name=''+textbox.text+''
the dataset returned list in  dataview , just like c/s  。 I feel it very hard to
contral sqldatasource,
code is holpful 2!

View 1 Replies View Related

SQL Server Equivalent For DATE LIKE '%__/Apr/2006%' (was Please Give Me A Hand...)

Apr 10, 2006

I'm happyguy and this is the first time to post my problem. Thanks a lot

here is a SQL query that I know how to write in Oracle, which is

Select * from AttandanceRecord where date like '%__/Apr/2006%'

but, now i'm developing my system with using Ms Sql Server 2000, so I don't know how to write a query with same output as above...

Please, can somebody help me??

View 6 Replies View Related

Reporting Services :: Design Pattern For Holding Back Subscriptions When ETL Hasn't Completed

Jun 19, 2015

I'm working on an application that allows users to set up scheduled time based reports. Each scheduled report creates a SQL Agent job associated with a schedule.The default time to fire these off is 8:00 AM. There are several hundred. DWH and it has no trouble running hundreds of reports all fired off at the same time.

There are several ETL processes and occasionally they don't complete before our verbal SLA of 8:00 AM.

My problem is on days where the ETL runs past 8:00 AM I wan't to hold these scheduled jobs from firing off.

View 4 Replies View Related

Sqldatasource Setting Reset After Page Postback, Could Anyone Give Me A Hand On This

Nov 25, 2005

Hi, I have created a search page which needs to perform different
search function in same page. I have setuped a sqldatasource then
manual
setup the connection string and command inside the codefile. So the
select command can be various depends on the event. The problem is
all of those setting will be reset after I click on the pageindex in
the girdview control to go to next pages. Since this gridview is linked

with this sqldatasource control, I need to restore the connection
string/command when user choose decide to view next page of data inisde
the
gridview.

I think I must have done something wrong in here becuase it will end up
retrieving  the total amount of data when everytime user choose to
view next
or perivous page.

Can someone give me a hand on this ? Thanks

View 1 Replies View Related

SQL 2012 :: Calculate Stock Aging Based On Hand Quantity

Jan 18, 2015

I want to calculate stock aging (qty, cost) based on the on hand quantity.

Currently I am recording only in/out transaction only.

For ex: Item A i have 115 pieces (Balance stock) as on to day.

Transaction History
---------------------
Lot 1 - 01/01/2015 - 50
Lot 2 - 10/02/2015 - 50
Lot 3 - 11/03/2015 - 50
Lot 4 - 15/04/2014 - 50

I want to calculate cost of balance qty as shown below.

Jan -
Feb - 15 @ 1.1
Mar - 50 @ 0.90
Apr - 50 @ 1.2

Database schema
--------------------
CREATE TABLE [dbo].[StockManagement](
[Uniid] [int] IDENTITY(1,1) NOT NULL,
[StockCode] [int] NULL,
[TransactionDate] [datetime] NULL,
[TransactionTime] [time](0) NULL,

[Code] .....

View 0 Replies View Related

Possible To Stop SSRS GUI From Destroying Hand Rolled Mdx In Datasets By Silently Reverting To Design Mode?

May 30, 2007

Since as soon as you extend your mdx datasets manually you can no longer switch back into design mode without losing your changes, right?

If that's the case, is there some way to disable design mode completely? i'm finding that the GUI has the tendency to SILENTLY revert the dataset editor back to design mode while I'm busy editing a layout, thereby losing my carefully crafted MDX.

View 4 Replies View Related

Creating Database From Stored Proc With Variable Holding The Database Name

Aug 16, 2007

Here is my code


ALTER PROCEDURE Test
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

DECLARE @From varchar(10)
DECLARE @To varchar(10)
DECLARE @DBName varchar

SELECT TOP 1 @From = CONVERT(char,CreateDate,101) FROM CustomerInfo
WHERE TicketNum =
(SELECT TOP 1 TicketNum FROM CustomerInfo
WHERE CreateDate <= DATEADD(mm, -30, CURRENT_TIMESTAMP)
ORDER BY CreateDate DESC)
SELECT @To = CONVERT(char,GETDATE(),101)

SET @DBName = 'Archive_SafeHelp'
CREATE DATABASE @DBName + ' ' + @From + ' ' + @To
END


I am trying to create a database based on the name contained in the variables. I get the error 'Incorrect syntax near '@DBName'. How do i accomplish this?

Thanks
Ganesh

View 2 Replies View Related

SSRS Date Parameter - Showing Date Format On Right Hand Side

Jul 24, 2007

I am having report parameter end date I am showing the default value "5/21/2007 11:59:59 PM" in the end date paramter. And also I want to show date time format "(MM/DD/YYYY HH:MMS)" in the right hand side of the parameter. How to do this?



Thank You

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved