Passing variables to PostgreSQL database
Posted: Fri 21 Jan 2011 18:21
Using
VB.net 2010
The latest devart.data.PostgreSQL version
PostgreSQL 9.0.2
Hi, I will ask the question and then explain what I’m doing.
Question: Is there a way to pass a variable from an application user interface to the database such that it would be visible to a database trigger and any corresponding function call?
When a record gets deleted, I have a database trigger that fires and writes to a log table. What I want to do is pass a variable from the user interface to the trigger function so I can include this variable in the log record that gets created. I’m not sure how this could even be accomplished unless somehow it was possible to pass a variable through the data connection itself. But even then, how would the trigger function be able to read it and pass it along?
I’m thinking it’s not possible but thought I would ask anyway.
Thanks,
Chris Campbell
VB.net 2010
The latest devart.data.PostgreSQL version
PostgreSQL 9.0.2
Hi, I will ask the question and then explain what I’m doing.
Question: Is there a way to pass a variable from an application user interface to the database such that it would be visible to a database trigger and any corresponding function call?
When a record gets deleted, I have a database trigger that fires and writes to a log table. What I want to do is pass a variable from the user interface to the trigger function so I can include this variable in the log record that gets created. I’m not sure how this could even be accomplished unless somehow it was possible to pass a variable through the data connection itself. But even then, how would the trigger function be able to read it and pass it along?
I’m thinking it’s not possible but thought I would ask anyway.
Thanks,
Chris Campbell