我有PgSqlCommandBuilder.DeriveParameters函数的问题。有时它会抛出异常“未知参数方向”,没有任何明显的原因。问题很少发生。当我得到第一个异常时,它会一直抛出所有后续调用,直到。重新启动我的应用程序后,它正常工作。我有6.8.322版。有没有,类似的问题?我尝试与它斗争一段时间但没有成功。
完整堆栈跟踪
System.Exception: Unknown parameter direction.
at Devart.Data.PostgreSql.l.a (System.Data.Common.DbConnection A_0, System.String[] A_1) [0x00000] in <filename unknown>:0
at Devart.Data.PostgreSql.l.a (System.Data.Common.DbConnection A_0, Devart.Common.DbConnectionInternal A_1, System.String A_2, System.String[] A_3) [0x00000] in <filename unknown>:0
at Devart.Common.DbConnectionInternal.a (Devart.Common.DbConnectionBase A_0, System.String A_1, System.String[] A_2) [0x00000] in <filename unknown>:0
at Devart.Common.DbConnectionBase.GetSchema (System.String collectionName, System.String[] restrictionValues) [0x00000] in <filename unknown>:0
at Devart.Data.PostgreSql.PgSqlCommand.DescribeProcedure (System.String name) [0x00000] in <filename unknown>:0
at Devart.Common.DbCommandBase.CreateParameters () [0x00000] in <filename unknown>:0
at Devart.Data.PostgreSql.PgSqlCommand.c () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) Devart.Data.PostgreSql.PgSqlCommand:c ()
at Devart.Data.PostgreSql.PgSqlCommandBuilder.DeriveParameters (Devart.Data.PostgreSql.PgSqlCommand command) [0x00000] in <filename unknown>:0
at #Zs.#Ys.#Us (Devart.Data.PostgreSql.PgSqlCommand #Vs, System.Object[] #Ws) [0x00000] in <filename unknown>:0
at #Zs.#Ys.#Xs (System.String #Ms, #Ns #Ns, System.Object[] #Ac) [0x00000] in <filename unknown>:0 at Devart.Data.PostgreSql.l.a (System.Data.Common.DbConnection A_0, System.String[] A_1) [0x00000] in <filename unknown>:0
at Devart.Data.PostgreSql.l.a (System.Data.Common.DbConnection A_0, Devart.Common.DbConnectionInternal A_1, System.String A_2, System.String[] A_3) [0x00000] in <filename unknown>:0
at Devart.Common.DbConnectionInternal.a (Devart.Common.DbConnectionBase A_0, System.String A_1, System.String[] A_2) [0x00000] in <filename unknown>:0
at Devart.Common.DbConnectionBase.GetSchema (System.String collectionName, System.String[] restrictionValues) [0x00000] in <filename unknown>:0
at Devart.Data.PostgreSql.PgSqlCommand.DescribeProcedure (System.String name) [0x00000] in <filename unknown>:0
at Devart.Common.DbCommandBase.CreateParameters () [0x00000] in <filename unknown>:0
at Devart.Data.PostgreSql.PgSqlCommand.c () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) Devart.Data.PostgreSql.PgSqlCommand:c ()
at Devart.Data.PostgreSql.PgSqlCommandBuilder.DeriveParameters (Devart.Data.PostgreSql.PgSqlCommand command) [0x00000] in <filename unknown>:0
at #Zs.#Ys.#Us (Devart.Data.PostgreSql.PgSqlCommand #Vs, System.Object[] #Ws) [0x00000] in <filename unknown>:0
at #Zs.#Ys.#Xs (System.String #Ms, #Ns #Ns, System.Object[] #Ac) [0x00000] in <filename unknown>:0
SQL
SELECT pr.proname as name,
TYPNS.nspname AS Schema,
TYP.typname as ReturnType,
proargtypes as InParams,
pr.oid as FunctionOID,
proallargtypes as OutParams,
proargmodes as ArgumentModes,
proargnames as ArgumentNames
FROM pg_proc pr
JOIN pg_namespace TYPNS ON TYPNS.oid = pr.pronamespace
LEFT OUTER JOIN pg_type TYP ON TYP.oid = prorettype
WHERE proisagg = FALSE
AND TYPNS.nspname like E'%'
AND pr.proname like E'gethostslimit'
AND pg_get_userbyid(proowner)::varchar like E'%'
AND TYP.typname like E'%'
AND pr.oid = E'28444'
ORDER BY proname, FunctionOID;
RETURN
"name";"schema";"returntype";"inparams";"functionoid";"outparams";"argumentmodes";"argumentnames"
"gethostslimit";"public";"record";"2950";28444;"{2950,23,23}";"{i,o,o}";"{sessionuidparam,exitcode,hostslimit}"