Linking gridview and detailsview with Guids

E

et

I have a gridview where the datasource is a list of products, and the
product id is a guid. The details view is the a list of the product
details. If all the select commands are internal to the application, it
runs fine, but if I put the select commands ina stored procedure, I get
errors: If I make the details view datasources control parameter an object,
I get this error: System.Data.SqlClient.SqlException: Implicit conversion
from data type sql_variant to varchar is not allowed. Use the CONVERT
function to run this query.

If I make the details view datasources control parameter a string, I get
this error:
Object must implement IConvertible.

How do I fix this? I've even tried using convert in the stored procedure
"Convert(varchar(50), ID)"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top