-
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
Jeremy
-
Try this:
addVideoDA.SelectCommand.Parameters.Add("@zoneid", SqlDbType.UniqueIdentifier).Value = New Guid(SelectZoneID.SelectedValue)
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
thanks
thanks... that did the trick...
Similar Threads
-
By mdengler in forum ASP.NET
Replies: 0
Last Post: 11-26-2002, 02:32 PM
-
By Fred Mayes in forum Java
Replies: 1
Last Post: 06-05-2001, 06:12 AM
-
By Julian Milano in forum VB Classic
Replies: 2
Last Post: 08-11-2000, 12:11 PM
-
By chandra in forum VB Classic
Replies: 0
Last Post: 06-22-2000, 07:36 AM
-
By Robert Rieth in forum VB Classic
Replies: 1
Last Post: 04-11-2000, 03:21 AM
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
|
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
|
Bookmarks