Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Records are locked

Status
Not open for further replies.

Aliffi

MIS
Jan 9, 2005
51
BE
Dears ! ....
I had a Database in ACCESS . now i transfer my database to SQL SERVER and i have an ADP Database now but the problem is that . my tables are locked i cant edit and enter new record .....
any one help plz
 
Check to make sure you have a primary key set for each table. Without it you can't add new records.

Paul
 
Thanks paul i solved it , plz can u tell me how to set my custom error message to a field even in sql server ....though i know about messeges UDM starts from 50001 i set one now how can i set it behind a field .... and 2nd question how can i rename my SA account ....write me the command plz
 
First, check under View...Properties for the table you want to work in. You should be able to enter a new error message on the Tables Tab for the Properties under Check Constraint for Tables and Columns. I haven't used this property, but it looks like what you want. Also, under Tools...Security...Database Security, look for the Security Tab and see if Server Logins and Database Users Tabs help you out. Again, I haven't used any of these features yet but it's a place to start. If it doesn't help, I would post a new thread in this forum to ask these questions.

Paul
 
well Paul , i tried but didnot work if you plz check it again , what i want is we create an error message like ERROR No.50001 , now if we have a field of SALARY and when some one enters wrong value like >5000 then that custom error should be appear ...... how can i attach this to my table ....?

note: dear paul can u give me your personal email , or do you use any instant message sometimes ....
i might discuss alot of things with you
FARZAM
 
Farzam, we are not supposed to give out personal information on Tek-Tips. They prefer we work out the solutions on line so that everyone can share in the process. As I said, I haven't used these features before, but will see what I can discover today when I have some time.

Paul
 
Farzam, you can not use a custom Error message when trying to validate data directly entered into a .adp Table. You can validate the data using the Constraint property I mentioned above, but the error message is an SQL generated error message. To generate a custom Error message, you have to validate the data at the Form level using the Control Validation Rule property.

Hope this helps.

Paul
 
Aliffi, you don't rename the sa account that is the system administrator account. You can add additional accounts as needed and assign permissions and passwords as you desire. There are stored procedures to do this which you can look up under the sql server documentation. The easiest way is with Enterprise Manager which is the interface to manage sql server. Look for sp_addlogin.


You can store the error numbers/messages on sql server, which is probably good if you have multiple front ends, such as, Access, ASP, Excel, etc.....
The problem with the bound forms in Access is that some of the error checking will be done on the sql server side and you will need to handle that at the form level in Access - probably in the afterupdate event of the form.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top