You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Jochen Lillich <jl...@teamlinux.de> on 2001/06/09 14:04:02 UTC
DBIx::Recordset::DBSeq
Hi,
I'd like to use DBIx::Recordset::DBSeq for the sequencing of generic
primary keys in a PostgreSQL (Pg) database. But I encountered two
problems:
1. DBSeq uses "LOCK TABLE xy WRITE" to get a write lock. With Pg, this
doesn't work, because the SQL command has another syntax there --
Pg doesn't understand the "WRITE" part. Is there an easy way to
achieve database compatibility? Or should I simply derive my own
DBSeqPg class?
2. How can I pass the DBI handle of a DBIx::Database onto
DBIx::Recordset::DBSeq via the "!SeqClass" parameter of a
DBIx::Recordset?
TIA,
Jochen
--
----------------------------------------------------------------
*Jochen Lillich*, Consultant/Trainer @ /TeamLinux GbR/
Rheinstr. 26, 76676 Graben-Neudorf, Germany
Tel. +49 7255 76784-12, Fax -50, http://www.teamlinux.de
----------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: DBIx::Recordset::DBSeq
Posted by Jochen Lillich <jl...@teamlinux.de>.
Gerald Richter schrieb am Sun, 10 Jun 2001 12:57:08 +0200:
> DBSeq is to emulate sequences on databases that doesn't support
> squences (e.g. mysql). Pg have sequences, so I don't see a need to
> use DBSeq here.
You're right.
I thought that generally using DBSeq would be a portability plus. But
surely it wouldn't be a performance plus. Conclusion: I'll use Pg's
sequence features.
Thanks!
Jochen
--
----------------------------------------------------------------
*Jochen Lillich*, Consultant/Trainer @ /TeamLinux GbR/
Rheinstr. 26, 76676 Graben-Neudorf, Germany
Tel. +49 7255 76784-12, Fax -50, http://www.teamlinux.de
----------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: DBIx::Recordset::DBSeq
Posted by Gerald Richter <ri...@ecos.de>.
Hi,
>
> I'd like to use DBIx::Recordset::DBSeq for the sequencing of generic
> primary keys in a PostgreSQL (Pg) database. But I encountered two
> problems:
>
DBSeq is to emulate sequences on databases that doesn't support squences
(e.g. mysql). Pg have sequences, so I don't see a need to use DBSeq here.
Simply specifing the !Serial parameter when you setup your recordset and
createing a sequence named <tablename>_seq should be enough.
If this is not what you want to do let me know
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925131
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Why does some code work in base.epl and not under Execute?
Posted by Gary Nielson <gn...@charlotte.infi.net>.
Thank you. That worked.
On 12 Jun 2001, Chris Strom wrote:
> Gary Nielson <gn...@charlotte.infi.net> writes:
>
> > Hi,
> >
> > I am just trying to figure out why the following code works when included
> > in base.epl, but not when called with Execute from another .epl file (as
> > in [- Execute ('picture.epl') -]:
>
> As written, this won't work because $html is not defined in the picture.epl
> template. You would have to pass it as a parameter in the Execute
> statement:
>
> [- Execute('picture.epl', $html) -]
>
> Then, in picture.epl read that parameter in:
>
> [- ($html) = @param; -]
>
> If you're using EmbperlObject, you can also use the $req variable to store
> data that's passed between templates.
>
> >
> > [$ if ($html =~ /Lower/i ) $]
> > <img
> > src="grafix/lower_school_pic.gif" width="171" height="171" border="0">
> > [$ endif $]
> >
> > [$ if ($html =~ /Middle/i ) $]
> > <img
> > src="grafix/middle_school_pic.gif" width="171" height="171" border="0">
> > [$ endif $]
> >
> > [$ if ($html =~ /Upper/i ) $]
> > <img
> > src="grafix/upper_school_pic.gif" width="171" height="171" border="0">
> > [$ endif $]
> >
> > [$ if ($html !~ /Lower|Middle|Upper/i ) $]
> > <IMG SRC="[+ $dir +]grafix/index_pic.gif" width=171 height=171 border=0>
> > [$ endif $]
> >
> > When called with Execute, the code runs the last if statement.
> >
> > Any help appreciated.
> >
> > Gary
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
>
--
Gary Nielson
gary@garynielson.com
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Why does some code work in base.epl and not under Execute?
Posted by Chris Strom <cs...@cos.com>.
Gary Nielson <gn...@charlotte.infi.net> writes:
> Hi,
>
> I am just trying to figure out why the following code works when included
> in base.epl, but not when called with Execute from another .epl file (as
> in [- Execute ('picture.epl') -]:
As written, this won't work because $html is not defined in the picture.epl
template. You would have to pass it as a parameter in the Execute
statement:
[- Execute('picture.epl', $html) -]
Then, in picture.epl read that parameter in:
[- ($html) = @param; -]
If you're using EmbperlObject, you can also use the $req variable to store
data that's passed between templates.
>
> [$ if ($html =~ /Lower/i ) $]
> <img
> src="grafix/lower_school_pic.gif" width="171" height="171" border="0">
> [$ endif $]
>
> [$ if ($html =~ /Middle/i ) $]
> <img
> src="grafix/middle_school_pic.gif" width="171" height="171" border="0">
> [$ endif $]
>
> [$ if ($html =~ /Upper/i ) $]
> <img
> src="grafix/upper_school_pic.gif" width="171" height="171" border="0">
> [$ endif $]
>
> [$ if ($html !~ /Lower|Middle|Upper/i ) $]
> <IMG SRC="[+ $dir +]grafix/index_pic.gif" width=171 height=171 border=0>
> [$ endif $]
>
> When called with Execute, the code runs the last if statement.
>
> Any help appreciated.
>
> Gary
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Why does some code work in base.epl and not under Execute?
Posted by Gary Nielson <gn...@charlotte.infi.net>.
Hi,
I am just trying to figure out why the following code works when included
in base.epl, but not when called with Execute from another .epl file (as
in [- Execute ('picture.epl') -]:
[$ if ($html =~ /Lower/i ) $]
<img
src="grafix/lower_school_pic.gif" width="171" height="171" border="0">
[$ endif $]
[$ if ($html =~ /Middle/i ) $]
<img
src="grafix/middle_school_pic.gif" width="171" height="171" border="0">
[$ endif $]
[$ if ($html =~ /Upper/i ) $]
<img
src="grafix/upper_school_pic.gif" width="171" height="171" border="0">
[$ endif $]
[$ if ($html !~ /Lower|Middle|Upper/i ) $]
<IMG SRC="[+ $dir +]grafix/index_pic.gif" width=171 height=171 border=0>
[$ endif $]
When called with Execute, the code runs the last if statement.
Any help appreciated.
Gary
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Problem getting a javascript to load
Posted by Gerald Richter <ri...@ecos.de>.
Hi,
>
> I am having difficulty getting a javascript to load using Embperl-1.3.2
> under Redhat 5.2 and perl 5.004_04, loading pages through epocgi.pl.
>
>...
> It just plain won't load on the page. Outside of embperl, the script loads
> just fine. It's a dynamic navigation menu script.
>
I don't think that this related to Embperl. Maybe you have different paths
with and without Embperl and the js files are not found when running under
Embperl. The other thing is that you should make sure that your js files are
not handled by EmbperlObject / epocgi, because when this happens they become
included in your base template so the browser doesn't recognice them as
javescript anymore
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925131
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Page loading stalls under Netscape 4.72 for Linux
Posted by Gary Nielson <gn...@charlotte.infi.net>.
Thanks. I upgraded to 1.3.3 and found that my other problem I emailed the
list about -- not being able to load a javascript under epocgi -- went
away as well. Everything is working fine now.
On Sun, 10 Jun 2001, Gerald Richter wrote:
>
>
> Hi,
> >
> > I am noticing -- so far only under Netscape 4.72 for Linux -- that pages I
> > have running under epocgi.pl do not fully load. They stall out at about
> > 99% loading and I have to hit the Stop button to stop the load
> > process.
>
> Fixed in 1.3.3
>
> Gerald
>
>
> -------------------------------------------------------------
> Gerald Richter ecos electronic communication services gmbh
> Internetconnect * Webserver/-design/-datenbanken * Consulting
>
> Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
> E-Mail: richter@ecos.de Voice: +49 6133 925131
> WWW: http://www.ecos.de Fax: +49 6133 925152
> -------------------------------------------------------------
>
>
--
Gary Nielson
gary@garynielson.com
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Page loading stalls under Netscape 4.72 for Linux
Posted by Gerald Richter <ri...@ecos.de>.
Hi,
>
> I am noticing -- so far only under Netscape 4.72 for Linux -- that pages I
> have running under epocgi.pl do not fully load. They stall out at about
> 99% loading and I have to hit the Stop button to stop the load
> process.
Fixed in 1.3.3
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925131
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Page loading stalls under Netscape 4.72 for Linux
Posted by Gary Nielson <gn...@charlotte.infi.net>.
Hi,
I am noticing -- so far only under Netscape 4.72 for Linux -- that pages I
have running under epocgi.pl do not fully load. They stall out at about
99% loading and I have to hit the Stop button to stop the load
process. The page never completely loads, with a "Transfer
Interrupted!" statement at the bottom of the page. I haven't noticed this
under Windows, either with IE or Netscape. Does anyone know what would
cause this and if it is either a bug in the browser or a misconfiguration
of embperl on my part that needs correcting? If it's a browser bug, it's
no big deal, most of my users use Windows browsers. If it's something I
can correct on my end, though, what do I need to do? Any help appreciated.
Gary
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Problem getting a javascript to load
Posted by Gary Nielson <gn...@charlotte.infi.net>.
Hi,
I am having difficulty getting a javascript to load using Embperl-1.3.2
under Redhat 5.2 and perl 5.004_04, loading pages through epocgi.pl.
At the bottom of base.epl, I place this:
<SCRIPT
LANGUAGE="JavaScript1.2" SRC="HM_Loader.js" TYPE='text/javascript'></SCRIPT>
which calls a javascript file which calls several other files:
HM_Arrays.js
HM_ScriptDOM.js
HM_ScriptIE4.js
HM_ScriptNS4.js
It just plain won't load on the page. Outside of embperl, the script loads
just fine. It's a dynamic navigation menu script.
What am I doing wrong? How can I get this to run? Any help
appreciated.
Thanks.
Gary
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org