Question:
vb6 help..how can i add, edit, delete, and save a new record from vb6 to ms access 2000version..help asap
reenz
2008-08-07 08:43:42 UTC
i only used this code to add but it has an error..
"Empty row cannot be inserted. Row must have at least onecolumn value set."

adodc1.recordset.addnew

help please on this code.. as well as on the edit of record and delete..thank you
Four answers:
2008-08-07 09:00:43 UTC
www.pro-technologies.com
MH
2008-08-07 09:02:48 UTC
You will be getting that because their are one or more required fields in your DB table and so the DB is objecting because it is not being filled. You can add values as part or the addnew method, and you will need to do this to populate these fields:-



adodc1.recordset.addnew FieldName, FieldValue

or

adodc1.recordset.addnew FieldNameArray, FieldValueArray



the update method works the same way, and the delete method will delete the currently selected record
arnold
2008-08-07 08:57:48 UTC
Check your access database settings. Looks like you have your required setting is set to yes and you are putting in an empty value. Sometimes they call this allow null values and you have to set it to allow accepting null values.



Hope this helps.



Arnold

www.biblesms.org
2016-10-10 03:48:41 UTC
rx.Open "elect *from concern", con, 3, 3 With rx .AddNew .Fields("membercode") = Text1.text fabric .Fields("membername") = Text2.text fabric .Fields("bookcode") = Text3.text fabric .Fields("booktitle") = Text4.text fabric .Fields("issuedate") = Text5.text fabric .Fields("returndate") = Text6.text fabric .replace end With MsgBox "documents have been saved"


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...