[IronPython] Advantage Database ado.net provider difficulties

Hank Fay hank at prosysplus.com
Wed Apr 28 05:08:54 CEST 2010

I'm trying to use the Advantage Database ado.net provider ( working
in IronPython (2.6.1003.1).  OS is Win7 x64; IDE is #develop
 I'm getting an error that isn't telling me much.  This is based on a C#
example I have running on the same machine, in VS2010 RTM.

Here's the code (Advantage.Data.Provider.dll is referenced in the project).
 It blows up on the last line, with the error noted below the code.  My hope
is that the error will mean more to those with more experience than I and
point me in a useful direction.  FYI: the code references a directory as a
database, and the CommandText selects a field from a DBF that is a free
table, that is, not part of a VFP database container (if you were to get the
idea that I'm retreading in IP after 24 years developing in xBase languages,
you would hit the mark <s>).

import Advantage.Data.Provider
from Advantage.Data.Provider import *

_conn = Advantage.Data.Provider.AdsConnection("data
ServerType=local; TableType=CDX")
_cmd = _conn.CreateCommand()
_cmd.CommandText = "select name from ddent"
_reader = _cmd.ExecuteReader()

And the error:

Advantage.Data.Provider.AdsException: System error.
   at Microsoft.Scripting.Actions.Calls.MethodCandidate+Caller.Call(Object[]
args, Boolean shouldOptimize)
site, CodeContext context, Object func, String arg0, PythonDictionary arg1,
PythonDictionary arg2, PythonTuple arg3, Int32 arg4)
   at System.Dynamic.UpdateDelegates.UpdateAndExecute7(CallSite site, Object
arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5,
Object arg6)
   at IronPython.Runtime.Importer.Import(CodeContext context, String
fullName, PythonTuple from, Int32 level)
   at IronPython.Runtime.Operations.PythonOps.InitializeModule(Assembly
precompiled, String main, String[] references)
   at PythonMain.Main()


Hank Fay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100427/86e2d2aa/attachment.html>

More information about the Ironpython-users mailing list