Solved

Access write error on SQL server, even if

Posted on 1997-09-07
3
255 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sql 2014,  lock limit 5 32
Help Required 3 97
SQL Improvement  ( Speed) 14 28
SQL invalid column name 5 13
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
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 insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

778 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