o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

Recordset update method failed -

I'm using VB5 SP3, connecting to database via ODBC.

Code:
Set WS = DBEngine.CreateWorkspace("MainWS", "admin", vbNullString, dbUseODBC)
Set CN = WS.OpenConnection("", dbDriverNoPrompt, False, strConnect)
Set RS = CN.OpenRecordset("select * from table", dbOpenDynaset, 0, dbPessimistic)

Private Sub Command1_Click()
    With RS
        .Edit
        ![cc] = Text1(2).Text
        ![ii] = Text1(0).Text
        .Update
        .Bookmark = .LastModified
    End With
End Sub
The table consists of 2 columns, ii of type int4 and cc of type varchar(100).

The code fails at '.Update', get the error message 3146 ODBC -- Call failed.

Any idea?

 

Update error message -
I get the following error message when trying to use the update method on an ADO recordset: Run time error '-2147467259 (80004005)': Query-based update failed because the row to update could not be found. Does anyone have a clue?


Best Method , adUseServer Vs adUseClient -
Hi, I know this matter has been around and much debate along with it. But please give me clear explaination why i should use one and why not the other one? I'm using mysql Server 5.0.18 I will start first. Using adUseServer my recordset objet will always update, even whe


Cannot execute .UPDATE method -
I am using an ADO connection to a SQL server. Whenever I try to execute the .update method on a recordset (without using .AddNew) I get the following error: "Insufficient key column information for update or refreshing" However, if I use the .AddNew method I can add to


ADO recordset updating on it's own -
Hello all, I'm using ADO with an Access database using the Jet engine. To the best of my knowledge, when you change a field in the recordset, the field doesn't update in the database until you call the .Update method. The opposite seems to be happening though, when I change a field in


METHOD Open Failed -
I keep getting this error when I try to open a recordset : Method 'open' of object '_Recordset' failed. All my other recordsets work, the only difference with this one is that I have a date in my criteria. I have tried using the # symbol to enclose my dates and tried it withou


Runtime Error-Query-based update failed because the row to update could not be found. -
Hello.... I have a problem in editing a ADO recordset. I am using VB6 & MySql Server,MySql ODBC Connector 3.51.... My code is listed below.... str = "select * from employee where empcode='1'" rs.Open str, cn, adOpenDynamic, adLockOptimistic rs.fields(1).value


ADO. Why will the .Update not stop invalid entry -
I have an ADO control on my form bound to a field that allows 9 characters. After a user enters data in the box, I run the following code Form.ADODC1.Recordset.update Even though the user entered 10 digits, the update seemed to work. However, when I try and move to the next r


Update Method Help -
I have a VB6 form that saves data and then later needs to be updated. If I understand the syntax correctly for the Update Method, you have to identify the fields to be updated in the recordset. I don't understand a couple of things (at least). How would you do that practically if th


interesting update problem -
I have an ado control and a few textbox control and datacomb controls( a few other ado control connect to the datacomb box) on the tabStrip control the master ado control's cursorlocation is in the client side and cursortype is adopenstatic. The problem is that sometimes the ado.r


Update recordset -
Hi, Is the Update method of a recordset has the same efect like 'Commit' in SQL? Thanks, Lior


problem w/ update method using bound control -
when i run my program and update a field called Date_Closed the program will update it the first time. If I go back and try to update the record again or erase the Date_Closed field I get an error: "Runtime 3426 This action was cancelled by an associated object" here is th


ADO Update troubles -
Hi Folks I have a number of text fields whose datasource is a recordset. A choice from a combo box causes a relevent rentry to be made in one of the text fields. When I do a recordset.update to record the info in the text fields I get an error. I often get errrors when using recor


update method not working on databound contol -
when i run my program and update a field called Date_Closed the program will update it the first time. If I go back and try to update the record again or erase the Date_Closed field I get an error: "Runtime 3426 This action was cancelled by an associated object" here is th


ADO Recordset Updating -
Got an issue with ADO Recordset. I return a recordset using the .Execute method of command object I now need to loop through the RS, and update a particular field with a calculated value before filling a grid. When i try to .Fields("CalcValue").Value = lngCalcValue, i g


Database Edit and Update -
I got some advice last night to change my database access script from Database -> Recordset to use the Connection Object instead (and use a recordset object from there). This seems to be a good change, except that i'm having difficulty editing my existing values within the datab


ODBC Update Failed Error 3157 -
I am editing data. I open up the recordset to "edit" then have a line to Update. I get an error when trying to update. Please help.


Update of Data control Recordset(DAO) -
Someone please help!!! See code below Data4.Recordset.Edit Data4.Recordset("rate of pay1") = Val(txtrop1) Data4.Recordset("rate of pay2") = Val(txtrop2) Data4.Recordset("max pay") = Val(txtmaxpay)


RS update method don't work with bound controls -
I have form with datacomboes and TextBoxes and I have Set .DataField property to the names of the Fields in my database and also the datasource property to my Recordset.datasource When I change a single record then press save button that does Recordset.update and then Unload my form


Problem with Update/Add with SQL MSDE -
Hi, I'm having problems with adding a record.. When I get to the update statement, I get this error: Run-time error '-2147217873(80040e2f)': Method 'Update' of object '_Recordset' failed. Does anyone know what this is happening? I'm converting an app that was using Access, but


Can't cancel add method in disconnected recordset. -
Hello all. I'm using VB6 w/ ADO to access an Access database (no pun intended). I'm using disconnected recordsets, and I'm only reconnecting the recordset to an open connection when the "Save" button is pressed. My problem is the use of the CancelUpdate method after calling


Update related ADO recordsets -
Hi everybody: Hope help me with this problem. I've been working with ADO recordsets with no problems until now. I have a recordset related to a other recordset; both of them associated with Access tables related each other. I have no problem in update the principal recordset, but I


Recordset update method failed -
I'm using VB5 SP3, connecting to database via ODBC. Code: Set WS = DBEngine.CreateWorkspace("MainWS", "admin", vbNullString, dbUseODBC) Set CN = WS.OpenConnection("", dbDriverNoPrompt, False, strConnect) Set RS = CN.OpenRecordset("select * f


Can't update the RS anymore -
Hey all. I finally got SQL Server working at home. I backed up the db at the office and restored it at home, so i could work on my home machine, XP PRo. but wherever there is an update to a recordset, this line hangs it up: RS.Update with this error: Query-based update failed bec


Code works in VB 6.0 but not in VBA -
Hi all I am creating a recordset using 'Creatable recordset method'. and Listing in a MSHFlexgrid in VB 6.0. It works fine. But When I am rtying the same thing in Excel VBA it gives the following error. Run-time error -'2147417848 (800110108)': Method 'Datasource' of object "


ADO Problems -
Heres the deal, Say you got a form, with a bunch of textboxes,or whatever, bound to a data base. (i.e. txt.datafield = accountnum txt.datasource = adodc1) now, calling adodc1.recordset.addnew should append a new record, (which it does) and blank out the textbox for new


Add New Record (ADO) -
Please Help, I am adding a new record to a recordset and then using the update method to commit the record. The problem is getting the recordset to point to the record which was added. How do I move to this record after issueing the update command. Thanks for any help Chris


Connection object's execute method or Recordset Object -
I'm doing a little personal project here today and I'm not sure whether to use the Connection object's Execute Method that allows you to use SQL Insert, Update, Delete or to use the Recordset Object's Update, AddNew, and Delete methods. I'm working with ADO objects on this project. I'm


ado not updating bound control -
I have a vb from with a text box and an ADO data control. If I manually modify the text box value on the form, the value is updated when I call the ado.recordset.update method. However, if I programatically change value of the text control, this value isn't changed when I call the up


ADO AddNew - urgent -
Hello, Quick question regarding the ADO AddNew method. I want to create a new record (insert) and then obtain the new records Identity value. Does anyone have some code for this? Is the right way to go about it to... 1.) Create an empty recordset by selecting on Identity =


AddNew problem-HELP!!! -
This has been plaguing me for weeks. I am trying to use the AddNew method of a disconnected ADO recordset in a form to add new records to an Access 2000 database. I'm using an adUseClient cursor location, OpenDynamic cursor type, and optimistic locking. Also, I have 2 DataCombo cont


Symbolic sub for Field name assgnment for recordsets -
I'm trying to make an update to record set and update field names day01, day02, day03, day04... I would like to perform this update by a for loop and then use recordsetname.day & itr = value... for the each iteration of the for loop... kind of like this... for i = 1 to countdays


Recordset Update {Resolved} -
I get the following error when trying to update a field in my SQL2000 database: -2147467259: Query-based update failed because the row to update could not be found. ID is the collumn with my unique ID and is also incremented by 1 mdb is my database connection Here is the code


Recordset pointer -
Hi, I've got a DBGrid(DBGrid1) that bound to a Data Control (Data1), where the RecordSource consists of 3 nested INNER JOIN's. Whenever I want to DELETE/UPDATE a record in the particular recordset (Data1) using VB's method, I get the error about Read-Only recordset. So, what I


What does this update error mean -
-2147467259 Insufficient key column information for updating or refreshing. The error occurs when I call the update method. I am using a recordset with a cursortype of adopenkeyset and a locktype of adlockoptimistic, but when I did a watch on my recordset it showed my


TDBCombo Help Needed -
I think these questions should be fairly simple for developers who have experience with the Apex controls. I can't find what I am looking for in the documentation. I am using the TDBCombo control and having two problems: How do I set the TDBCombo to a specific record in the drop


Binding Recordset to ADODC -
I wonder how to write my question because I can't speak english well. I hope i can explain all the rest. I am on the project of creating Distributed Database Application (Three Tier Application). I created a COM DLL component to take care all the business rules. Most method in it us


How can I update a recordset -
I want to update a recordset like the following. But the compiler says the the recordset is read-only. rs.Open sql, mocnn, adOpenKeyset, adLockOptimistic, adCmdText rs.MoveFirst rs(2) = "87" rs.Update


Recordset updating -
hi i am using vb front end and oracle back . need to know how to update only some columns of the table. For example adodc1.recordset.update will update all the records i.e. all the columns. I want to update specific columns like so adodc1.recordset.fields(0).value = txtaddre


recordset.sort -
friends, Does ADO 2.0 not support this method? I use Access mdb and jet oledb 3.5.1, the compiler warned this method is not supported by the provider. How to manage this? Update to new edition? Thanks!


SOLVED - Problem while opening recordset -
I am opening ADO.recordset object with following query SELECT E.empName,E.basic,E.current,S.increament,S.dateOfInc FROM employeeMaster E,empSalary S WHERE S.empCode = E.empCode But it is giving me error like "Method 'Open' of object '_Recordset' failed" I have checke