Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 8th, 2007, 08:34 AM
Registered User
Join Date: May 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Recordset is readonly

I'm trying to add recordset in a table. Here is my code:
dim cnn as adodb.connection
dim rst as new adodb.rcordset
rst.Open("select * from tblQSDokumenti", Cnn, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockPessimistic)
rst("ID") = lngMax + 1
rst("Ime") = CStr(ListView1.SelectedItems(0).SubItems(7).Text)

When I try to run this code, I allways get error, that rst 'Item' is readonly.
Am I missing something here.

Thank you for any help.


Old May 8th, 2007, 11:12 AM
planoie's Avatar
Friend of Wrox
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

You should avoid using ADODB objects in .NET. There are far better objects to use in .NET.

If you are connecting to an Access database using OleDb, you can use the OleDbDataReader or other OleDb* classes.


Similar Threads
Thread Thread Starter Forum Replies Last Post
TextBox's ReadOnly problem ... amolchikurte ASP.NET 2.0 Professional 4 May 31st, 2007 06:37 AM
DataBase is readonly debabrata ASP.NET 2.0 Professional 0 April 17th, 2007 04:54 AM
readonly checkbox Dj Kat HTML Code Clinic 3 November 10th, 2006 08:34 AM
Readonly checkbox nerssi HTML Code Clinic 1 May 20th, 2005 06:28 AM
make checkedListBox readonly melvik C# 0 September 14th, 2003 09:35 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.