Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rtutus
Aged Yak Warrior
522 Posts |
Posted - 2006-02-27 : 23:44:23
|
difficulty with updating my database using datasetI m coding with VB.Net. I have a datagrid on my form with a dataset as its datasource.The dataset contains rows from a joined two tables: Feature table and Price table.Feature table contains the customers'features. It has the ID of the features, the date the feature was added, the expiry date, the employee who added it....The Price table is a look up table that contains the ID,price, Code, description and name of each feature.So my SQLquery is: SelectFeature_ID,Feature_DateEfect,Feature_DateExpiry,Feature_Employe, Price_Name, Price_Code, Price_Name...The reason why I use that joined query is that I need to display all the columns on my datagrid including the values from the Price look up table. But I update only the Feature table without modifying the Price which is a look up table. How do I send my modifications that I have on my datagrid (and therefore on my dataset) to the Feature table.Because I get this error message: Update requires a valid UpdateCommand when passed DataRow collection with modified rows.What am I doing wrong. Should I change my design for better data update practice and datagrid display.Thanks a lot for your help. |
|
rtutus
Aged Yak Warrior
522 Posts |
Posted - 2006-02-28 : 02:05:31
|
i was missing the update command. now my dataadapter is working even when my initial select command is based on joined tables.I ll check how i m gonna implement my update using stored proc since I m using a dataset and datagrid and not just a sqlcommand for my database update |
 |
|
|
|
|