Microsoft
Software
Hardware
Network
Question : Asp.Net Conversion failed when converting from a character string to uniqueidentifier.
this is my string:
SelectCommand="SELECT '' as UserId, '' as [Company], '' as [WebSiteUrl] UNION SELECT UserId, Company, WebSiteUrl FROM [UserProfile] ORDER BY [Company]">
this is my error:
--------------------------
----------
----------
----------
----------
----------
----
Conversion failed when converting from a character string to uniqueidentifier.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlE
xception: Conversion failed when converting from a character string to uniqueidentifier.
--------------------------
----------
----------
----------
----------
----------
------
this portion of my code: can be: '' as UserId or '0' as UserId that for a string or a int
I do not know what it would take to convert the Guid to a string as to replace '' as UserId.
Answer : Asp.Net Conversion failed when converting from a character string to uniqueidentifier.
how about this one:
SelectCommand="SELECT '"+Guid.Empty.ToString()+"
' as UserId, '' as [Company], '' as [WebSiteUrl] UNION SELECT UserId, Company, WebSiteUrl FROM [UserProfile] ORDER BY [Company]"
Random Solutions
The operating system is not presently configured to run this application - App-V... Office 2007...
Issue with Exchange 2010 GAL
Is it possible to run rds 2008 r2 RemoteAPP web access in a Macintosh?
Computers dropping off the network
Problems to install MS SQL 2005 standard edition on Windows server 2008 Enterprise 64bits
PDF in iPad
Citrix: Pre-configure Internet Explorer browser settings for the users
How to Resolve the Type Mismatch Error in Sql Query using VBA Macros
Wireless over a 1175' max distance... antenna choice?
SQL Function (scaler) totaling