i need help in adding a new record to the database using adodc in vb6.. i've a command button named add in my form...
jaai 14 Light Poster
Recommended Answers
Jump to Postthis following is an example code, modified as you needed.
Private Sub Add_Click() Adodc1.Refresh Adodc1.Recordset.AddNew Adodc1.Recordset.Fields("Au_Id") = Text1.Text Adodc1.Recordset.Fields("Author") = Text2.Text Adodc1.Recordset.Fields("YearBorn") = Text3.Text Adodc1.Recordset.Update MsgBox "Data Added" End Sub
Jump to PostAlong with a button on a form you need to have a database in place and connect to that Db from vb before you could do any database related activity.
Jump to PostPost the code you are using as well as the line the error occurred on.
Jump to PostThe error "Multiple Step operation" can refer to incorrect data sent to your table. Make sure that if your say field "NUMBER" can only accept numbers type (Integer), the data in Text1 contains only numbers. Check this against all your fields, especially the date field. The date format must be …
Jump to Postit can happen if your database connection is error or you used a static path, so when you the code running in other computer this error can occurred or a data type problem like andreRet post.
All 19 Replies
Jx_Man 987 Nearly a Senior Poster Featured Poster
Jade_me commented: Helping.. +4
debasisdas 580 Posting Genius Featured Poster
jaai 14 Light Poster
AndreRet 526 Senior Poster
jaai 14 Light Poster
AndreRet 526 Senior Poster
Jx_Man 987 Nearly a Senior Poster Featured Poster
jaai 14 Light Poster
AndreRet 526 Senior Poster
jaai 14 Light Poster
AndreRet 526 Senior Poster
md riyaz commented: i am very intrested in vb programming +0
critznikkian 0 Newbie Poster
AndreRet 526 Senior Poster
eshajoshi 0 Newbie Poster
rizky_1 0 Newbie Poster
Santanu.Das 125 Santanu Das
rizky_1 0 Newbie Poster
sandhya1987 0 Newbie Poster
md riyaz 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.