GUID key fields and GridView/DetailView

G

Guest

After working on this for the past three days!!

1. I build a simple table in sql server 2005
TestID (int, auto increment) (key)
TestText (nvchar,10)

2. In visual studio 2005, I build a simple dataset, using one tableadapter
based on the test table, select both fields, and use the wizard to build the
get, update,insert, delete queries.

3. save and compile

4. build a new web page, default.aspx

5. add an objectdatasource based on the table adapter above

6. add a GridView and link to the objectdatasource above

7. Save and compile

8. run

9. It works!!!!

10. Repeat all of the steps above with the ONLY difference that I set the
key field (testID) to a replication type (GUID).

IT FAILS with the error:

"Could not find a property named 'TestText' on the type specified by the
DataObjectTypeName property in ObjectDataSource 'ObjectDataSource1'"

Question: Am I the only one that can't figure out why this is happening?

What is going on here?

It would appear that the Gridview does not properly handle the GUID object
and I might need to do some string-->guid and/or guid--> string conversion.

My problem is that I don't know where to do this (maybe in the onupdating
event)

The only work around I have found is to capture the returned values manually
in the onupdating event of the GridView and manually pushing the data around.
This goes against the grain of the IDE concept.

Note: Changing the key type in my production database is just not an option!

Ideas, experience -- please!!
 

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,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top