when i try to retrieve data from multiple tables and display the data in a datagrid it does nt display all the records i.e., it misses some of the record.what cud b d reason.below is my code:-

dbcon.start_connection()

ds = dbcon.getdataset("Select DISTINCT casemas.CaseID as ID, tblCourtType.CourtType as Court, casemas.CaseNo as Case_No, District.d_name as Location, lower(casemas.FirstParty) as FstParty, lower(casemas.SecondParty) as SndParty, lower(casemas.BriefDetails) as Case_History, casemas.CaseDropped as Dropp, casedet.CSPN as PN0, casedet.ReceiptDate as Receipt, lower(cast(casedet.ActionToBeTaken as nvarchar)) as Desired_Action, casedet.DueDateofAction as DueDate, lower(casedet.ActionTaken) as ActionTaken, Department.dept_name as Dept from casemas RIGHT JOIN casedet on (casemas.CaseID=casedet.CaseID)RIGHT JOIN caseret on (casemas.CaseID=caseret.CaseID)INNER JOIN tblCourtType on (casemas.CourtType=tblCourtType.CourtID)INNER JOIN District on (casemas.L_occur=District.d_cd) INNER JOIN desig on (caseret.Mrkdesgcd=desig.desig_cd)INNER JOIN Department on (caseret.MrkDept=Department.dept_cd) where casemas.CaseID='" & mchoice & "' and casedet.NextHearingDate= '" & Label17.Text & "' order by casemas.CaseID,casedet.CSPN")

DataGrid1.DataSource = ds.Tables(0)
DataGrid1.DataBind()
dbcon.close_connection()


dbcon is a connection object and ds a dataset.

your help will be appreciated

1.Test the query
2.Check whether data is available in the table

it is available.i hv tested it.the problem is that for eg it will display record 1,2 , 4,5,9.it misses records in between as in the eq it misses record no 3,6,7,8.

use item type and alternating item .. so it ll all the records

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.