Error create DataAdapter with Config wizard.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi
I was trying to use following query to create Data Adapter
SELECT DISTINCT Orders.OrderID, Orders.CustomerID, Orders.EmployeeID, Customers.CompanyName, Customers.Address, Customers.City FROM Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerI

Error always happen with
--------------------------
Primary Key Columns Missin
--------------------------
The wizard can not automatically create queries for updating the database because your query does not include some primary key columns. Do you wish to add the primary key columns to your query

Please suggest how can I fix it
rgds
Fish.
 
Hi,

Wizard needs primary key to create update/delete/insert commands.
You might add a primary key to your table (which is always a good thing) or
you might create your commands manually after wizard has finised (or even
without it).

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

A.Fish said:
hi,
I was trying to use following query to create Data Adapter:
SELECT DISTINCT Orders.OrderID, Orders.CustomerID, Orders.EmployeeID,
Customers.CompanyName, Customers.Address, Customers.City FROM Customers
INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID
Error always happen with:
because your query does not include some primary key columns. Do you wish to
add the primary key columns to your query?
 
Hi
I was missing. The table are Primarykey ready, in fact they're Northwind sample DB. Why I was still warn of missing Primary key

Plus, I was able to create the command manually every time but my question was if the Wizard can do it for me( that's the value for the wizard). Am I right

rgds
Fish.
 
Hi,

Try without INNER JOIN.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

A.Fish said:
Hi,
I was missing. The table are Primarykey ready, in fact they're Northwind
sample DB. Why I was still warn of missing Primary key?
Plus, I was able to create the command manually every time but my question
was if the Wizard can do it for me( that's the value for the wizard). Am I
right?
 
Back
Top