Dataadapter for SQL view

V

Vik

In SQL Server, there is a table with PK and a simple view sorting this
table.
In designer, I create a dataadapter based on this view and get an error
message for Update and Delete statements:
"Could not determine which columns uniquely identify the rows".

What is wrong here?

Thank you.
 
G

Guest

That is normal with a View. You will have to create the SQL statements (or
better, stored procedures) for INSERT, UPDATE and DELETE from scratch when
you are using a view.

The issue here is a View can be made up of many tables, joined with complex
joins. While it would be nice for VS.NET to unravel the table joins, it is of
limited value as most customers will use a simpler approach. In your case,
you are not doing anything complex, and it would be easy to discern, but most
people use views to either aggregate or join.

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 

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

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,139
Latest member
JamaalCald
Top