Solved

Access write error on SQL server, even if

Posted on 1997-09-07
3
258 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

623 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