0

hi everyone
i'm novice in vb.net and got stuck with this problem

want to add a record in table and used the following code

Adodc1.Recordset.AddNew()
Adodc1.Recordset.Fields("UrduWord1") = rtfHindi.Text
Adodc1.Recordset.Fields("UrduWord2") = rtfUrdu.Text
Adodc1.Recordset.Update()

the problem is with the line:
Adodc1.Recordset.Fields("UrduWord1") = rtfHindi.Text

and showing following error msg

Error Property 'Item' is 'ReadOnly'.
Can anyone plz help me with this problem

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by __avd
0

Welcome shaikh_farahnaz.

Which version of Visual studio are you using? Your code uses vb 6.0 com control. Do you know there is a powerful class library in .net framework to work with database?

0

However use following code:

Adodc1.Recordset.AddNew()
Adodc1.Recordset.Fields("UrduWord1").Value = rtfHindi.Text
Adodc1.Recordset.Fields("UrduWord2").Value = rtfUrdu.Text
Adodc1.Recordset.Update()

Always post source code using bb code tags. Read How to use BB code tags?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.