473,385 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

uniqueidentifier

SMG
Hi all,
I created one table with following structure, and bound the same with a
DataGird.

But I am not able to see any column which is having 'uniqueidentifier' as
datatype.

Name DataType
ID uniqueidentifier
UID uniqueidentifier
CatID uniqueidentifier
CustName Varchar
CustAdd Varchar

A help will be appreciated.

Shailesh
Nov 18 '05 #1
3 2171
On Wed, 18 Aug 2004 18:03:10 +0530, SMG wrote:
Hi all,
I created one table with following structure, and bound the same with a
DataGird.

But I am not able to see any column which is having 'uniqueidentifier' as
datatype.

Name DataType
ID uniqueidentifier
UID uniqueidentifier
CatID uniqueidentifier
CustName Varchar
CustAdd Varchar

A help will be appreciated.

Shailesh


uniqueidentifier is stored as System.Guid in a dataset you should call a
..Tostring method somewhere in your design.

- Oytun YILMAZ
Nov 18 '05 #2
SMG
No it doesn't work...

I created another table with just a single uniqueidentifier field,
Name DataType
ID uniqueidentifier
CustName Varchar
CustAdd Varchar

and in itemdatabound of datagrid i wrote following lines
private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
e.Item.Cells[0].Text = e.Item.Cells[0].Text.ToString();
}

It still doesn't show the first column....
// is it the right place to write the code.. and what ever i have written is that OK? or something else also i have to write.

thanks Oytun for prompt reply...
Regards,
Shailesh


"Oytun YILMAZ" <oyilmaz@_REMOVE_veripark.com> wrote in message news:1f******************************@40tude.net.. .
On Wed, 18 Aug 2004 18:03:10 +0530, SMG wrote:
Hi all,
I created one table with following structure, and bound the same with a
DataGird.

But I am not able to see any column which is having 'uniqueidentifier' as
datatype.

Name DataType
ID uniqueidentifier
UID uniqueidentifier
CatID uniqueidentifier
CustName Varchar
CustAdd Varchar

A help will be appreciated.

Shailesh


uniqueidentifier is stored as System.Guid in a dataset you should call a
.Tostring method somewhere in your design.

- Oytun YILMAZ
Nov 18 '05 #3
On Wed, 18 Aug 2004 18:52:44 +0530, SMG wrote:
No it doesn't work...

I created another table with just a single uniqueidentifier field,
Name DataType
ID uniqueidentifier
CustName Varchar
CustAdd Varchar

and in itemdatabound of datagrid i wrote following lines
private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
e.Item.Cells[0].Text = e.Item.Cells[0].Text.ToString();
}

It still doesn't show the first column....
// is it the right place to write the code.. and what ever i have written is that OK? or something else also i have to write.

thanks Oytun for prompt reply...
Regards,
Shailesh


"Oytun YILMAZ" <oyilmaz@_REMOVE_veripark.com> wrote in message news:1f******************************@40tude.net.. .
On Wed, 18 Aug 2004 18:03:10 +0530, SMG wrote:
> Hi all,
> I created one table with following structure, and bound the same with a
> DataGird.
>
> But I am not able to see any column which is having 'uniqueidentifier' as
> datatype.
>
> Name DataType
> ID uniqueidentifier
> UID uniqueidentifier
> CatID uniqueidentifier
> CustName Varchar
> CustAdd Varchar
>
> A help will be appreciated.
>
> Shailesh


uniqueidentifier is stored as System.Guid in a dataset you should call a
.Tostring method somewhere in your design.

- Oytun YILMAZ


Hi,

I got it working like this:

Protected Function GetGUIDText(ByVal guid As Guid) As String
Return guid.ToString
End Function

<asp:DataGrid id="DataGrid1" runat="server" AutoGenerateColumns="False">
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:Label runat="server" Text='<%# GetGUIDText(DataBinder.Eval(Container,
"DataItem.mYcOLUMN")) %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>

- Oytun YILMAZ
Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Bernie | last post by:
Greetings, I have 3 servers all running SQL Server 2000 - 8.00.818. Lets call them parent, child1, and child 2. On parent, I create a view called item as follows: CREATE view Item as...
1
by: Vinny | last post by:
Can anyone help me with this strange problem please? I have a stored procedure, with a parameter defined as a uniqueidentifier. The procedure does a select with a number of joins, and filters...
4
by: Jacques Wentworth | last post by:
Hi I have the following problem. I have a SQL Server (2000) Stored Proc that with 4 parameter (one being @UnlockKey uniqueidentifier OUTPUT). I run it from Query Analyzer and the @Key parameter...
4
by: christopher.secord | last post by:
I have a table that contains articles (as in, newspaper articles, blog articles, whatever). I need to use a column of type uniqueidentifier because one of the requirements is that I be able to...
1
by: Scott M. Lyon | last post by:
I've got a stored procedure that takes a few parameters as input parameters, and one output parameter (a uniqueidentifier). After the stored procedure call, I need to return that output parameter...
1
by: Scott M. Lyon | last post by:
I've got a stored procedure that takes a few parameters as input parameters, and one output parameter (a uniqueidentifier). After the stored procedure call, I need to return that output parameter...
1
by: dawg1998 | last post by:
I am attempting to create a record that has a uniqueidentifier datatype. I am receiving the following error each time I attempt the Insert: Incorrect syntax near '-' The following is the code...
5
by: DotNetNewbie | last post by:
Hi, I am developing an application that has to scale and be very efficient, and I am using asp.net membership in my application. I set things up in my Users table (it has extra columns that I...
8
by: =?Utf-8?B?QW5kcmV3?= | last post by:
Vb.net 2005 app I am looking up records in a sql 2005 database and I grab the uniqueidentifier and put it into a variable (gID) of type GUID. When I try to create a new record in a new table...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.