Search found 2 matches

by asaxena
Fri 10 Feb 2006 22:38
Forum: dotConnect for PostgreSQL
Topic: difference between single developer and other version of driver
Replies: 3
Views: 2560

site license?

I bought the "PostgreSQLDirect .NET Standard single license", but am having a difficult time running it on 2 applications in the same domain (for the same company, ie: storefront and admin). You mentioned a "site license", what are the details of it (price, etc), will that suit my needs better? I don't see it offered on the ordering page.

Thanks
by asaxena
Wed 01 Feb 2006 15:01
Forum: dotConnect for PostgreSQL
Topic: CoreLab.PostgreSql.PgSqlException
Replies: 1
Views: 2956

CoreLab.PostgreSql.PgSqlException

I working with PostgreSQL and ASP.NET. I've created a stored procedure in PostgreSQL and am trying to call it through my code, but its returning an error that the function is not found.

Anyone have an example of calling a stored procedure in PostgreSQL from ASP.NET(1.1 C#), or can help me figure out what I'm doing wrong?...

I'm using "PostgreSQLDirect .NET Standard for .NET Framework 1.x (version 2.40.13)"

Here is the Stored procedure I created.

Code: Select all

CREATE OR REPLACE FUNCTION "CMRC_SP_SetNewOrder"()
  RETURNS void AS
begin
SELECT COUNT( DISTINCT CMRC_Orders.OrderID ) AS scount, CMRC_OrderStatus.StatusName, CMRC_OrderStatus.StatusID FROM CMRC_Orders INNER JOIN CMRC_OrderStatus ON CMRC_Orders.OrderStatus = CMRC_OrderStatus.StatusID LEFT OUTER JOIN CMRC_OrderDetails ON CMRC_Orders.OrderID = CMRC_OrderDetails.OrderID WHERE ( CMRC_Orders.OrderStatus = 1 ) GROUP BY CMRC_OrderStatus.StatusName, CMRC_OrderStatus.StatusID;
End;
  LANGUAGE 'plpgsql';

Here is the code (ASP.NET 1.1 C#)

Code: Select all

public  PgSqlDataReader  setNewOrder()
{
    // Create Instance of Connection and Command Object
    PgSqlConnection pgSqlConnection1 = new PgSqlConnection( ConfigurationSettings.AppSettings["ConnectionString"] );

    pgSqlConnection1.Open ();

    CoreLab.PostgreSql.PgSqlCommand Cmd = new CoreLab.PostgreSql.PgSqlCommand( "CMRC_SP_SetNewOrder", pgSqlConnection1 );

    // Mark the Command as a SPROC
    Cmd.CommandType = CommandType.StoredProcedure;

    // Return the datareader result
    return Cmd.ExecuteReader( CommandBehavior.CloseConnection );
}
Here is the error that I'm getting:
CoreLab.PostgreSql.PgSqlException: function cmrc_sp_setneworder() does not exist...

Any help or direction would be a great help...
thanks