0

I have to call a previously created function on SQL, like

SET  @ExtVALUE = sysdba.GetNextAccountExternalId('{TYPE}')  

but I can't manage to find if OPF3 has some of this functionality already.

Need to use OPF3, direct access to the SQL connection is not feasible in the architecture.

I think in a solution somewhat like this:

var functionQuery = "select sysdba.GetNextAccountExternalId('{0}') as result";

objContext.GetObjectReader<>();

What class should I put inside the <> ???

4

1 回答 1

0

只是为了记录,

var functionQuery = String.Format("SELECT sysdba.GetNextAccountExternalId('{0}')", account.Type);

var functionResult = (string)new SqlRawStorageAccess(Context.Storage as SqlStorageBase).
                                CreateCommand(new SqlQuery(functionQuery)).ExecuteScalar();

作品。

于 2010-02-04T16:07:06.077 回答