I have a value that was a GUID converted to string and stored in the DB. I
need to get that value back into a Guid, how can i do that? Do something
like (System.Guid)<G UIDStringVariab le> does not work. Thanks.
DOug 6 1440
Can help you, but I am intriged to know why you want to do that.
"Doug" <dk*******@hotm ail.com> wrote in message news:eC******** ******@TK2MSFTN GP11.phx.gbl... I have a value that was a GUID converted to string and stored in the DB. I need to get that value back into a Guid, how can i do that? Do something like (System.Guid)<G UIDStringVariab le> does not work. Thanks.
DOug
There is a constructor for Guid that accepts a string-parameter.
A different solution could be to directly store the guid
(datatype uniqueidentifie r in sqlserver)
Hans Kesting
new Guid(GUIDString Variable);
Yanick
Doug wrote: I have a value that was a GUID converted to string and stored in the DB. I need to get that value back into a Guid, how can i do that? Do something like (System.Guid)<G UIDStringVariab le> does not work. Thanks.
DOug
I knew it was simple - have to stop working so early in the morning; my mind
doesn't work. Thanks.
"Yanick Beaudet" <ya************ @centaurnet.co. uk> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. .. new Guid(GUIDString Variable);
Yanick
Doug wrote:
I have a value that was a GUID converted to string and stored in the DB. I need to get that value back into a Guid, how can i do that? Do something like (System.Guid)<G UIDStringVariab le> does not work. Thanks.
DOug
Hans,
Ya I know - the table that I'm using the original developer created it as a
string (his code populated the GUID as a string). So sql srvr can't convert
it back to GUID once it's a string unless the table is empty. Which then
means that i won't be able to convert the id back, etc....you get the point.
Thanks.
"Hans Kesting" <ne***********@ spamgourmet.com > wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. .. "Doug" <dk*******@hotm ail.com> wrote in message news:eC******** ******@TK2MSFTN GP11.phx.gbl... I have a value that was a GUID converted to string and stored in the DB. I need to get that value back into a Guid, how can i do that? Do something like (System.Guid)<G UIDStringVariab le> does not work. Thanks.
DOug
There is a constructor for Guid that accepts a string-parameter. A different solution could be to directly store the guid (datatype uniqueidentifie r in sqlserver)
Hans Kesting
Josh,
See my streams to the others...
"Josh" <so*****@micros oft.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. .. Can help you, but I am intriged to know why you want to do that.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ilija_G |
last post by:
Hi,
Is there any replace for "Select @@identity" that could return "just
inserted" GUID as a primary key?
Has anyone tested what's faster, working with Guid or Autonumber ?
|
by: Louis Frolio |
last post by:
Greetings All, I have read many upon many articles here regarding GUID
data types and uniqueness. There have been many opinions regarding
the effectiveness of GUID's and when they should/should not be used.
However, every article strongly implies, if it does not state it
outright, that GUID's are always unique. My question is this, what
happens if you have a database that uses GUID's and the NIC is changed
out on the box? From what I...
|
by: rh |
last post by:
Hi
I have some problem with GUID
when I debug this lin
myguid=Guid.NewGuid(); I found some value in watch.
System.ValueType =
_a = -78434454
_b ,_c,_d ... to _k with specific value
After that the next line System.Writeline(myguid), the value is differenct with watch value
d13fda1f-4846-46ba-ae45-b47545107f1
|
by: ME |
last post by:
I am developing a kind of plugin framework that I can use for several
applications I want to make. In order to identify individual plugins I am
currently doing something like the code below (example only. Note that the
host has a collection of IPlugin's from which to look for the ID.).
Obviously you can tell that each plugin object will have the overhead of the
ID. The question is, which consumes more overhead? A string object or a...
|
by: headware |
last post by:
Is the GUID generated by the .NET System.Guid.NewGuid() function
compatible with Access' Replication ID field type?
Dave
| |
by: www.dir |
last post by:
Hi,
The following is from MSDN.
"A GUID is a 128-bit integer (16 bytes) that can be used across all
computers and networks wherever a unique identifier is required. Such
an identifier has a very low probability of being duplicated."
My application will crush if I have two or more number that are
identical, so I need to know do I need to worry about this"
|
by: John Grandy |
last post by:
Is it possible to generate a 20 byte integer from a GUID that is "unique
enough" ( just like a GUID is not truly unique , but is "unique enough" ).
We identify transactions with GUIDs , but a partner web service has a 20
byte limit on transaction ID passed.
|
by: Sky |
last post by:
Hello,
The books on C# I have read talk of using the DataSets in disconnected mode,
and Adding/Removing/Updating records from it, and letting it handle all the
updating on the Database in one batch finale...
But the examples were all based on using auto-increment columns.
Lately I've been backing away from Auto-Increment columns to move to
'uniqueidentifier' guid columns instead for my Key columns -- to allow for
better synching arch....
|
by: stjulian |
last post by:
IN IIS 6.0, classic .asp
I have been creating new GUID's through this block of code
set typ = server.createobject("Scriptlet.TypeLib")
guid = TRIM(MID(cstr(typ.GUID),2,36))
Response.Cookies("guid") = guid
Response.Cookies("guid").path = "/"
Response.Cookies("guid").expires = now() + 1
set typ = nothing
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |