Solved

Access write error on SQL server, even if

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now