Solved

Access write error on SQL server, even if

Posted on 1997-09-07
3
257 Views
Last Modified: 2012-06-27
  I am currently trying to write a program using Visual Basic 5 to access to a database on SQL server 6.5. It gives me an error saying that Database or object is read only whenever I am want to insert, delete and update a record.
I checked that the database, table and the fields in the table are set to be updatable using the Enterprise Manager.
I thought my program got bugs, so I tried using the Data Form wizard provided by VB5 to create a database form for my database stored in SQL server. But to what i have not expected, the created program also gives me the same error.
I tried connecting to the sql server with Visual Data Manager provided with VB5. I can connect to the database. In the Database Window of VisData Manager, the updatable property of the database and the table is read as true. But I discovered that all the fields' dataupdatable property is set as false even if i have grant all permission rights on the database and objects.
  Please help me... to solve this problem.
0
Comment
Question by:weekee
3 Comments
 
LVL 6

Expert Comment

by:BenClark
ID: 1088905
A wild guess.
Check for constraints/rules/etc...
0
 
LVL 9

Accepted Solution

by:
cymbolic earned 100 total points
ID: 1088906
Your resultsets will be marked not updateable if modifications or inserts would violate any constraints.  Simple examples of this are things like not including foreign key columns in your resultset for insertions, etc.  Once you create relationships and constraints, every column that is involved in a constraint must be included in your resultset so that the database manager can honor your requests and maintain database integrity.  Look closely at the columns and content you are working with.  YOur resultset is being marked not updateable because it's missing something that the server needs to maintain database integrity.
0
 
LVL 2

Author Comment

by:weekee
ID: 1088907
I already solved the problem, by including a primary key i can now update,insert,delete any records. Anyway thank you.

0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question