Wrox Programmer Forums
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 10th, 2011, 01:48 AM
Authorized User
Points: 410, Level: 7
Points: 410, Level: 7 Points: 410, Level: 7 Points: 410, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Oct 2009
Posts: 72
Thanks: 17
Thanked 0 Times in 0 Posts
Thumbs up Uniqueidentifier datatype issue


I have a column in my database table named EMP_ID which is of uniqueidentifier datatype & generated automatic values by (newid()).

And i have records of employees in same table for e.g. full name, birthdate, photourl, etc. EMP_ID is primary key.

i have 2 .aspx pages.
Home page shows only list of names of employees , SO i have taken a Gridview & there is a LABEL & LINK BUTTON in GridView. LABEL shows the NAME of EMPLOYEE & On clicking on LINK BUTTON , i am running a method which redirects user to 2nd page i.e. EmplyeeDetails.aspx page as follows:-

public void View_Details(object Src, CommandEventArgs Args)
Response.Redirect("EmployeeDetail.aspx?emp_id=" + Args.CommandName);

In the 2nd page i again have a GridView which shows details of the Employee selected on 1st page based on querystring. But the records are not shown. I get an empty GridView. I can see the EMP_ID in the URL as follows:-


But the records are not shown. The emp_id is perfectly correct.

How to solve this issue.

Pls Help Me.

Thank U.....
Old June 14th, 2011, 03:21 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik

first of all: i dont think that Guid is good option for PK & ur employee number
but anyway, make sure u get the emp_id's value from QueryString.
trace there & see if its ok, so if it is problem must be in ur loading in EmployeeDetail.aspx page
Hovik Melkomian.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is uniqueidentifier is always unique ? vinod_yadav1919 SQL Server 2000 4 May 30th, 2008 11:31 AM
Use of UNIQUEIDENTIFIER ggandta BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 2 March 9th, 2007 01:52 PM
Issue with float and currency datatype prabodh_mishra SQL Server 2000 10 December 6th, 2006 03:30 AM
Uniqueidentifier to Integer Conversion mp01 BOOK: Beginning VB.NET Databases 2 August 8th, 2005 06:57 PM
datatype ngang SQL Language 1 November 18th, 2003 09:55 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.