473,546 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do you lock table (or view) fields from editing???

Hello:

I have an Access 2K form I built from a SQL Server 7.0 view. I want to
lock certain fields in the database from users so they can see them on
the views and forms, but NOT be able to edit them.

I've looked in BOL, MS SQL Server web page and SQL Server 7.0 books and
could not find how to do this.

Any advise will be greatly appreciated.

Thanks,
Richard

Jul 20 '05 #1
4 20909
with sql server it is easy. One possible way:
- start enterprise manager
- open your database
- go into tables/views
- right click on a table/view
- select all tasks -> manage grants
(i don't know if this is the name, i have only
the german version)
in this window you can select your view/table
in the combobox, you see all users with their
rights and on the bottom you find the button
'columns' where you can set the rights for
a specific user on a specific row.

hth,
Helmut


"Richard Holliingsworth" <wi************ *********@boein g.com> schrieb im
Newsbeitrag news:HJ******** @news.boeing.co m...
Hello:

I have an Access 2K form I built from a SQL Server 7.0 view. I want to
lock certain fields in the database from users so they can see them on
the views and forms, but NOT be able to edit them.

I've looked in BOL, MS SQL Server web page and SQL Server 7.0 books and
could not find how to do this.

Any advise will be greatly appreciated.

Thanks,
Richard

Jul 20 '05 #2
Richard Holliingsworth <wi************ *********@boein g.com> wrote in message news:<HJ******* *@news.boeing.c om>...
Hello:

I have an Access 2K form I built from a SQL Server 7.0 view. I want to
lock certain fields in the database from users so they can see them on
the views and forms, but NOT be able to edit them.

I've looked in BOL, MS SQL Server web page and SQL Server 7.0 books and
could not find how to do this.

Any advise will be greatly appreciated.

Thanks,
Richard


From the MSSQL side, you need to ensure that your users can SELECT
from the tables, but not UPDATE/INSERT/DELETE. Have a look at GRANT
and REVOKE in Books Online for more information. You should probably
also have a look at the information on database roles as well - you
can add users to the role, then grant the permissions to the role,
which makes things easier to manage.

Simon
Jul 20 '05 #3
Helmut you are close. I went to the table/view and right clicked and
got a menu. From the "All Tasks" selection, I got another menu that
included "Manage permissions" not "Manage Grants"
I selected that option and got the user permissions for the table but
NOT for the columns

So, I still cannot lock fields (columns) on a table/view.

The first responder misunderstood my question. I am not trying to lock
the users from the table/view. They MUST be able to edit certain fields
bot NOT all of them. So I must be able to lock fields from update, NOT
the whole table.

Thanks for any other guidance.

Richard

Helmut Wöss wrote:
with sql server it is easy. One possible way:
- start enterprise manager
- open your database
- go into tables/views
- right click on a table/view
- select all tasks -> manage grants
(i don't know if this is the name, i have only
the german version)
in this window you can select your view/table
in the combobox, you see all users with their
rights and on the bottom you find the button
'columns' where you can set the rights for
a specific user on a specific row.

hth,
Helmut


"Richard Holliingsworth" <wi************ *********@boein g.com> schrieb im
Newsbeitrag news:HJ******** @news.boeing.co m...

Hello:

I have an Access 2K form I built from a SQL Server 7.0 view. I want to
lock certain fields in the database from users so they can see them on
the views and forms, but NOT be able to edit them.

I've looked in BOL, MS SQL Server web page and SQL Server 7.0 books and
could not find how to do this.

Any advise will be greatly appreciated.

Thanks,
Richard



Jul 20 '05 #4

"Richard Holliingsworth" <wi************ *********@boein g.com> wrote in
message news:HJ******** @news.boeing.co m...
Helmut you are close. I went to the table/view and right clicked and got a
menu. From the "All Tasks" selection, I got another menu that included
"Manage permissions" not "Manage Grants"
I selected that option and got the user permissions for the table but NOT
for the columns

So, I still cannot lock fields (columns) on a table/view.

The first responder misunderstood my question. I am not trying to lock the
users from the table/view. They MUST be able to edit certain fields bot NOT
all of them. So I must be able to lock fields from update, NOT the whole
table.

Thanks for any other guidance.

Richard

I may have misled you by not mentioning that GRANT/REVOKE can be applied to
columns as well as to entire tables (although only SELECT/UPDATE apply at a
column level, of course). The Enterprise Manager functionality that Helmut
described is simply a graphical interface to GRANT/REVOKE. I don't have
SQL7, but the SQL2000 permissions screen has a button at bottom left called
'Columns', which allows you to manage column level permissions.

In Query Analyzer you would do something like this:

grant select on dbo.MyTable (col1, col2, col3) to MyRole
grant select, update on dbo.MyTable (col4, col5) to MyRole

Simon


Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4553
by: leecho | last post by:
Hi, recently, i was assigned as a new dba for our system. I found that my statistic keep change from time to table. To look for the cause, i wanna to lock a table, means only allow user to insert. Others than that, noway. Can i use the Lock table command? or others comand? p/s: we are using 9i client and 6i developer regards,
4
3863
by: Brian Andrus | last post by:
Ok. I upgraded to MS Access 2003 recently and now I am having great heartache. In Access 2002, when I opened a table to view the data, there were wonderful little "plus" signs that I could click on for each record that would open up the corresponding record in any linked table. I could drill down and edit/add records in a most efficient and...
0
4346
by: Colleyville Alan | last post by:
My app is giving me this error. Run-time error 3211: The database engine could not lock table 'Sorted_Template' because it is already in use by another person or process. When I run the app the first time through, it runs fine. I get this when I run a make-table query that tries to write out the table called "Sorted_Template". I tried...
1
7065
by: Sandy | last post by:
Hi I want to lock a table using JDBC as I want to perform some query's (read and write) in exclusive mode. Different threads will be executing the same code simultaneously. I am using the following statements Statement stmt = connection.createStatement(); stmt.executeUpdate("lock table STATUS_TBL in EXCLUSIVE mode"); but am getting the...
2
4345
by: simonZ | last post by:
I create a transaction: sqlTran=sqlConn.BeginTransaction(IsolationLevel.Serializable); Then, I insert some data into report table with sqlCommand object: oCmd = new SqlCommand("c_reportInsert", sqlConn); oCmd.CommandType = CommandType.StoredProcedure; oCmd.Transaction = sqlTran; .... ....
0
2335
by: sang | last post by:
Hi I want to lock the table with both read and write there is no action held after lock the table. I know how to lock the table with read and write, lock table mytable read; lock table mytable write; lock table mytable read write;
3
10665
by: Himmel | last post by:
I have added a section of code to a function that is designed to copy data from several tables and place them into a single table. The new table already contains a unique ID and name, and I am working on adding data from the second table to it. The problem is that the second table has multiple records for each ID. For example, review this...
2
3281
by: robert stearns | last post by:
When I use LOCK TABLE ... COMMIT, must I also use odbc_autocommit(dbConn, FALSE)? In other words will auto commit prematurely defeat the LOCK TABLE?
3
7580
by: Frederick Tant | last post by:
DB2 V9.7 The DB is used by 1 application with no concurrent applications. I got the problem that large update/insert cause lock escalation, to solve the issue I set a lock on the table so there's no row locking any more. BUT after setting a lock on a table (LOCK TABLE <table> IN EXCLUSIVE MODE;) I remain having the message " DB2 is...
0
7504
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7694
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7947
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7792
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6026
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5360
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3491
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1921
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.