Re:Table is readonly
Hi,
Actually, I am logged in as SA so that I have fully rights (the SQL
server is in my house and the network is private, so all logins are SA). I
can set up a DBGrid and a DBNavigator and "edit to my heart's delight". Yet
a simple insert or update {*word*88}s with a "Table is readonly."
I am assuming from the fact that DBGrid/DBNavigator allow all updates
that the SQL / ODBC links are okay - thus it must be something that Meathead
(that me when I{*word*222}up like this) is doing something stupidly wrong. In
simplest form, I have a single query, a single datasource, a DBGrid and
DBNavigator. DBNavigator & DBGrid tie to the DataSource which ties to the
Query. The query connects via ODBC to the SQLServer. At this point all is
fine and we can modify the data.
Now we add two buttons and use the OnClicks with
procedure Tform1.Button1Click(Sender: TObject);
begin
with Query1 do begin
Close;
SQL.Clear;
SQL.Add('select * from DONORS');
Open;
end;
end;
procedure Tform1.Button2Click(Sender: TObject);
begin
with Query1 do begin
Close;
SQL.Clear;
SQL.Add('update DONORS set Name = ''dummy'' where Id = 1'); //
consider this a valid SQL statement as far as the SQL Enterprise Manager is
concerned - namely DONORS, Name and Id are valid etc
Open;
end;
end;
Button1 will click without any errors -
Button2 will click yielding "Table is readonly!"
How can the same table be read/write by the same query in one instance
but not in the other?
Quote
Trevor Toms <s...@msn.com> wrote in message
news:memo.19990715082942.189B@tt.msn.com...
Quote
> In article <7mdplu$rp...@forums.borland.com>, j...@prowireless.com (Joshua
> Lutz) wrote:
> > results in
> > "Table is readonly."
> Sounds like you do not have the correct rights to insert into the table.
> Use Enterprise Manager to grant the appropriate rights for the user.
> Hope this helps.