"Conversion failed when converting from a characte

cript

New Member
This is probably a simple wuestion but i would appreciate some help<BR>I am trying to get and insert the userId into a table called "Orders"<BR><BR>I got the user id as<BR><BR> Dim CustomerId As Object = Membership.GetUser(User.Identity.Name).ProviderUse rKey.ToString<BR><BR>The button on click command is <BR><BR> worldshop.ShoppingCart.CreateOrder(CustomerId,.... .....................<BR><BR>The Function Has the parameter for Customer Id as follows <BR><BR>Dim dbParam_CustomerId As System.Data.IDataParameter = New System.Data.SqlClient.SqlParameter<BR> dbParam_CustomerId.ParameterName = "@CustomerId"<BR> dbParam_CustomerId.Value = http://aspmessageboard.com/archive/index.php/CustomerId<BR> dbParam_CustomerId.DbType = System.Data.DbType.String<BR> command.Parameters.Add(dbParam_CustomerId)<BR><BR>When i run this I am getting the error message<BR><BR>"Conversion failed when converting from a character string to uniqueidentifier."<BR><BR>Can anyone tell me where I am going wrong<BR><BR><BR>many thanks<BR><BR>MartinDebug!<BR><BR>Looks to me like you're passing in a string and something somewhere is expecting a GUID.<BR><BR>So, what string are you passing in for "CustomerID"? What type is the @CustomerID parameter in the stored procedure?<BR><BR>Craig.Thank you for your reply<BR><BR>The stored procedure is char 36 which i have used with other guids...and the rest of the debug that I asked for?<BR><BR>Come on, we're not psychic.<BR><BR><BR>Craig.Thank you for your reply
 
Back
Top