Hi
We do it like this:
Before you execute the insert statement, get the pk-value by calling the
following proc:
public static int GetSeqVal(string shortTName)
{ using(OracleConnection co=GetCon())
{ OracleCommand cmd=new OracleCommand("select "+shortTName+"_seq.nextval
from dual",co);
co.Open();
String rslt = cmd.ExecuteScalar().ToString();
co.Close();
return Convert.ToInt32(rslt);
}
}
So..don't use a DB-Trigger to fill the pk-value
Regards
Database,
but my client has a sequence fort the PK of the table, how do i get the
value generated by the sequence? Without this value i can't insert child
records...