I am new to VB. I am using ADO to access, add and update a SQL Server DB. I am running into trouble when I attempt to update non-Key fields on a form.
All the error tells me is Runtime Error '-2147217887(80040e21)' Errors occurred. I have my lockset to 3- adLockOptimistic.
Why is it doing this?
Hello,
I am new to VB. I am using Visual Studio and ADO Data Control to access a Table(Project) on an Access database. This works fine. I am attempting to use ADO DataList to access a different Table(Client) on the same database to create a dropdown list so the user can select which Client ID...
I have set up a display of an Access record. What I want to do now is, when I have to add a new record, is to read from another Access DB all the values in a certain column (via SQL) and put those values into the listbox. I am at a loss as to (1)how to do this and (2) still display the value of...
WOYLER,
I was very careful to make the SS# the primary key and not to duplicate it. As I mentioned before, the record is being added to the database. What I think is happening is that the info is being left on the screen and that info is trying to be added again to the database. Thus the error...
OK. I am now adding the record(I checked the DB). I am also getting the msgbox msg that I am sending. But when I try to go backward or forward using the ADO box I get the following Msg :
The changes you requested to the table were not successful because they would create duplicate values in...
OK, I am not sure of the syntax, but this is what I have right now:
Private Sub Add_Click()
Dim Employee As New ADODB.Recordset
Employee.Open "SELECT * FROM EMPLOYEE;"
"Provider=Microsoft.Jet.OLEDB.4.0,Data Source=C:\TandE.mdb",
adOpenStatic , adLockOptimistic...
Link9 and Woyler,
I have the Data Link Properties set to "Share Deny None" in the Connection string properties.
I also have my ADO properties LockType set to "3-adLockOptimistic" and I am still getting the same error msg - Run-time error '-2147217842(80040e4e)';
The change...
Paul,
I added the following statement before the AddNew statement:
adcEmployee.Recordset.LockType = 3
and I got the following error:
Run-time error '3705';
The operation requested by the application is not allowed if the object is open.
I am using MS Visual Studio to create a form and Load an MS Access DB. I have made all the connections and am able to access the DB. I created an Add button control. My problem is with the AddNew ADO Recordset.
****** Code *******
Private Sub Add_Click()
adcEmployee.Recordset.AddNew...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.