Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Invalid Bracketing of Name '.'. (Recordset.UpdateBatch)


Message #1 by "Phillip Johnson" <phillip.johnson@e...> on Thu, 15 Nov 2001 14:04:54
One thing that I notice about your code is that you are calling the Open
method of the Recordset object before setting its ActiveConnection property.

=================================
Kyle M. Burns, MCSD, MCT
ECommerce Technology Manager
Centra Credit Union
kburns@c...

 

-----Original Message-----
From: Toby Bascom [mailto:ThomasOBascom@c...]
Sent: Wednesday, November 21, 2001 2:00 AM
To: professional vb
Subject: [pro_vb] Re: Invalid Bracketing of Name '.'.
(Recordset.UpdateBatch)


I think you need  to set the lock type before opening the recordset:

             .LockType=adLockBatchOptimistic

By default, the LockType is adLockReadOnly


Regards,

>From: "Phillip Johnson" <phillip.johnson@e...>
>Date: Tue, 20 Nov 2001 09:19:46
>X-Message-Number: 7
>
>Thanks for the suggestion, but it doesnt seem so.  Below is the code I am
>using.  I got it from DevX (a magazine and website).  The code I actually
>downloaded gets the same error so I dont know whats wrong with it.
>     'Open the XML from the file
>     Set rs = New ADODB.Recordset
>     With rs
>         .CursorLocation = adUseClient
>         .Open strFilePath
>         Set .ActiveConnection = cn
>         '.UpdateBatch adAffectCurrent    '   This line throws the error.
>         '.Close
>     End With



  Return to Index