ASP Datagrid rows appear twice

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'll try to initially ask this question without posting too much detail. I
have an asp.net datagrid that lists each row twice. What could cause this?
If you require additional information, please let me know and I'll be glad to
post it.

Thanks.
 
The most normal reason is the lack of DISTINCT in a query with a JOIN
condition. Without seeing code, I cannot think of anything else that might
cause this issue.

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
Cowboy, Here's the stored procedure which is populating the datagrid. Is
there anything I can do to fix this? Thanks.

CREATE PROCEDURE dbo.spBundlesSelect
(
@Parameter1 varchar(50)
)
AS
SET NOCOUNT ON;

SELECT tblBundles.*, tblLogs.*, lkup_CutType.Cut, lkup_Specie.*,
lkup_Thickness.*, tblEmployees.Name,
lkup_Figure.Figure, lkup_Grade.Grade, lkup_Vendors.*

FROM dbo.tblBundles INNER JOIN
dbo.tblLogs ON dbo.tblBundles.FlitchNum =
dbo.tblLogs.FlitchNum INNER JOIN
dbo.lkup_CutType ON dbo.tblLogs.CutID =
dbo.lkup_CutType.CutID INNER JOIN
dbo.lkup_Thickness ON dbo.tblLogs.ThicknessID =
dbo.lkup_Thickness.ThicknessID INNER JOIN
dbo.tblEmployees ON dbo.tblLogs.WhoOrderedID =
dbo.tblEmployees.EmployeeID INNER JOIN
dbo.lkup_Specie ON dbo.tblLogs.SpecieID =
dbo.lkup_Specie.SpecieID INNER JOIN
dbo.lkup_Figure ON dbo.tblLogs.FigureID =
dbo.lkup_Figure.FigureID INNER JOIN
dbo.lkup_Grade ON dbo.tblLogs.GradeID =
dbo.lkup_Grade.GradeID INNER JOIN
dbo.lkup_Vendors ON dbo.tblLogs.VendorID = dbo.lkup_Vendors.VendorID

WHERE (tblBundles.FlitchNum = @Parameter1)

ORDER BY right(replicate(' ', 10) + tblBundles.BundleID + replicate(' ',
isnumeric(right(tblBundles.BundleID, 1))), 10) /*Necessary to sort by
bundleIDs w/ ...t... ...b...*/
GO
 
The problem was actually that my SQLDataAdapter was being filled twice. I
corrected that and the datagrid stops showing tuplicate data. Thank you both
for your assistance!
 
Back
Top