Click here to Skip to main content
15,880,427 members
Articles / DevOps / Load Testing

Sample Session Providers with PostgreSQL

Rate me:
Please Sign up or sign in to vote.
3.50/5 (3 votes)
18 Apr 2007CPOL10 min read 45.8K   478   19  
Several custom Session State providers for TextFile, ODBC, and PostgreSQL.
-- Function: aspnet_application_insert(name bpchar)

-- DROP FUNCTION aspnet_application_insert(name bpchar);

CREATE OR REPLACE FUNCTION aspnet_application_insert(IN iName aspnet_application.appname%TYPE, OUT oRowId integer)
AS
$BODY$

BEGIN
-- see if already there
SELECT appid into oRowId FROM aspnet_application
WHERE appname = iName;

-- if not there insert it in
IF oRowId IS NULL THEN
    INSERT INTO aspnet_application(
            appid, appname, createdate)
    VALUES (DEFAULT,iName , DEFAULT);
   oRowId:= currval('aspnet_application_appid_seq');
END IF;
END;
$BODY$
  LANGUAGE 'plpgsql' VOLATILE;
ALTER FUNCTION aspnet_application_insert(in iName aspnet_application.appname%TYPE, OUT oRowId integer) OWNER TO testsession;

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader
United States United States
A biography in this little spot...sure.
I've worked at GTE HawaiianTel. I've worked at Nuclear Plants. I've worked at Abbott Labs. I've consulted to Ameritech Cellular. I've consulted to Zurich North America. I've consulted to International Truck and Engine. Right now, I've consulted to Wachovia Securities to help with various projects. I've been to SHCDirect and now at Cision.

During this time, I've used all kinds of tools of the trade. Keeping it to the more familier tools, I've used VB3 to VB.NET, ASP to ASP/JAVASCRIPT/XML to ASP.NET. Currently, I'm developing with C# and ASP.NET. I built reports in Access, Excel, Crystal Reports, and Business Objects (including the Universes and ETLS). Been a DBA on SQL Server 4.2 to 2000 and a DBA for Oracle. I've built OLTP databases and DataMarts. Heck, I've even done Documentum. I've been lucky to have created software for the single user to thousands of concurrent users.

I consider myself fortunate to have met many different people and worked in many environments. It's through these experiences I've learned the most.

Comments and Discussions