Re: create and insert

[prev] [thread] [next] [Date index for 2005/01/20]

From: Hartmaier Alexander
Subject: Re: create and insert
Date: 16:24 on 20 Jan 2005
I scan for new interfaces on my devices via snmp automatically and insert=
 them in a 'scaninterface' table.
When somebody selects a new interface on the webgui it gets loaded from t=
he 'scaninterface' table with a this call:
($obj_new_interface) =3D NAC::Interface->search_from_scan($newport);

This is the definition im my NAC::Interface class:
__PACKAGE__->set_sql('from_scan', 'SELECT fk_device, port, name, snmpid, =
snmpid_rtt, type, speed, mtu, ipaddr, ipnetmask, description FROM nacadm.=
scaninterface WHERE port =3D ?');

I have also defined the sequence of my oracle db:
__PACKAGE__->sequence('seq_interface');
I is not needed that Class::DBI gets a value from the sequence, because a=
n oracle trigger is defined for every table to do this.

-Alex


-----Urspr=FCngliche Nachricht-----
Von: Dana Hudes [mailto:dhudes@xxxxxx.xxxx]=20
Gesendet: Donnerstag, 20. Januar 2005 17:06
An: Hartmaier Alexander
Cc: Class:DBI maillist
Betreff: Re: create and insert



On Thu, 20 Jan 2005, Hartmaier Alexander wrote:
>=20
> -          How can I create an object in memory without a primary key
> and insert it if needed (or not)? (partially answered by my second
> question...)

Unless your primary key is a SERIAL, this makes no sense.
How can you have a record with no key, unless its a SERIAL therefore=20
auto-created?

*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*=
"*"*
Hinweis: Dieses E-mail kann vertrauliche und gesch=FCtzte Informationen e=
nthalten.
Sollten Sie nicht der beabsichtigte Empf=E4nger sein, verst=E4ndigen Sie =
bitte den Absender und l=F6schen Sie dieses E-mail dann sofort.

Notice: This e-mail contains information that is confidential and may be =
privileged.
If you are not the intended recipient, please notify the sender and then =
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*=
"*"*

(message missing)

create and insert
Hartmaier Alexander 16:00 on 20 Jan 2005

Re: create and insert
Dana Hudes 16:06 on 20 Jan 2005

Re: create and insert
Hartmaier Alexander 16:24 on 20 Jan 2005

Re: create and insert
Jay Strauss 17:45 on 20 Jan 2005

Re: create and insert
Perrin Harkins 18:46 on 20 Jan 2005

Re: create and insert
Jay Strauss 19:33 on 20 Jan 2005

Re: create and insert
Perrin Harkins 19:51 on 20 Jan 2005

Re: create and insert
Jay Strauss 17:39 on 20 Jan 2005

Re: create and insert
Peter Speltz 17:53 on 20 Jan 2005

Re: create and insert
Peter Speltz 18:06 on 20 Jan 2005

Re: create and insert
Hartmaier Alexander 09:40 on 21 Jan 2005

Re: create and insert
Jay Strauss 15:41 on 21 Jan 2005

Re: create and insert
Perrin Harkins 19:35 on 21 Jan 2005

Re: create and insert
Peter Speltz 05:50 on 22 Jan 2005

Re: create and insert
Perrin Harkins 17:19 on 22 Jan 2005

Re: create and insert
Peter Speltz 17:43 on 22 Jan 2005

Re: create and insert
Perrin Harkins 19:09 on 22 Jan 2005

Re: create and insert
Peter Speltz 22:22 on 22 Jan 2005

Re: create and insert
Perrin Harkins 00:18 on 23 Jan 2005

Re: create and insert
Hartmaier Alexander 14:07 on 24 Jan 2005

Re: create and insert
William McKee 16:15 on 24 Jan 2005

Re: create and insert
Peter Speltz 16:28 on 24 Jan 2005

Re: create and insert
Hartmaier Alexander 16:38 on 24 Jan 2005

Generated at 17:42 on 27 Jan 2005 by mariachi v0.52