Monday, March 26, 2012

Newbie Question - Edit data on SQL Server using Data access pages

I have been and SQL administrator for about 6 hours now. I grabbed a couple
books and have been doing searches online and reading through some MSDN
online stuff. Having never seen SQL but having done some Access it wasn't
too hard to get a database set up on the server.
I managed to import an old access database with tables into the SQL database
on the server. Easy enough. I then managed to set up a new Access Project
on a local machine pointing at the server and connect to the database quite
easily.
Then I built an form based on the primary table. Easy enough. I had to go
into form properties and enable edit so that the form would open. Otherwise
it just opened as a blank form page with no fields.
I can also build data access pages that display all the data in the database
which is wonderful and I'm really starting to see how powerful and wonderful
SQL is going to be.
Only problem is everything I do creates read only. I can do a data access
page, a form or a table but even with edit enabled I only get read only
access to the data. Any attempts to modify data results in the following
message in the taskbar.
On data access page: No message just don't allow edits or typing.
On Form in access: Field "XXX" is based on an expression and cant be
edited.
On Table view: The recordset is not updatable.
I'm sure once I spend a few more hours beating around I'll figure this out
and I'm sure its just because of my naivety in all things SQL but I was
hoping someone would have a quick pointer to get me back on the development
track.
Thanks again for all your help.
Doc
The SQL server user account accessing the SQL server from access has to
have write access.
and more importantly the table needs to have a unique index else you will
not be able to edit the recordset/Table in access.
|||Check if the table has a primary key, if not, create the pk and them relink
the tables.
AMB
"Donald Watson" wrote:

> I have been and SQL administrator for about 6 hours now. I grabbed a couple
> books and have been doing searches online and reading through some MSDN
> online stuff. Having never seen SQL but having done some Access it wasn't
> too hard to get a database set up on the server.
> I managed to import an old access database with tables into the SQL database
> on the server. Easy enough. I then managed to set up a new Access Project
> on a local machine pointing at the server and connect to the database quite
> easily.
> Then I built an form based on the primary table. Easy enough. I had to go
> into form properties and enable edit so that the form would open. Otherwise
> it just opened as a blank form page with no fields.
> I can also build data access pages that display all the data in the database
> which is wonderful and I'm really starting to see how powerful and wonderful
> SQL is going to be.
> Only problem is everything I do creates read only. I can do a data access
> page, a form or a table but even with edit enabled I only get read only
> access to the data. Any attempts to modify data results in the following
> message in the taskbar.
> On data access page: No message just don't allow edits or typing.
> On Form in access: Field "XXX" is based on an expression and cant be
> edited.
> On Table view: The recordset is not updatable.
> I'm sure once I spend a few more hours beating around I'll figure this out
> and I'm sure its just because of my naivety in all things SQL but I was
> hoping someone would have a quick pointer to get me back on the development
> track.
> Thanks again for all your help.
> Doc
>
>
|||It was the missing primary key.
Now I can develop to my hearts content.
Thanks so much for the fast response.
Doc
sql

No comments:

Post a Comment