ADO Provider Error ("Please Help") 
Author Message
 ADO Provider Error ("Please Help")

I have this simple code (shown below) and I get the following error when I
run it.

<<<Object or provider is not capable of performing requested operation.>>>

I can't figure out what the problem is.  If anyone can help me I would be
very happy.  Thanks for the help.
Guy

Private Sub Form_Load()
  Dim cnn As ADODB.Connection
  Dim rst As ADODB.Recordset
  Dim sSql As String
  Dim sResponse As String

  sResponse = InputBox("Enter User Name")

  On Error GoTo errHandle

  Set cnn = New ADODB.Connection
  With cnn
    .Provider = "Microsoft.Jet.OLEDB.4.0"
    .ConnectionString = "C:\temp\DBlcl.mdb"
    .Open
  End With

  Set rst = New ADODB.Recordset
  sSql = "SELECT User_Name FROM tblUser"
  With rst
    .ActiveConnection = cnn
    .CursorLocation = adUseClient
    .CursorType = adOpenKeyset
    .Open sSql, , , , adCmdText
  End With
  rst.AddNew
  rst!User_Name = sResponse
  rst.Update

  Exit Sub

errHandle:
  MsgBox Err.Description
End Sub



Fri, 20 Sep 2002 03:00:00 GMT  
 ADO Provider Error ("Please Help")
I am taking a guess as to the cause of the error, but I know that KeySet
cursors are not supported on the client.  The only cursor type that is
supported on the client is Static, so  you may want to try:

   With rst
     .ActiveConnection = cnn
     .CursorLocation = adUseClient
     .CursorType = adOpenStatic
     .Open sSql, , , , adCmdText
   End With

OR

   With rst
     .ActiveConnection = cnn
     .CursorLocation = adUseServer
     .CursorType = adOpenKeyset
     .Open sSql, , , , adCmdText
   End With

Matthew Arnheiter
Flash Creative Management


Quote:
> I have this simple code (shown below) and I get the following error when I
> run it.

> <<<Object or provider is not capable of performing requested operation.>>>

> I can't figure out what the problem is.  If anyone can help me I would be
> very happy.  Thanks for the help.
> Guy




Sun, 22 Sep 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Provider Error ("Please Help")

2. VB6 ADO, Jet "Error initializing provider"

3. ADO - "Unable to locate Provider" error

4. VB6 ADO, Jet "Error initializing provider"

5. VB6 ADO, Jet "Error initializing provider"

6. "Provider cannot be found" runtime error

7. "Provider cannot be found" runtime error

8. "...an error in initializing provider..."

9. Help please with "Run time error"

10. Help-"Error5-Logon Failed"-HELP PLease!!!!!!-Crystal Report

11. ADO "syntax error in FROM clause"

12. Oracle "Insufficient Privileges" ADO Error

 

 
Powered by phpBB® Forum Software