Hi, I have developed a Windows app using Python to access Visual FoxPro database using OLE DB Provider. Whenever I use parameterized query, it failed with the following error:
(-2147352567, 'Exception occurred.', (0, u'ADODB.Parameters', u'Item cannot be found in the collection corresponding to the requested name or ordinal.', u'C:\\WINDOWS\\HELP\\ADO270.CHM', 1240649, -2146825023), None) I noticed that adodbapi._buildADOparameterList() invokes self.cmd.Parameters.Refresh(). After Refresh() is called, the Parameters.Count() becomes 0. When I comment out this and forced adodbapi to manually build the parameter list, it works. Can adodbapi provide some ways to configure so that it has an option to always build the parameter list manually? As an additional note, the original adodbapi (i.e. with Refresh()) works fine with the OLEDB for Access 2007 [Provider=Microsoft.ACE.OLEDB.12.0], it just failed with OLEDB for VFP [Provider=VFPOLEDB.1] unless Refresh() is not called. Thanks. Regards, Kenneth Chin ----- Environment: Windows XP Pro SP3, Python 2.7.3, pywin32-217, adodbapi 2.4.2.2, OLEDB for VFP 9.0 [1] [1] Microsoft OLE DB Provider for Visual FoxPro 9.0 http://www.microsoft.com/en-us/download/details.aspx?id=14839 _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32