Row cannot be located for updating some values may have
Make sure you reference the latest version of 'Microsoft Active X Data Objects' in your project. Execute "Delete From tbl Where id In (list Of Ids)"rs Obj.requerydatagrid.refresh And that should do it. Also if this is helpful, please mark the post as so.-Matt You will need to create a connection and a recordset through ADO first. I know this because I put an "On Error Resume Next" command in the loop, and when I did that I get a Data Grid error w/o number (but not the numbered error referenced above) for each line, which if I click "OK" it deletes the line and moves on to the next one where it errors again. Just run that Sql Statement as the source argument in your connection objects execute method.-Matt ).
The only workaround I've found so far is to use the following: With db Main. So far, the only way I've managed to execute SQL from within my VB is using a "Datasource = str Query" command. TIA, Dan You will need to create a connection and a recordset through ADO first. This updated code should hopefully help out: With db Main. So at the time I get the error EOF is definitely *not* true; there can be as many as 15-20 records left in the recordset, and I can confirm it's the first one that's being deleted. OLEDB.4.0; Data Source=" & source Db, _ "Provider=Microsoft. OLEDB.4.0; Data Source=" & destination Db & "; Jet OLEDB: Engine Type=5"Also manually setting the indexes for your tables can easily be done using the 'Alter Table' Sql Command. Alter Table My Tbl Add Constraint [My Tbl_sdt Date Time_i Document] Unique Clustered (sdt Date Time,i Document Type)That is off the top of my head, it should be very close to that.
If bitten, immediately remove carefully with "fine-tipped tweezers" or "tick removal tool".
OSDBU Strategic Outreach ensures that Veteran-owned and other small businesses have access to programs and services to increase their participation in the federal marketplace.
This will open and set everything'Dim con Obj As New ADODB. Data Source = rs Objdatagrid.refresh'''''''''''''''''''''''' 2. Next use code similar to mine below to create the objects.'' 1. Open "Provider=SQEDB; Server=S1; Database=my DB","sa"rs Obj. Open "Select * From tbl", con Obj, ad Open Static, ad Lock Read Only Set datagrid. So anyhow, I'm *not* EOF at the error point, it's for *every* record that gets deleted. Let's follow up; there are two things I should do to "clean house" before I close this adventure:1) I'd like to reindex the database now that its records have been cut substantially. has an index field named "Index" (I never said I was creative ) that is sequentially numbered. This works fine except that eventually, the Index number will grow too large without resetting. Update Next x Unfortunately, it appears that either you can't use this method to write to the recordset, or my syntax is wrong.
Next use code similar to mine below to create the objects.'' 1. Open "Provider=SQEDB; Server=S1; Database=my DB","sa"rs Obj. Open "Select * From tbl", con Obj, ad Open Static, ad Lock Read Only Set datagrid. Make sure you reference the latest version of 'Microsoft Active X Data Objects' in your project. Execute "Delete From tbl Where id In (list Of Ids)"rs Obj.requerydatagrid.refresh And that should do it. Also if this is helpful, please mark the post as so.-Matt True. This is exactly as described in MS Bulletin Q300586, BTW. I tried to give your post the star it deserved, but the system bombed on post, so I'll try to acknowledge you properly later. Neither the Date Time nor Document fields in my database are unique in and of themselves, and since Access requires a primary key for a table, I have created one by sequentially numbering the records and putting the record number in a field called "Index." When a new record is added, it's just given an Index value that's incremented 1 above the last record.
I found in some VB documentation that you could run a SQL delete statement ("DELETE FROM [table] WHERE. "), but I could find no instructions on how to execute such a statement from within a VB routine.
Sorry I dont have any sample code, I did something similar to this in my last position and dont have it handy.-Matt Matt, You may be onto something here. .although then my question would be how to structure the Delete statement.Awards must also be made to VOSBs verified as such by VA.