I need help regarding run time error ‘-2147467259’ (80004005). I am using Ms-excel, vb6. My application is working very fine. I can add and update data through this but when I am going to delete data giving me an error message ““run time error 2147467259(80004005)”” . If anyone knows about this, please help.
Excellent message to all, thanks
Do you have rights to delete from the DB? Can you execute that statement via regular SQL? Do you need a semi-colon ; after the SQL statement? What’s the apostrophe-space for – & "’ "? Also, unrelated, shouldn’t you have an apostrophe before your '// since this is VBA?
// connection
Public conDB As New ADODB.connection
conDB.Open “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:teststu.xls;Extended Properties=”“Excel 8.0;HDR=YES;”“”
// delete record from MS excel
Dim strsql As String
strsql = “DELETE from student Where roll='” & Trim(txtroll) & "’ "
conDB.BeginTrans
conDB.Execute strsql
conDB.CommitTrans
Can you show us the code and SQL that is giving this error?
Don’t update ( if update the data in vb6 is consider as new data ).