Solved

Recordset.Edit Problem

Posted on 1997-04-02
2
226 Views
Last Modified: 2008-03-17
I have created this recordset with a DataControl in VB5.0.
The form has 5 other DataControls. I have successfully got data from these datacontrols. This is the first time I've tried to update or edit the database.
The datacontrol is not linked or bound to any DBCombo, etc.. control. I want to edit the recordset with data that has been entered into text boxes, etc...
As soon as the program gets to the recordset.edit it gives the following error...

"Run-time error '3027':
Can't update. Database or object is read-only."

The database is Access2.0
All permissions have been granted for everyone, read, write etc.
It is set for multi-user
The DataControls Exclusive and ReadOnly properties are set to false.
I have no Idea what is going on, can you help???
0
Comment
Question by:eajoyce
[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
2 Comments
 
LVL 1

Accepted Solution

by:
ksleung earned 100 total points
ID: 1425021
Check the followings:

1. How do you open the Recordset?  Do you open it as a snapshot which cannot be edited? If so, change it to dynaset.

2. Check the Recordset.Updatabale property at run time.  If it is  false, you cannot edit the database records.  It is very likely that you open the recordset as snapshot.
0
 

Author Comment

by:eajoyce
ID: 1425022
Here is the SQL  code and I checked the type of recordset,  it is  a Dynaset.
I'm wondering as the source for the datacontrol is an SQL query does that have any effect on the Edit???
Also the 'Updateable' property of the recordset is false, what can be causing this???...

SQLQuery = "SELECT DISTINCTROW [Device Details].[Device Name], [Device Details].[Device Model], [Device Details].[Location Index], [Device Details].[IP Address], [Device Details].[MAC Address], [Device Details].[WINS Name], [Device Details].[Ports/Blades of Interest], [Device Details].[Service Contract], [Device Details].[Service Contract Info], [Device Details].[J-Tag Number], [Device Details].[Serial Number], [Device Details].[Purchase Information], [Device Details].[CBR Ticket Number] "
SQLQuery = SQLQuery & "FROM [Device Details] "
SQLQuery = SQLQuery & "WHERE (([Device Details].[Device Name]= '" & CStr(cboDeviceInfo(0).Text) & "' ))"
 
 datDeviceInfo(5).RecordSource = SQLQuery
 datDeviceInfo(5).Refresh

0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month4 days, 9 hours left to enroll

636 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