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


ADVERTISEMENT

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

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

Tables Need To Be In Line Across Multiple Databases (was Give Me Your Suggestion)

Mar 1, 2006

Hello All,

I have multiple SQL Server 2000 databases all identical in structure (Company1.mdf, Company2.mdf, Company3.mdf). I have a situation where while connected to Company1, i want to create a record in Table1 and have that same record automatically be created within Company2 and Company3.

If i was working with MSAccess, i could use linked tables where i would link Company2 and Company3 to Company1 Table1. This way if any changes are made, all three companies and working from the same record set.

My situation deals with mutiple tables that need to be in line with each other across mutliple databases.

Your suggestions are appreciated.

Thanks

View 9 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

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

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 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

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

Waiting On ASYNC_NETWORK_IO

Feb 20, 2008

We are having a problem with an SSIS package. The package gets stuck when it runs a data flow component that reads data from 5 large tables, performs a union on the data, does a conversion on one field and then writes the data to another table. This all happens in the same database and the ssis package runs on the same server as the database.

When I look at the waiting tasks on the sql server I always see the following type of scenario. It is always the ASYNC_NETWORK_IO that is causing the others to wait.













SPID
Wait type
duration
Waiting Address
Blocking Address

118
ASYNC_NETWORK_IO
47
0x0000000000C2FD68
NULL

118
CXPACKET
47
0x0000000000C2F2E8
0x0000000000C2FD68

118
CXPACKET
47
0x0000000000EB4DA8
0x0000000000C2FD68

118
CXPACKET
47
0x0000000000ECB048
0x0000000000C2FD68

118
CXPACKET
47
0x0000000000EE12E8
0x0000000000C2FD68

In some cases the duration column goes up to several hours until we finally just kill the package. At the same time, we also see that session 118 is consuming very large amounts of memory (in sys.dm_exec_query_memory_grants). However, when we look at the dtexec process that is running the package on the server it only has a working set of about 100Mb. We've tried rewriting the dataflow task as a simple stored procedure and this goes through smoothly.

Can anyone shed some light on what is going on and how to avoid this type of locking situation (other than just using plain old T-SQL).

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

How Can I Remove The Line Feed/carriage Return In The Last Line Of The Exported Text File ?

Feb 27, 2007

Hi,
for some AP issue, the file I upload must be without the line feed/carriage return in the last line.
for example:

original fixed-length file (exported from SSIS)
line NO DATA
1 AA123456 50 60
2 BB123456 30 40
3 CC123456 80 90
4 <-- with line feed/carriage return in the last line

The file format that AP request. The file only has 3 records, so it should end in the third line.
line NO DATA
1 AA123456 50 60
2 BB123456 30 40
3 CC123456 80 90

Should I use script component to do it ? I am new for VB . Anyone would help me ?

Thank you all.

View 1 Replies View Related

Reporting Services :: Draw Trend Line For SSRS Line Chart 2005

May 4, 2012

I need the Trend line for the following data in Line chart they are the following data. The following are the graph are my output and i need the trend line for these Key_gap value.

This is the link [URL] ....

I need the same trend line for the Bar-Chart in SSRS 2005.

View 5 Replies View Related

Storing And Retrieving Line Breaks/newlines From Multi-line Textbox (C#)

Aug 31, 2007

I hope I'm posting this in the correct forum (forgive me if I'm not) since I'm not sure if this is an issue with inserting an item into a db or the processing of what I get out of it.  I wrote a basic commenting system in which someone my post a comment about something written on the site.  I wanted to keep it very simple, but I at least want the ability for a user to have newlines in their comment without having to hardcode a <br /> or something like that.  Is there a way for me to detect a newline if someone, for example, is going to their next paragraph?
Let me know if you need a better explanation.
Thanks in advance!

View 4 Replies View Related

[393] Waiting For SQL Server To Recover Databases...

Jun 20, 2001

We have a two node cluster running W2K and SQL2000. The agent starts, but we cannot access any of the jobs. It gives us the 14258 Agent is starting, try again later... error message. We know that this is not the case, we have waited several hours without it "starting". The SQL Agent log indicates that the agent is waiting on SQL Server to recover databases, but all of our databases are up. It is almost as if during startup a flag did not get set to indicate that a database was recovered.

Has anyone run across this before? If so, did you ever figure out how to fix it?

View 2 Replies View Related

Waiting On Flag To Activate Jobs ?

Feb 17, 2005

is there a way to automate a job to wait on a flag in a directory and to start my maintenance plans ?

if so how would i code is there external functions plz help.

View 8 Replies View Related

Not Waiting For A Stored Procedure To Finish

May 7, 2008

I have a Stored Procedure which Ideally should run when a Customer Logs in, the Procedure will check the available stock and create a Temp Table for the Information, which allows many other Queries in the site to run a lot faster, (due to no joins). The Query has taken as much as 30seconds (Lots of Records and 1/2 dozen Joins) to run upon log in and causing a Timeout for the web application.

I want the procedure to run as it is, but for the login method to not be dependent on the Process tried this in .NET cmd.BeginExecuteNonQuery() (cmd=SQLCOmmand)
which doesn't do what I want it just allows me to run heaps of QUeries at the same time.

Can anyone help me with getting this procedure to run and not hold up the Web application? Not sure whether I need to do this in .NET, or whether I can get .NET to run a Batch File or something, but someone must have had a similiar problem, please help.

View 5 Replies View Related

Waiting For Buffer Latch Error

Jul 20, 2005

Does anybody know what might cause the following message to show up inthe SQL Server Error Log?:Time out occurred while waiting for buffer latch type 2, bp0x12260f80, page (5:77914), stat 0x40d, object ID 7:421576540:0,waittime 500. Continuing to wait.I've read several articles about what to do about this situation onSQL Server 2000, but I'm running SQL Server 7.0. Specifically, I'mrunning version 7.00.842. Is there a way to resolve this problemwithout upgrading to some flavor of SQL Server 2000?

View 2 Replies View Related

ISQL: Msg 170, Level 15, State 1, Line 1 Line 1: Incorrect Syntax Near ' '

Nov 8, 2006

G'day everyoneThat's a space between the ticks.It's all part of a longer script but seeing as the failure occurs online 1if exists (select * from dbo.sysobjects where id =object_id(N'[dbo].[config]') and OBJECTPROPERTY(id, N'IsUserTable') =1)drop table [dbo].[config]GOThat's three lines only. Does it matter that they're in Unicode?Any ideas?Kind regards,Bruce M. AxtensSoftware EngineerStrapper Technologies

View 3 Replies View Related

Displaying A Trend Line (in Line Chart) In SSRS

Feb 7, 2007

We have a line graph which plots the actual data points (x,y), everything is working fine with this graph. Now we need to add a trend line to this existing graph after going thro. the articles we came to know that there is no direct option in SSRS to draw a trend line. So we need to calculate the trend values ourselves which we need to plot as atrend line. This trend line is similar to the trend line which comes in Excel chart, do anyone know how to calculate the trend values from the actual data points. We got through several formulas, but were not clear, have anyone tried out exactly the same, if so please help us out by providing an example to calculate the trend values.

View 1 Replies View Related

Dynamically Change The Color Of The Line On A Line Graph

Oct 26, 2007

I have a line graph which shows positive and negative values. Is it possible to have the line one color when its negative and another when its positive?

kam

View 4 Replies View Related

Time Out Occurred Waiting For Buffer Latch??

Aug 23, 2004

Hi Guys,

One of your SQLSERVER 7, Server throws the below error message into the log file. It won't go away until the server get rebooted. When this error start showing up.. customers have hard time connecting to the Server, eventually we have to reboot the server.

Time out occurred while waiting for buffer latch type 1, bp 0x18b9200, page (1:50859), stat 0xb, object ID 17:1954106002:1, waittime 500. Continuing to wait.

Any help is greatly appericated.

thanks

View 2 Replies View Related

SQL SERVER 2000 SELECT Waiting And Locks

Jun 17, 2004

Is anyone have already encountered such a problem :

When a table is locked by several locks (key, pag), either a SELECT request which does not need to lock any row cannot succeed.

In SQL Server Enterprise Manager, I see that my request is waiting for a lock "LCK_M_S" !!!

How I can avoid this kind of situation which seems to me completely abnormal.

I have never been faced with this kind of problem in Oracle.

Thanks for anyone who will help me to resolve this "bug".

View 4 Replies View Related

How To Execute Any Command Without Waiting For Server Answer

Apr 6, 2015

I'm wondering if there is any way for me to execute any type of command (delete, insert, create, alter, etc) on management studio without having to wait the server answer.

On Oracle, I use DBMS_JOB. On SQL Server, do I have to create a SQL SERVER Agent Job? What if I don't have permission to create that kind of jobs?

View 2 Replies View Related

ADS System Timed Out Waiting For Lock Error

Feb 6, 2007

I am attempting to modify the ADS sample to work with my own application and am running into a snag. I have a simple sqlce database that has two tables in it. I have everything working up until the point where I try to "Pull" the data. At this point in time this is what happens.

1.) I successfully Drop Table1 from the SQLCE database and then Pull "Table1" from the desktop database

2.) When attempting to Pull Table2. It runs the DoesTableExist Function, identifies that the table does exist and therefore tries to run the "DropTable" routine before Pulling the desktop Table2 data. As soon as the sqlCmd.ExecuteNonQuery of the DropTable routine runs I get the following error....

"The system timed out waiting for a lock. [ Session id = 1,Thread id = 1318094114,Process id = 1318068802,Table name = Table2,Conflict type = x lock (s blocks),Resource = DDL ][Table2]"

Of Note...I converted the sample to VB.NET so it's possible something didn't convert right? My guess is that it probably has something to with my SQLCE Database but I haven't the slightest clue where to go from there. Anyone have any ideas what might be going on?

Thanks,

Mike

View 4 Replies View Related

Stored Procedure Waiting For CXPACKET And Never Completes.

Jan 28, 2008



Hi!

I hope to get some help with a stored procedure that never stops executing when run from Reporting Services development environment.


The server: SQL Server 2005 SP2 x86, 2 gig ram, 2 processor cores.


The stored procedure I execute is simple, it declares and sets some variables and then a executes a select statement
with 6 joins.
If I execute the stored procedure from Management Studio the query runs and returns about 50 000 rows in ~2 seconds. No problems!


The problems arises when I execute the stored procedure from visual studio (testing my reporting services report). The query will never complete its execution!?


I checked the activity monitor and can verify I have NO processses with any information in the blocked by or blocking column.
The strange thing is I got 3 rows for process id 64, only one row (row 1) printing the executing user.

Row 1: Stutus suspenden, Wait Type CXPACKET
Row 2 and 3 are pending between runnable and suspended and wait typoe pageiolatch_ex and no wait type at all when I refresh. These are probably parallell threads executed in the query.

The strange thing here is that this process never completes and if I do a trace the last command executed is select statement. I don´t understand what the problem is, sql server bug? Parellelism problem (in this case, why?)



Any help is appreciated

Regards
Per

View 8 Replies View Related

Analysis :: Excel Waiting For Query To Be Executed

Jun 2, 2015

My Excel Pivot Table connects to and SSAS 2008 cube. What exactly happens in the back-end during 'Waiting for the query to be executed...'

View 3 Replies View Related







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