Re: insufficient key column information for updating or refreshing



I have a TAdoDataset that uses a couple of MS SQL 2k views as the datasource
(inner joined). The views themselves are a bit complex. The final result
returns columns that include the primary key of one of the base tables and
the rows that are returned are absolutley unique. There is no possibility of
duplication. I am able to navigate the grid that displays the dataset
without any trouble. The grid is not editable of course because the data
source is too complex. There are a couple of instances on this form where I
need to refresh the dataset. When I do so I get "insufficient key column
information for updating or refreshing"

If I set the dataset to active = false and turn it on again that works fine
but I really don't want to do that.
Use TadoDataset.Requery instead of TadoDataset.Refresh

I just need to refresh it so that a
couple of the columns are updated with new numbers. What can I do to get
refresh to work? Is there a way to use TBetterAdo here that would solve my
problem?
Maybe TBetterAdoDataset will work for you here. It allows for you to easily
attach a Resync Command which is what you need to use Resyc with any Join

--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.



Relevant Pages

  • Re: merge on datasets from join queries
    ... The source and destination datasets are being filled by the same stored ... join and Help said that you need to add a primary key for outer joins (they ... Glenn ... > yes it can be used to refresh data from the database. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Calculation of balance
    ... Is it that I keep a primary key for purchase_item so that each record will have an unique reference and I keep the key as a foreign key in the corresponding record in the goods_received table? ... the Grid control that uses the alias as its .RecordSource. ... User then use the cmdCheckIn button to add item into the lower grid, basically, it copy the PO item details on the upper grid and write it into the lower grid. ... There is a balance column on the lower grid which is supposed to automatically calculate the balance. ...
    (microsoft.public.fox.vfp.forms)
  • Re: help with microsoft ADO control/True DB Grid
    ... AutoNumber key and let it be the Primary Key. ... >> update data from a table that is in an Access 2003 database. ... >> The grid has ADODC1 selected as its data source. ...
    (microsoft.public.data.ado)
  • Re: merge on datasets from join queries
    ... > The source and destination datasets are being filled by the same stored ... will not by default pull ... > join and Help said that you need to add a primary key for outer joins ... >> yes it can be used to refresh data from the database. ...
    (microsoft.public.dotnet.framework.adonet)
  • Custom Paging in asp.net Datgrid Using Sql
    ... I have written A SP in SQL which will be used to Bind the grid. ... prev(<) and next>on grid. ... When User clicks on Nextbutton,Sp_fill builds a querry like ... StartIndex is the Value of Primary key of last record on the current ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)