adamtrask
asked on
editing recrods in SQL Server database
Hi,
I am using the following SQL statement in Sql Server Management Studio to retrieve the top 5 records. However, the statement displays the records but does not allow me to edit any of them.
select top (8)dDate,nName,tType from Main;
My question is how do I modify the above statement to be able to edit any of the records displayed. Thanks
I am using the following SQL statement in Sql Server Management Studio to retrieve the top 5 records. However, the statement displays the records but does not allow me to edit any of them.
select top (8)dDate,nName,tType from Main;
My question is how do I modify the above statement to be able to edit any of the records displayed. Thanks
I never used SQL Server, you may need to include primary key too (also try *) to be able to edit the record. Editor must have a unique identifier to each row to update it.
ASKER
Even when I include the primary key column as in the following statement the records displayed are read only. I am not allowed to edit any of the columns.
SELECT TOP (10) ID, dDate, tTime, nNAMe, sSubject, tType, mMonth, Remarks
FROM Main1
SELECT TOP (10) ID, dDate, tTime, nNAMe, sSubject, tType, mMonth, Remarks
FROM Main1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank. I get it now.