How do I debug VB error #80004005

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

According to my research, VB error 80004005 (-2147467259) is an "Unspecified
Error" - which isn't exactly helpful <grrr>. The error description in the VB
error pop-up is a bit better, giving "Method 'Open' of object '_Recordset'
failed" (I mean "very little bit" better <sigh>).

Here's the (pared down) code fragment (the error shows up on the Open method):


Private Sub Button1_Click()

Dim recset As ADODB.Recordset
Set recset = New ADODB.Recordset

With recset
.ActiveConnection = CurrentProject.connection
.CursorType = adOpenKeyset
.LockType = adLockOptimistic

.Open Source:="SELECT * from Names" '', Options:=adCmdText
'' ^
'' |
'' +---- Error on this line

End With

End Sub

I'm running Access 6 (11.5614.5606) with VB 6.3


ALL HELP WELCOME!
 
The pair of apostrophese seems wrong:

Source:="SELECT * from Names" '',

What happens if you delete them?
 
Back
Top