•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 425,983 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,642 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 6046 | Replies: 3
![]() |
•
•
Join Date: Jan 2005
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Im wondering if anyone can suggest a solution to my problem. Im simply trying to connect to a database through VB 6 and add a new record and populate one of the fields.
Any help would be great.
The code below throws up error message 'Current Recordset does not support updating. This may be a limitation of the provider or of the selected locktype'
Dim adoConnection As ADODB.Connection
Dim adoRecordset As ADODB.Recordset
Dim connectString As String
Dim RecordSQL As String
RecordSQL = "SELECT * From Programme"
Set adoConnection = New ADODB.Connection
Set adoRecordset = New ADODB.Recordset
connectString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=C:\MyDatabase.mdb"
adoConnection.Open connectString
adoRecordset.Open RecordSQL, adoConnection
adoRecordset.AddNew
adoRecordset!UserName = txtProgrammeNumber.Text
adoRecordset.Update
adoRecordset.Close
adoConnection.Close
Set adoRecordset = Nothing
Set adoConnection = Nothing
Any help would be great.
The code below throws up error message 'Current Recordset does not support updating. This may be a limitation of the provider or of the selected locktype'
Dim adoConnection As ADODB.Connection
Dim adoRecordset As ADODB.Recordset
Dim connectString As String
Dim RecordSQL As String
RecordSQL = "SELECT * From Programme"
Set adoConnection = New ADODB.Connection
Set adoRecordset = New ADODB.Recordset
connectString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=C:\MyDatabase.mdb"
adoConnection.Open connectString
adoRecordset.Open RecordSQL, adoConnection
adoRecordset.AddNew
adoRecordset!UserName = txtProgrammeNumber.Text
adoRecordset.Update
adoRecordset.Close
adoConnection.Close
Set adoRecordset = Nothing
Set adoConnection = Nothing
•
•
Join Date: Jul 2004
Location: Adelaide, Australia
Posts: 191
Reputation:
Rep Power: 5
Solved Threads: 1
Please take a look at my ADO Tutorial. This will tell you the correct code to us. I'd say the problem is in your connection string, you may need to add a ';Mode=Read|Write;Persist ' segment to the string.
Mark Nemtsas
Time and Billing Software - Time Tracking Software - Roller Shutters - Roller Blinds -
Baby Books
Time and Billing Software - Time Tracking Software - Roller Shutters - Roller Blinds -
Baby Books
•
•
Join Date: Jan 2005
Location: London
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
hi there,
i have just being doing then ADO objects in college over the past week and from what i have gathered, you seem to be going quite a long way around this. if you use less codes for this and instead just change properties in the properties window in VB while the ADO object is selected, it can be done easier. just try changing the properties of the connection string and record source.
then code a command button i.e. cmdNew with the Recordset.AddNew command. i will be back at college tomorrow and i will be able to post the full code if this helps
i have just being doing then ADO objects in college over the past week and from what i have gathered, you seem to be going quite a long way around this. if you use less codes for this and instead just change properties in the properties window in VB while the ADO object is selected, it can be done easier. just try changing the properties of the connection string and record source.
then code a command button i.e. cmdNew with the Recordset.AddNew command. i will be back at college tomorrow and i will be able to post the full code if this helps
![]() |
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- asp problem ADODB.Recordset error '800a0bb9' (ASP)
- Windows XP keeps restarting since a new video card (Windows NT / 2000 / XP / 2003)
- Redhat Linux 6.2 - ipop3d problem? (*nix Software)
- Connection Problems (Networking Hardware Configuration)
- Problem with Windows Update and WinXP (Web Browsers)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: link record in database with contactItem?
- Next Thread: VB6 and MS Access 2002


Linear Mode