|
-
Oct 30th, 2003, 03:54 AM
#1
Thread Starter
Junior Member
Get the GUID from a Dataset
Hi There
I've got the following problem. My Database (SQL 2000) uses Global Unique ID's as row ID's. At the moment I can retrieve these ID's with a datagrid using the datakeyfield and datakeys properties. This works great. But I now need to get the Guid of a certain row, without binding it to a datagrid first.
I'm thinking along the lines of using a datarow, and then using one of it's properties to somehow give me the GUID for that row.
Any ideas?
It was an electrical problem sir, a conrod went through the block, and knocked the distributer off.
-
Oct 30th, 2003, 06:15 AM
#2
Lively Member
Why dont you give me some Coding examples of the exersize you gave me then maybe ill be able to help you
High hopes go to all that looks down!!!
-
Oct 30th, 2003, 08:20 AM
#3
Thread Starter
Junior Member
I figured it out...
Dim myConnection As New SqlClient.SqlConnection(Connectionstring)
Dim myCommand As New SqlClient.SqlCommand(strSelect, myConnection)
myConnection.Open()
Dim Reader As SqlClient.SqlDataReader = myCommand.ExecuteReader
Reader.Read()
GetGuid = Reader.GetSqlGuid(0).Value
myConnection.Close()
myConnection.Dispose()
Voila!
It was an electrical problem sir, a conrod went through the block, and knocked the distributer off.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|