15,904,823 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by bindash (Top 66 by date)
bindash
14-Mar-15 6:52am
View
i have no code ..i want suggestion which control is used and how?
bindash
20-Nov-14 2:24am
View
please explain.. i am new in development
bindash
14-Jul-14 2:59am
View
it's not working.. thnks for reply
bindash
29-May-14 3:20am
View
thnks for reply.. i m using itextsharp.. plz read my problem carefully
bindash
29-May-14 2:15am
View
thanks for reply.. which version i download and how to use..plz tell me
bindash
17-May-14 1:39am
View
after debugging the error is
in this line
htmlparser.Parse(sr);
An exception of type 'System.FormatException' occurred in mscorlib.dll but was not handled in user code
Additional information: Input string was not in a correct format.
bindash
15-May-14 4:46am
View
when i m fetch data using single query.. means one query qt a time. then result is fetching.
bindash
15-May-14 3:31am
View
same error is occured... thanks for reply
bindash
6-May-14 8:27am
View
please give me syntax .. how it perform.. as example
bindash
6-May-14 8:18am
View
query is not return single value.. it returns multiple rows..
what do u want to say.. please explain
bindash
29-Apr-14 8:23am
View
Deleted
i have check..the query is working in like this saperately like this nereason between '01' and '24'.. it's not working in stored procedure
bindash
29-Apr-14 8:23am
View
Deleted
i have check..the query is working in like this saperately like this nereason between '01' and '24'.. it's not working in stored procedure
bindash
29-Apr-14 8:23am
View
i have check..the query is working in like this seperately like this nereason between '01' and '24'.. it's not working in stored procdure
bindash
29-Apr-14 8:16am
View
thanks for reply.. but it's not working...
bindash
28-Apr-14 8:20am
View
sorry .. the error is:
Msg 156, Level 15, State 1, Line 4
Incorrect syntax near the keyword 'AND'.
bindash
28-Apr-14 8:18am
View
yes droupout is correct..
bindash
23-Apr-14 4:44am
View
sorry .. it's working fine.. and thanks..
bindash
22-Apr-14 3:08am
View
thanks.. but it's not working..
bindash
22-Apr-14 3:04am
View
thanks for give solution.. bt it's not working
bindash
16-Apr-14 6:54am
View
not working ..error: it is not contained aggregate function or group by clause
bindash
16-Apr-14 6:54am
View
not working ..error: it is not contained aggregate function or group by clause
bindash
16-Apr-14 6:34am
View
thanks for reply.. but it's not working.
bindash
14-Apr-14 0:41am
View
hii.. thanks for reply... bt i check. it's not working..if i remove any one condition then records are fetched
bindash
11-Apr-14 0:57am
View
thanks for reply.. but i m fetching data from 2 tables.. please read my problem carefully
bindash
5-Apr-14 2:43am
View
yes i want to store this result in 3 diffrnt column in a temp table
bindash
5-Apr-14 1:24am
View
no reason .. but how to combined 3 query into one query
bindash
2-Apr-14 7:35am
View
thanks for reply..
bt it's not working
bindash
2-Apr-14 7:28am
View
i m not generate .. the panels are present in my page.. i want to show accrding to block value on button click
bindash
2-Apr-14 7:27am
View
please explain in detail
bindash
30-Mar-14 0:11am
View
i m searching for a sql query..if it will execute.. i will replace in code..
my main problem is: i have a table name 13CHILD_D.. the table has more field .. like id,name ,dob ..all r nvarchar type.. i want to fetch number of child age between 6-14.
the dob is save in db like 08-07-2000 like this..
help plz..
bindash
29-Mar-14 16:27pm
View
i want to fatch data from this table ..
SELECT CONVERT(DATETIME, [dob]) AS dob, GETDATE() AS CurrentDate, DATEDIFF(yyyy, [dob], GETDATE()) AS Age
FROM[SCJ].[dbo].[13CHILD_D]
bindash
29-Mar-14 16:24pm
View
it's not a joke.. same error is occured..in sql server 2008 r2
bindash
29-Mar-14 16:14pm
View
the error occured
The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value.
bindash
21-Mar-14 6:43am
View
u r right.. i m try store this retrive data from @vquery in CHILDINFO_LOG.. I m getting 35 values from @vquery..
bindash
21-Mar-14 6:33am
View
@vquery is working properly.. it is used to show data on a page.. it's working.. i want to store this data in CHILDINFO_LOG
bindash
21-Mar-14 6:29am
View
it's not working
bindash
21-Mar-14 4:56am
View
also not working 2 values also.. it's working for 1 value only.. if i place '@vquery' in values .. it's insert that column with @vquery ..
bindash
21-Mar-14 4:49am
View
I HAVE TRIED it's not working.. no. of parameter and order pf parameter is same..
bindash
21-Mar-14 4:06am
View
i did't get it.. plz explain in detail.. plz plz..
i also try exec(@vquery).. it's also not working
bindash
20-Mar-14 7:34am
View
yes my procedure is working for diasplay data.. i want to store this display data in a table
bindash
20-Mar-14 7:24am
View
my procedure is for display data in labels in web page..it's working.. the procedure has more field ex..child name,disstt,clock etc of 2 tables.. i want to store this data in a table childinfo_log
bindash
20-Mar-14 7:17am
View
i m store this data in a table..
an error is occured..
SET @vquery1='select Child.cname FROM ' + @ChildTblName + ' As Child INNER JOIN ' + @FamilyTblName + ' AS Family ON
Child.barcode=Family.barcode WHERE Child.distt = ' + @DistrictID + '';
insert into CHLDINFO_LOG(Chld_Name) values(@vquery1)
value is not inserted in table.. no error is occured
bindash
20-Mar-14 7:11am
View
it's not working .. my query is
SET @vquery1='select Child.cname FROM ' + @ChildTblName + ' As Child INNER JOIN ' + @FamilyTblName + ' AS Family ON
Child.barcode=Family.barcode WHERE Child.distt = ' + @DistrictID + '';
bindash
20-Mar-14 7:10am
View
it's not working...
my query is
SET @vquery1='select Child.cname FROM ' + @ChildTblName + ' As Child INNER JOIN ' + @FamilyTblName + ' AS Family ON
Child.barcode=Family.barcode WHERE Child.distt = ' + @DistrictID + '';
bindash
20-Mar-14 0:58am
View
please explain in detail... i did't get it..
bindash
20-Mar-14 0:49am
View
how to use these table names in trigger..
bindash
20-Mar-14 0:48am
View
my stored procedure is passed table name like this
USE [SCJ]
GO
/****** Object: StoredProcedure [dbo].[spUPDATE_INFO] Script Date: 03/19/2014 22:15:34 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <author,,name>
-- Create date: <create date,,="">
-- Description: <description,,>
-- =============================================
ALTER PROCEDURE [dbo].[spUPDATE_INFO]
-- Add the parameters for the stored procedure here
@DistrictID VARCHAR(250),
@barcode VARCHAR(50),
@distic Nvarchar(50)='',
@block Nvarchar(50)='',
@GP Nvarchar(50)='',
@village Nvarchar(50)='',
@habitation Nvarchar(50)='',
@location Nvarchar(50)='',
@residing Nvarchar(50)='',
@mother_ton Nvarchar(50)='',
@Pincode Nvarchar(50)='',
@House_no Nvarchar(50)='',
@Father Nvarchar(50)='',
@Mother Nvarchar(50)='',
@Guardian Nvarchar(50)='',
@social_grp Nvarchar(50)='',
@Minority Nvarchar(50)='',
@Male Nvarchar(50)='',
@Female Nvarchar(50)='',
@seasnal_mgrtn Nvarchar(50)='',
@Mgrtn_Type Nvarchar(50)='',
@durtn_Mgrtn Nvarchar(50)='',
@LP Nvarchar(50)='',
@UP Nvarchar(50)='',
@SEC Nvarchar(50)='',
@Ctchmnt_LP Nvarchar(50)='',
@Ctchmnt_UP Nvarchar(50)='',
@Ctchmnt_SEC Nvarchar(50)='',
@Chld_Name NVARCHAR(50),
@SEX Nvarchar(50)='',
@DOB Nvarchar(50),
@Disblty_type Nvarchar(50)='',
@Schl_CODE Nvarchar(50)='',
@CLASS Nvarchar(50)='',
@NEREASON Nvarchar(50)='',
@DRPOUT_rsn Nvarchar(50)='',
@HIGH_class Nvarchar(50)=''
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
DECLARE
@ChildTblName AS VARCHAR (125),
@FamilyTblName AS VARCHAR (125),
@vQuery1 AS VARCHAR (max),
@vQuery2 AS VARCHAR (max);
SET @ChildTblName = '[' + @DistrictID + 'Child_D' + ']'
SET @FamilyTblName = '[' + @DistrictID + 'Family_D' + ']'
SET @vQuery1 = 'update Child SET Child.cname=' + CHAR(39) +@Chld_Name+ CHAR(39) + ',Child.distt=' + CHAR(39) +@distic+ CHAR(39) + ',
Child.block=' + CHAR(39) +@block+ CHAR(39) + ',Child.gpmctc=' + CHAR(39) +@GP+ CHAR(39) + ',Child.village=' + CHAR(39) +@village+ CHAR(39) + ',
Child.habitation=' + CHAR(39) +@habitation+ CHAR(39) + ',Child.sex=' + CHAR(39) +@SEX+ CHAR(39) + ',Child.dob=' + CHAR(39) +@DOB+ CHAR(39) + ',
Child.location=' + CHAR(39) +@location+ CHAR(39) + ',
Child.residing=' + CHAR(39) +@residing+ CHAR(39) + ',Child.mother_ton=' + CHAR(39) +@mother_ton+ CHAR(39) + ',Child.disability=' + CHAR(39) +@Disblty_type+ CHAR(39) + ',
Child.sch_code=' + CHAR(39) +@Schl_CODE+ CHAR(39) + ',Child.class=' + CHAR(39) +@CLASS+ CHAR(39) + ',
Child.nereason=' + CHAR(39) +@NEREASON+ CHAR(39) + ',Child.droupout=' + CHAR(39) +@DRPOUT_rsn+ CHAR(39) + ',Child.highclass=' + CHAR(39) +@HIGH_class+ CHAR(39) + '
FROM ' + @ChildTblName + ' As Child WHERE Child.barcode=' + @barcode + ' AND Child.distt = ' + @DistrictID + '';
SET @vQuery2= 'update Family SET Family.distt=' + CHAR(39) +@distic+ CHAR(39) + ', Family.location=' + CHAR(39) +@location+ CHAR(39) + ',
Family.residing=' + CHAR(39) +@residing+ CHAR(39) + ',
Family.block=' + CHAR(39) +@block+ CHAR(39) + ',Family.gpmctc=' + CHAR(39) +@GP+ CHAR(39) + ',Family.village=' + CHAR(39) +@village+ CHAR(39) + ',
Family.habitation=' + CHAR(39) +@habitation+ CHAR(39) + ' ,Family.pincode=' + CHAR(39) +@Pincode+ CHAR(39) + ',Family.hhno=' + CHAR(39) +@House_no+ CHAR(39) + ',
Family.fname=' + CHAR(39) +@Father+ CHAR(39) + ', Family.mname=' + CHAR(39) +@Mother+ CHAR(39) + ',Family.gname=' + CHAR(39) +@Guardian+ CHAR(39) + ',
Family.social_grp=' + CHAR(39) +@social_grp+ CHAR(39) + ',Family.minority=' + CHAR(39) +@Minority+ CHAR(39) + ',Family.total_male=' + CHAR(39) +@Male+ CHAR(39) + ',
Family.total_fema=' + CHAR(39) +@Female
bindash
13-Mar-14 8:25am
View
--content has been moved to the question--
bindash
13-Mar-14 1:07am
View
THANKS A LOT.. u r genius..
bindash
11-Mar-14 3:16am
View
PLEASE give me idea.. how i will update 2 tables in one stored procrdure
thanks in advance..
bindash
5-Mar-14 2:40am
View
this is my store procedue spGetCHLDETAIL
USE [SCJ]
GO
/****** Object: StoredProcedure [dbo].[spGetCHLDETAIL] Script Date: 03/05/2014 10:48:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[spGetCHLDETAIL]
(
@DistrictID VARCHAR(250),
@barcode VARCHAR(50)
)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @FirstRow AS INT,
@LastRow AS INT,
@ChildTblName AS VARCHAR (125),
@FamilyTblName AS VARCHAR (125),
@vQuery AS NVARCHAR (MAX)
SET @ChildTblName = '[' + @DistrictID + 'Child_D' + ']';
SET @FamilyTblName = '[' +@DistrictID + 'Family_D' + ']'
CREATE TABLE #tblChildFamily
(
scanno NVARCHAR (255),
distt NVARCHAR (255),
block NVARCHAR (255),
gpmctc NVARCHAR (255),
village NVARCHAR (255),
habitation NVARCHAR (255),
location NVARCHAR (255),
residing NVARCHAR (255),
mother_ton NVARCHAR (255),
pincode NVARCHAR (255),
hhno NVARCHAR (255),
barcode NVARCHAR(255),
fname NVARCHAR (255),
mname NVARCHAR (255),
gname NVARCHAR (255),
sex NVARCHAR (255),
dob NVARCHAR (255),
social_grp NVARCHAR (255),
minority NVARCHAR (255),
total_male NVARCHAR (255),
total_fema NVARCHAR (255),
seasonal_m NVARCHAR (255),
migration_ NVARCHAR (255),
duration NVARCHAR (255),
lp NVARCHAR (255),
up NVARCHAR (255),
sec NVARCHAR (255),
catch_s_lp NVARCHAR (255),
catch_s_up NVARCHAR (255),
catch_s_se NVARCHAR (255),
cname NVARCHAR (255),
class NVARCHAR (255),
disability NVARCHAR (255),
sch_code NVARCHAR (255),
nereason NVARCHAR (255),
droupout NVARCHAR (255),
highclass NVARCHAR (255),
uid NVARCHAR(255),
);
SET @vQuery = 'SELECT Child.scanno,Child.cname,Child.distt,Child.block,Child.gpmctc,Child.village Child.habitation, Child.barcode,Child.sex,Child.dob,Family.pincode,Family.hhno,Family.fname,Family.mname,Family.gname,Family.social_grp,Family.minority,Family.total_male,Family.total_fema,Family.seasonal_m,Family.migration_,Family.duration,Family.lp,Family.up,Family.sec,Family.catch_s_lp,Family.catch_s_up,Family.catch_s_se,Child.location,
Child.residing,Child.mother_ton,Child.disability,Child.sch_code,Child.class,Child.nereason,Child.droupout,Child.highclass,Child.uid
FROM ' + @ChildTblName + ' As Child INNER JOIN ' + @FamilyTblName + ' AS Family ON
Child.barcode=Family.barcode WHERE LTRIM(RTRIM(Child.cname)) <> '''' AND Child.distt = ' + @DistrictID + '';
INSERT INTO #tblChildFamily (scanno,cname,distt,block,gpmctc,village,habitation,barcode,sex,dob,pincode,hhno,fname,mname,gname,social_grp,minority,total_male,total_fema,seasonal_m,migration_,duration,lp,up,sec,catch_s_lp,catch_s_up,catch_s_se,location,
residing,mother_ton,disability,sch_code,class,nereason,droupout,highclass,uid)
EXECUTE sp_executesql @vQuery;
select scanno,cname,distt,block,gpmctc,village,habitation,sex,dob,pincode,hhno,fname,mname,gname,social_grp,minority,total_male,total_fema,seasonal_m,migration_,duration,lp,up,sec,catch_s_lp,catch_s_up,catch_s_se,location,
residing,mother_ton,disability,sch_code,class,nereason,droupout,highclass
FROM #tblChildFamily where barcode=@barcode
DROP TABLE #tblChildFamily;
END
bindash
5-Mar-14 2:38am
View
tis is my childinfo.aspx.cs code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
namespace TrackWebApplication
{
public partial class ChildInfo : System.Web.UI.Page
{
private string barcode = "";
private string dstid = "";
protected void Page_Load(object sender, EventArgs e)
{
GetData();
}
private void GetData()
{
DataTable dt = new DataTable();
SqlConnection connection = new SqlConnection("Data Source=SCJ-454B2938AB1\\SCJ;Integrated Security=true;Initial Catalog=SCJ");
connection.Open();
SqlCommand Cmd = new SqlCommand();
Cmd.Connection = connection;
Cmd.CommandType = CommandType.StoredProcedure;
Cmd.CommandText = "spGetCHLDETAIL";
Cmd.Parameters.AddWithValue("@barcode", Request.QueryString["CHILDCODE"]);
Cmd.Parameters.AddWithValue("@DistrictID", Request.QueryString["DIST_ID"]);
SqlDataAdapter da=new SqlDataAdapter(Cmd);
da.Fill(dt);
if (dt.Rows.Count > 0)
{
lbdscde.Text = dt.Rows[0]["distt"].ToString();
lbblcde.Text = dt.Rows[0]["block"].ToString();
lbgpcde.Text = dt.Rows[0]["gpmctc"].ToString();
lbvlcde.Text = dt.Rows[0]["village"].ToString();
lbhbcde.Text = dt.Rows[0]["habitation"].ToString();
lblocde.Text = dt.Rows[0]["location"].ToString();
lbchrcde.Text = dt.Rows[0]["residing"].ToString();
lbmtcde.Text = dt.Rows[0]["mother_ton"].ToString();
lbpncde.Text = dt.Rows[0]["pincode"].ToString();
lbhsno.Text = dt.Rows[0]["hhno"].ToString();
lbfthr.Text = dt.Rows[0]["fname"].ToString();
lbmthr.Text = dt.Rows[0]["mname"].ToString();
lbgrdn.Text = dt.Rows[0]["gname"].ToString();
lbscgp.Text = dt.Rows[0]["social_grp"].ToString();
lbmtcde.Text = dt.Rows[0]["minority"].ToString();
lbmle.Text = dt.Rows[0]["total_male"].ToString();
lbfmle.Text = dt.Rows[0]["total_fema"].ToString();
lbscmg.Text = dt.Rows[0]["seasonal_m"].ToString();
lbmgtyp.Text = dt.Rows[0]["migration_"].ToString();
lbdrmg.Text = dt.Rows[0]["duration"].ToString();
lbnhscll.Text = dt.Rows[0]["lp"].ToString();
lbnhsclu.Text = dt.Rows[0]["up"].ToString();
lbnhsclsc.Text = dt.Rows[0]["sec"].ToString();
lbctscll.Text = dt.Rows[0]["catch_s_lp"].ToString();
lbctsclU.Text = dt.Rows[0]["catch_s_up"].ToString();
lbctsclsc.Text = dt.Rows[0]["catch_s_se"].ToString();
lbchldnme.Text = dt.Rows[0]["cname"].ToString();
lbsex.Text = dt.Rows[0]["sex"].ToString();
lbdob.Text = dt.Rows[0]["dob"].ToString();
lbdsabty.Text = dt.Rows[0]["disability"].ToString();
lbschcde.Text = dt.Rows[0]["sch_code"].ToString();
lbclass.Text = dt.Rows[0]["class"].ToString();
lbNErsn.Text = dt.Rows[0]["nereason"].ToString();
lbDRPrsn.Text = dt.Rows[0]["droupout"].ToString();
lbhgcls.Text = dt.Rows[0]["highclass"].ToString();
}
connection.Close();
}
}
}
bindash
5-Mar-14 1:37am
View
Deleted
and my modified sp code is:
and mp sp code is
USE [SCJ]
GO
/****** Object: StoredProcedure [dbo].[spGetCHLDETAIL] Script Date: 03/05/2014 10:48:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- EXEC spGetFilteredChild '17','','','','','','','','','','','','','5','','','','','','','','',1,100
--exec spGetCHLDETAIL '','','17','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''
ALTER PROCEDURE [dbo].[spGetCHLDETAIL]
(
@DistrictID VARCHAR(250),
@barcode VARCHAR(50)
)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @FirstRow AS INT,
@LastRow AS INT,
@ChildTblName AS VARCHAR (125),
@FamilyTblName AS VARCHAR (125),
@vQuery AS NVARCHAR (MAX)
SET @ChildTblName = '[' + @DistrictID + 'Child_D' + ']';
SET @FamilyTblName = '[' +@DistrictID + 'Family_D' + ']'
CREATE TABLE #tblChildFamily
(
scanno NVARCHAR (255),
distt NVARCHAR (255),
block NVARCHAR (255),
gpmctc NVARCHAR (255),
village NVARCHAR (255),
habitation NVARCHAR (255),
location NVARCHAR (255),
residing NVARCHAR (255),
mother_ton NVARCHAR (255),
pincode NVARCHAR (255),
hhno NVARCHAR (255),
barcode NVARCHAR(255),
fname NVARCHAR (255),
mname NVARCHAR (255),
gname NVARCHAR (255),
sex NVARCHAR (255),
dob NVARCHAR (255),
social_grp NVARCHAR (255),
minority NVARCHAR (255),
total_male NVARCHAR (255),
total_fema NVARCHAR (255),
seasonal_m NVARCHAR (255),
migration_ NVARCHAR (255),
duration NVARCHAR (255),
lp NVARCHAR (255),
up NVARCHAR (255),
sec NVARCHAR (255),
catch_s_lp NVARCHAR (255),
catch_s_up NVARCHAR (255),
catch_s_se NVARCHAR (255),
cname NVARCHAR (255),
class NVARCHAR (255),
disability NVARCHAR (255),
sch_code NVARCHAR (255),
nereason NVARCHAR (255),
droupout NVARCHAR (255),
highclass NVARCHAR (255),
uid NVARCHAR(255),
);
SET @vQuery = 'SELECT Child.scanno,Child.cname,Child.distt,Child.block,Child.gpmctc,Child.village Child.habitation, Child.barcode,Child.sex,Child.dob,Family.pincode,Family.hhno,Family.fname,Family.mname,Family.gname,Family.social_grp,Family.minority,Family.total_male,Family.total_fema,Family.seasonal_m,Family.migration_,Family.duration,Family.lp,Family.up,Family.sec,Family.catch_s_lp,Family.catch_s_up,Family.catch_s_se,Child.location,
Child.residing,Child.mother_ton,Child.disability,Child.sch_code,Child.class,Child.nereason,Child.droupout,Child.highclass,Child.uid
FROM ' + @ChildTblName + ' As Child INNER JOIN ' + @FamilyTblName + ' AS Family ON
Child.barcode=Family.barcode WHERE LTRIM(RTRIM(Child.cname)) <> '''' AND Child.distt = ' + @DistrictID + '';
INSERT INTO #tblChildFamily (scanno,cname,distt,block,gpmctc,village,habitation,barcode,sex,dob,pincode,hhno,fname,mname,gname,social_grp,minority,total_male,total_fema,seasonal_m,migration_,duration,lp,up,sec,catch_s_lp,catch_s_up,catch_s_se,location,
residing,mother_ton,disability,sch_code,class,nereason,droupout,highclass,uid)
EXECUTE sp_executesql @vQuery;
select scanno,cname,distt,block,gpmctc,village,habitation,sex,dob,pincode,hhno,fname,mname,gname,social_grp,minority,total_male,total_fema,seasonal_m,migration_,duration,lp,up,sec,catch_s_lp,catch_s_up,catch_s_se,location,
residing,mother_ton,disability,sch_code,class,nereason,droupout,highclass
FROM #tblChildFamily where barcode=@barcode
--ORDER BY [Child Name];
--IF OBJECT_ID('tempdb..#tblChildFamily') IS NOT NULL
DROP TABLE #tblChildFamily;
END
bindash
5-Mar-14 1:37am
View
Deleted
and mp sp code is
USE [SCJ]
GO
/****** Object: StoredProcedure [dbo].[spGetCHLDETAIL] Script Date: 03/05/2014 10:48:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- EXEC spGetFilteredChild '17','','','','','','','','','','','','','5','','','','','','','','',1,100
--exec spGetCHLDETAIL '','','17','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''
ALTER PROCEDURE [dbo].[spGetCHLDETAIL]
(
@DistrictID VARCHAR(250),
@barcode VARCHAR(50)
)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @FirstRow AS INT,
@LastRow AS INT,
@ChildTblName AS VARCHAR (125),
@FamilyTblName AS VARCHAR (125),
@vQuery AS NVARCHAR (MAX)
SET @ChildTblName = '[' + @DistrictID + 'Child_D' + ']';
SET @FamilyTblName = '[' +@DistrictID + 'Family_D' + ']'
CREATE TABLE #tblChildFamily
(
scanno NVARCHAR (255),
distt NVARCHAR (255),
block NVARCHAR (255),
gpmctc NVARCHAR (255),
village NVARCHAR (255),
habitation NVARCHAR (255),
location NVARCHAR (255),
residing NVARCHAR (255),
mother_ton NVARCHAR (255),
pincode NVARCHAR (255),
hhno NVARCHAR (255),
barcode NVARCHAR(255),
fname NVARCHAR (255),
mname NVARCHAR (255),
gname NVARCHAR (255),
sex NVARCHAR (255),
dob NVARCHAR (255),
social_grp NVARCHAR (255),
minority NVARCHAR (255),
total_male NVARCHAR (255),
total_fema NVARCHAR (255),
seasonal_m NVARCHAR (255),
migration_ NVARCHAR (255),
duration NVARCHAR (255),
lp NVARCHAR (255),
up NVARCHAR (255),
sec NVARCHAR (255),
catch_s_lp NVARCHAR (255),
catch_s_up NVARCHAR (255),
catch_s_se NVARCHAR (255),
cname NVARCHAR (255),
class NVARCHAR (255),
disability NVARCHAR (255),
sch_code NVARCHAR (255),
nereason NVARCHAR (255),
droupout NVARCHAR (255),
highclass NVARCHAR (255),
uid NVARCHAR(255),
);
SET @vQuery = 'SELECT Child.scanno,Child.cname,Child.distt,Child.block,Child.gpmctc,Child.village Child.habitation, Child.barcode,Child.sex,Child.dob,Family.pincode,Family.hhno,Family.fname,Family.mname,Family.gname,Family.social_grp,Family.minority,Family.total_male,Family.total_fema,Family.seasonal_m,Family.migration_,Family.duration,Family.lp,Family.up,Family.sec,Family.catch_s_lp,Family.catch_s_up,Family.catch_s_se,Child.location,
Child.residing,Child.mother_ton,Child.disability,Child.sch_code,Child.class,Child.nereason,Child.droupout,Child.highclass,Child.uid
FROM ' + @ChildTblName + ' As Child INNER JOIN ' + @FamilyTblName + ' AS Family ON
Child.barcode=Family.barcode WHERE LTRIM(RTRIM(Child.cname)) <> '''' AND Child.distt = ' + @DistrictID + '';
INSERT INTO #tblChildFamily (scanno,cname,distt,block,gpmctc,village,habitation,barcode,sex,dob,pincode,hhno,fname,mname,gname,social_grp,minority,total_male,total_fema,seasonal_m,migration_,duration,lp,up,sec,catch_s_lp,catch_s_up,catch_s_se,location,
residing,mother_ton,disability,sch_code,class,nereason,droupout,highclass,uid)
EXECUTE sp_executesql @vQuery;
select scanno,cname,distt,block,gpmctc,village,habitation,sex,dob,pincode,hhno,fname,mname,gname,social_grp,minority,total_male,total_fema,seasonal_m,migration_,duration,lp,up,sec,catch_s_lp,catch_s_up,catch_s_se,location,
residing,mother_ton,disability,sch_code,class,nereason,droupout,highclass
FROM #tblChildFamily where barcode=@barcode
--ORDER BY [Child Name];
--IF OBJECT_ID('tempdb..#tblChildFamily') IS NOT NULL
DROP TABLE #tblChildFamily;
END
bindash
5-Mar-14 1:33am
View
Deleted
And my sp code is:
USE [SCJ]
GO
/****** Object: StoredProcedure [dbo].[spGetCHLDETAIL] Script Date: 03/05/2014 10:48:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- EXEC spGetFilteredChild '17','','','','','','','','','','','','','5','','','','','','','','',1,100
--exec spGetCHLDETAIL '','','17','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''
ALTER PROCEDURE [dbo].[spGetCHLDETAIL]
(
@DistrictID VARCHAR(250),
@barcode VARCHAR(50)
)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @FirstRow AS INT,
@LastRow AS INT,
@ChildTblName AS VARCHAR (125),
@FamilyTblName AS VARCHAR (125),
@vQuery AS NVARCHAR (MAX)
SET @ChildTblName = '[' + @DistrictID + 'Child_D' + ']';
SET @FamilyTblName = '[' +@DistrictID + 'Family_D' + ']'
CREATE TABLE #tblChildFamily
(
scanno NVARCHAR (255),
distt NVARCHAR (255),
block NVARCHAR (255),
gpmctc NVARCHAR (255),
village NVARCHAR (255),
habitation NVARCHAR (255),
location NVARCHAR (255),
residing NVARCHAR (255),
mother_ton NVARCHAR (255),
pincode NVARCHAR (255),
hhno NVARCHAR (255),
barcode NVARCHAR(255),
fname NVARCHAR (255),
mname NVARCHAR (255),
gname NVARCHAR (255),
sex NVARCHAR (255),
dob NVARCHAR (255),
social_grp NVARCHAR (255),
minority NVARCHAR (255),
total_male NVARCHAR (255),
total_fema NVARCHAR (255),
seasonal_m NVARCHAR (255),
migration_ NVARCHAR (255),
duration NVARCHAR (255),
lp NVARCHAR (255),
up NVARCHAR (255),
sec NVARCHAR (255),
catch_s_lp NVARCHAR (255),
catch_s_up NVARCHAR (255),
catch_s_se NVARCHAR (255),
cname NVARCHAR (255),
class NVARCHAR (255),
disability NVARCHAR (255),
sch_code NVARCHAR (255),
nereason NVARCHAR (255),
droupout NVARCHAR (255),
highclass NVARCHAR (255),
uid NVARCHAR(255),
);
SET @vQuery = 'SELECT Child.scanno,Child.cname,Child.distt,Child.block,Child.gpmctc,Child.village Child.habitation, Child.barcode,Child.sex,Child.dob,Family.pincode,Family.hhno,Family.fname,Family.mname,Family.gname,Family.social_grp,Family.minority,Family.total_male,Family.total_fema,Family.seasonal_m,Family.migration_,Family.duration,Family.lp,Family.up,Family.sec,Family.catch_s_lp,Family.catch_s_up,Family.catch_s_se,Child.location,
Child.residing,Child.mother_ton,Child.disability,Child.sch_code,Child.class,Child.nereason,Child.droupout,Child.highclass,Child.uid
FROM ' + @ChildTblName + ' As Child INNER JOIN ' + @FamilyTblName + ' AS Family ON
Child.barcode=Family.barcode WHERE LTRIM(RTRIM(Child.cname)) <> '''' AND Child.distt = ' + @DistrictID + '';
INSERT INTO #tblChildFamily (scanno,cname,distt,block,gpmctc,village,habitation,barcode,sex,dob,pincode,hhno,fname,mname,gname,social_grp,minority,total_male,total_fema,seasonal_m,migration_,duration,lp,up,sec,catch_s_lp,catch_s_up,catch_s_se,location,
residing,mother_ton,disability,sch_code,class,nereason,droupout,highclass,uid)
EXECUTE sp_executesql @vQuery;
--;WITH PagedGetFilteredChild
--AS (SELECT child.scanno,Child.barcode,Child.gpmctc,Child.habitation,Child.location,Child.residing,Child.mother_ton,Child.disability,Child.sch_code,Child.class,Child.nereason,Child.droupout,Child.pincode,Child.hhno,Child.fname,Child.mname,Child.gname,Child.social_grp,Child.minority,Child.total_male,Child.total_fema,Child.seasonal_m,Child.migration_,Child.duration,Child.lp,Child.up,Child.sec,child.catch_s_lp,child.catch_s_up,Child.catch_s_se,
-- Child.uid AS [Child UID],
-- child.cname AS [Child Name],
-- Dist.distnam
bindash
5-Mar-14 1:33am
View
Deleted
and my modified sp code is:
USE [SCJ]
GO
/****** Object: StoredProcedure [dbo].[spGetCHLDETAIL] Script Date: 03/05/2014 10:48:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- EXEC spGetFilteredChild '17','','','','','','','','','','','','','5','','','','','','','','',1,100
--exec spGetCHLDETAIL '','','17','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''
ALTER PROCEDURE [dbo].[spGetCHLDETAIL]
(
@DistrictID VARCHAR(250),
@barcode VARCHAR(50)
)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @FirstRow AS INT,
@LastRow AS INT,
@ChildTblName AS VARCHAR (125),
@FamilyTblName AS VARCHAR (125),
@vQuery AS NVARCHAR (MAX)
SET @ChildTblName = '[' + @DistrictID + 'Child_D' + ']';
SET @FamilyTblName = '[' +@DistrictID + 'Family_D' + ']'
CREATE TABLE #tblChildFamily
(
scanno NVARCHAR (255),
distt NVARCHAR (255),
block NVARCHAR (255),
gpmctc NVARCHAR (255),
village NVARCHAR (255),
habitation NVARCHAR (255),
location NVARCHAR (255),
residing NVARCHAR (255),
mother_ton NVARCHAR (255),
pincode NVARCHAR (255),
hhno NVARCHAR (255),
barcode NVARCHAR(255),
fname NVARCHAR (255),
mname NVARCHAR (255),
gname NVARCHAR (255),
sex NVARCHAR (255),
dob NVARCHAR (255),
social_grp NVARCHAR (255),
minority NVARCHAR (255),
total_male NVARCHAR (255),
total_fema NVARCHAR (255),
seasonal_m NVARCHAR (255),
migration_ NVARCHAR (255),
duration NVARCHAR (255),
lp NVARCHAR (255),
up NVARCHAR (255),
sec NVARCHAR (255),
catch_s_lp NVARCHAR (255),
catch_s_up NVARCHAR (255),
catch_s_se NVARCHAR (255),
cname NVARCHAR (255),
class NVARCHAR (255),
disability NVARCHAR (255),
sch_code NVARCHAR (255),
nereason NVARCHAR (255),
droupout NVARCHAR (255),
highclass NVARCHAR (255),
uid NVARCHAR(255),
);
SET @vQuery = 'SELECT Child.scanno,Child.cname,Child.distt,Child.block,Child.gpmctc,Child.village Child.habitation, Child.barcode,Child.sex,Child.dob,Family.pincode,Family.hhno,Family.fname,Family.mname,Family.gname,Family.social_grp,Family.minority,Family.total_male,Family.total_fema,Family.seasonal_m,Family.migration_,Family.duration,Family.lp,Family.up,Family.sec,Family.catch_s_lp,Family.catch_s_up,Family.catch_s_se,Child.location,
Child.residing,Child.mother_ton,Child.disability,Child.sch_code,Child.class,Child.nereason,Child.droupout,Child.highclass,Child.uid
FROM ' + @ChildTblName + ' As Child INNER JOIN ' + @FamilyTblName + ' AS Family ON
Child.barcode=Family.barcode WHERE LTRIM(RTRIM(Child.cname)) <> '''' AND Child.distt = ' + @DistrictID + '';
INSERT INTO #tblChildFamily (scanno,cname,distt,block,gpmctc,village,habitation,barcode,sex,dob,pincode,hhno,fname,mname,gname,social_grp,minority,total_male,total_fema,seasonal_m,migration_,duration,lp,up,sec,catch_s_lp,catch_s_up,catch_s_se,location,
residing,mother_ton,disability,sch_code,class,nereason,droupout,highclass,uid)
EXECUTE sp_executesql @vQuery;
--;WITH PagedGetFilteredChild
--AS (SELECT child.scanno,Child.barcode,Child.gpmctc,Child.habitation,Child.location,Child.residing,Child.mother_ton,Child.disability,Child.sch_code,Child.class,Child.nereason,Child.droupout,Child.pincode,Child.hhno,Child.fname,Child.mname,Child.gname,Child.social_grp,Child.minority,Child.total_male,Child.total_fema,Child.seasonal_m,Child.migration_,Child.duration,Child.lp,Child.up,Child.sec,child.catch_s_lp,child.catch_s_up,Child.catch_s_se,
-- Child.uid AS [Child UID],
-- child.cname AS [Child Name],
--
bindash
5-Mar-14 1:08am
View
Deleted
this is my childinfo.aspx.cs code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
namespace TrackWebApplication
{
public partial class ChildInfo : System.Web.UI.Page
{
//SqlConnection con = new SqlConnection("Data Source=SCJ-454B2938AB1\\SCJ;Integrated Security=true;Initial Catalog=SCJ");
//private long userid = 0;
private string barcode = "";
private string dstid = "";
protected void Page_Load(object sender, EventArgs e)
{
//userid = Convert.ToInt64(Request.QueryString["ChildUID"].ToString());
// userid = Convert.ToInt64(Request.QueryString["ChildUID"]);
//barcode = (Request.QueryString["CHILDCODE"]);
//dstid = (Request.QueryString["DIST_ID"]);
//lbblcde.Text = barcode;
//lbdscde.Text = dstid;
GetData();
}
private void GetData()
{
DataTable dt = new DataTable();
SqlConnection connection = new SqlConnection("Data Source=SCJ-454B2938AB1\\SCJ;Integrated Security=true;Initial Catalog=SCJ");
connection.Open();
SqlCommand Cmd = new SqlCommand();
// SqlCommand sqlCmd = new SqlCommand("select * from [17Family_D] where barcode=03338058", connection);
Cmd.Connection = connection;
Cmd.CommandType = CommandType.StoredProcedure;
Cmd.CommandText = "spGetCHLDETAIL";
////string v1 = Request.QueryString["CHILDCODE"];
////string v2 = Request.QueryString["DIST_ID"];
////sqlCmd.Parameters.AddWithValue("@barcode", v1);
////sqlCmd.Parameters.AddWithValue("@DistrictID", v2);
Cmd.Parameters.AddWithValue("@barcode", Request.QueryString["CHILDCODE"]);
Cmd.Parameters.AddWithValue("@DistrictID", Request.QueryString["DIST_ID"]);
// SqlCommand sqlCmd = new SqlCommand("SELECT * FROM [17Family_D]", connection);
SqlDataAdapter da=new SqlDataAdapter(Cmd);
da.Fill(dt);
if (dt.Rows.Count > 0)
{
lbdscde.Text = dt.Rows[0]["distt"].ToString();
lbblcde.Text = dt.Rows[0]["block"].ToString();
lbgpcde.Text = dt.Rows[0]["gpmctc"].ToString();
lbvlcde.Text = dt.Rows[0]["village"].ToString();
lbhbcde.Text = dt.Rows[0]["habitation"].ToString();
lblocde.Text = dt.Rows[0]["location"].ToString();
lbchrcde.Text = dt.Rows[0]["residing"].ToString();
lbmtcde.Text = dt.Rows[0]["mother_ton"].ToString();
lbpncde.Text = dt.Rows[0]["pincode"].ToString();
lbhsno.Text = dt.Rows[0]["hhno"].ToString();
lbfthr.Text = dt.Rows[0]["fname"].ToString();
lbmthr.Text = dt.Rows[0]["mname"].ToString();
lbgrdn.Text = dt.Rows[0]["gname"].ToString();
lbscgp.Text = dt.Rows[0]["social_grp"].ToString();
lbmtcde.Text = dt.Rows[0]["minority"].ToString();
lbmle.Text = dt.Rows[0]["total_male"].ToString();
lbfmle.Text = dt.Rows[0]["total_fema"].ToString();
lbscmg.Text = dt.Rows[0]["seasonal_m"].ToString();
lbmgtyp.Text = dt.Rows[0]["migration_"].ToString();
lbdrmg.Text = dt.Rows[0]["duration"].ToString();
lbnhscll.Text = dt.Rows[0]["lp"].ToString();
lbnhsclu.Text = dt.Rows[0]["up"].ToString();
lbnhsclsc.Text = dt.Rows[0]["sec"].ToString();
lbctscll.Text = dt.Rows[0]["catch_s_lp"].ToString();
lbctsclU.Text = dt.Rows[0]["catch_s_up"].ToString();
lbctsclsc.Text = dt.Rows[0]["catch_s_se"].ToString();
// lbc
bindash
5-Mar-14 1:08am
View
Deleted
this is my childinfo.aspx.cs code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
namespace TrackWebApplication
{
public partial class ChildInfo : System.Web.UI.Page
{
//SqlConnection con = new SqlConnection("Data Source=SCJ-454B2938AB1\\SCJ;Integrated Security=true;Initial Catalog=SCJ");
//private long userid = 0;
private string barcode = "";
private string dstid = "";
protected void Page_Load(object sender, EventArgs e)
{
//userid = Convert.ToInt64(Request.QueryString["ChildUID"].ToString());
// userid = Convert.ToInt64(Request.QueryString["ChildUID"]);
//barcode = (Request.QueryString["CHILDCODE"]);
//dstid = (Request.QueryString["DIST_ID"]);
//lbblcde.Text = barcode;
//lbdscde.Text = dstid;
GetData();
}
private void GetData()
{
DataTable dt = new DataTable();
SqlConnection connection = new SqlConnection("Data Source=SCJ-454B2938AB1\\SCJ;Integrated Security=true;Initial Catalog=SCJ");
connection.Open();
SqlCommand Cmd = new SqlCommand();
// SqlCommand sqlCmd = new SqlCommand("select * from [17Family_D] where barcode=03338058", connection);
Cmd.Connection = connection;
Cmd.CommandType = CommandType.StoredProcedure;
Cmd.CommandText = "spGetCHLDETAIL";
////string v1 = Request.QueryString["CHILDCODE"];
////string v2 = Request.QueryString["DIST_ID"];
////sqlCmd.Parameters.AddWithValue("@barcode", v1);
////sqlCmd.Parameters.AddWithValue("@DistrictID", v2);
Cmd.Parameters.AddWithValue("@barcode", Request.QueryString["CHILDCODE"]);
Cmd.Parameters.AddWithValue("@DistrictID", Request.QueryString["DIST_ID"]);
// SqlCommand sqlCmd = new SqlCommand("SELECT * FROM [17Family_D]", connection);
SqlDataAdapter da=new SqlDataAdapter(Cmd);
da.Fill(dt);
if (dt.Rows.Count > 0)
{
lbdscde.Text = dt.Rows[0]["distt"].ToString();
lbblcde.Text = dt.Rows[0]["block"].ToString();
lbgpcde.Text = dt.Rows[0]["gpmctc"].ToString();
lbvlcde.Text = dt.Rows[0]["village"].ToString();
lbhbcde.Text = dt.Rows[0]["habitation"].ToString();
lblocde.Text = dt.Rows[0]["location"].ToString();
lbchrcde.Text = dt.Rows[0]["residing"].ToString();
lbmtcde.Text = dt.Rows[0]["mother_ton"].ToString();
lbpncde.Text = dt.Rows[0]["pincode"].ToString();
lbhsno.Text = dt.Rows[0]["hhno"].ToString();
lbfthr.Text = dt.Rows[0]["fname"].ToString();
lbmthr.Text = dt.Rows[0]["mname"].ToString();
lbgrdn.Text = dt.Rows[0]["gname"].ToString();
lbscgp.Text = dt.Rows[0]["social_grp"].ToString();
lbmtcde.Text = dt.Rows[0]["minority"].ToString();
lbmle.Text = dt.Rows[0]["total_male"].ToString();
lbfmle.Text = dt.Rows[0]["total_fema"].ToString();
lbscmg.Text = dt.Rows[0]["seasonal_m"].ToString();
lbmgtyp.Text = dt.Rows[0]["migration_"].ToString();
lbdrmg.Text = dt.Rows[0]["duration"].ToString();
lbnhscll.Text = dt.Rows[0]["lp"].ToString();
lbnhsclu.Text = dt.Rows[0]["up"].ToString();
lbnhsclsc.Text = dt.Rows[0]["sec"].ToString();
lbctscll.Text = dt.Rows[0]["catch_s_lp"].ToString();
lbctsclU.Text = dt.Rows[0]["catch_s_up"].ToString();
lbctsclsc.Text = dt.Rows[0]["catch_s_se"].ToString();
// lbc
bindash
5-Mar-14 1:01am
View
sir id is passed.. new problem is occured.
Incorrect syntax near '.'.
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.Data.SqlClient.SqlException: Incorrect syntax near '.'.
Source Error:
Line 51:
Line 52: SqlDataAdapter da=new SqlDataAdapter(Cmd);
Line 53: da.Fill(dt);
Line 54: if (dt.Rows.Count > 0)
Line 55: {
Source File: D:\ANIL\20012014 update-17-2\TrackSystem\TrackWebApplication\ChildInfo.aspx.cs Line: 53
bindash
4-Mar-14 5:36am
View
value is passed in query string.. i check it..
sqlCmd.Parameters.AddWithValue("@barcode", Request.QueryString["CHILDCODE"].Tostring());
sqlCmd.Parameters.AddWithValue("@DistrictID", Request.QueryString["DIST_ID"].Tostring());
it is not working..
same problem is occured
bindash
3-Mar-14 6:58am
View
the error is:
Procedure or function 'spGetCHLDETAIL' expects parameter '@DistrictID', which was not supplied.
bindash
3-Mar-14 6:58am
View
Procedure or function 'spGetCHLDETAIL' expects parameter '@DistrictID', which was not supplied.
bindash
3-Mar-14 6:55am
View
the error is:
Procedure or function 'spGetCHLDETAIL' expects parameter '@DistrictID', which was not supplied.
bindash
3-Mar-14 1:37am
View
what is dl in ur code
bindash
3-Mar-14 1:37am
View
Deleted
sir i m using store procedure.. then how to use this value(code and distt) in store procedure
bindash
27-Feb-14 1:03am
View
error: the server tag in not well formed
Show More