carl at carl-olsen.com
Mon Jun 20 06:43:10 EDT 2005
I have everything working now. If you look on my home page, you'll see a
hit counter that uses 8 stored procedures, create, update, delete,
get_details, get_count, get_id, get_table, get_totals. It tracks each IP
address separately, which you can't see by looking at the home page. It
gets instantiated in the global.asax.cs file in the session_start section.
The code is broken into three sections: (1) the ADO.NET layer converts all
of the stored procedures into function calls; (2) the configuration layer
reads the connection string from an XML file; and (3) the business layer
uses the ADO.NET and configuration layer to actually do the calculations.
I'm feeling like I have a good handle on this now, so I'll start to build
some more complex structures.
Yes, the input parameters inside the function calls in the ADO.NET layer
need single quotes around the strings and nothing around the integers.
From: mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Chris Aitken
Sent: Monday, June 20, 2005 3:13 AM
To: carl at carl-olsen.com; mono-list at lists.ximian.com
Subject: RE: [Mono-list] Npgsql.dll
> Here's my parameterized function:
> CREATE OR REPLACE FUNCTION getsenators(text)
> RETURNS SETOF senators AS
> input ALIAS FOR $1;
> r senators%rowtype;
> FOR r IN SELECT s_fname,s_lname,s_email
> FROM senate_members WHERE s_party=input LOOP
> RETURN NEXT r;
> END LOOP;
> LANGUAGE 'plpgsql' VOLATILE;
> When I type SELECT * FROM getsenators('D') I get the correct
> set of records.
> I'm not even sure why it wasn't working before or what I did
> to fix it, but I now have working examples I can copy and use
> as templates.
Your previous select (that didn't work) had " instead if '. Unsure if that
was a typo - but the error message looks to confirm the fact that double
quotes were used.
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Mono-list maillist - Mono-list at lists.ximian.com
More information about the Mono-list