Help Converting a String Value to a GUID
I have a form which holds values formatted as GUID's. When the form is submitted the selected value from the drop down list is inserted into a SQL table and should hold the uniqueidentifier value type. However because the value from the form is a string i am having trouble matching data types...
Does anyone know how to convert a properly formated string to a guid.
Here is the actual code where the parameter is being set up for the stored procedure.
VB Source Code
addVideoDA.SelectCommand.Parameters.Add("@zoneid", SqlDbType.UniqueIdentifier).Value = SelectZoneID.SelectedValue
I am fairly new to asp.net and could use all the help i can get.
Thanks in advance
addVideoDA.SelectCommand.Parameters.Add("@zoneid", SqlDbType.UniqueIdentifier).Value = New Guid(SelectZoneID.SelectedValue)
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
thanks... that did the trick...
By mdengler in forum ASP.NET
Last Post: 11-26-2002, 02:32 PM
By Fred Mayes in forum Java
Last Post: 06-05-2001, 06:12 AM
By Julian Milano in forum VB Classic
Last Post: 08-11-2000, 12:11 PM
By chandra in forum VB Classic
Last Post: 06-22-2000, 07:36 AM
By Robert Rieth in forum VB Classic
Last Post: 04-11-2000, 03:21 AM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL