Solved

Recordset.Edit Problem

Posted on 1997-04-02
2
219 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

710 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