------=_Part_19846_4532381.1204554696125
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On Sun, Mar 2, 2008 at 11:06 PM, Premsun Choltanwanich
<Premsun@[EMAIL PROTECTED]
>
wrote:
> Dear All,
>
> Regarding to my conversation on mailing list as shown below, Is my
> problem related with any function on psqlODBC ? And, How can I fix it?
>
>
No, the problem is not with the ODBC driver. The problem is that views in
postgresql are static non-update-able by default. So if you try to update
and record in a view using a cursor or any other sql statement, you will
get
an error.
This problem can be fixed if your view meets the following criteria:
1) your view is based on only one table
2) your create rules for your view that define how updates to the view are
to be handled/cascaded to the base table.
http://www.postgresql.org/docs/8.3/interactive/sql-createrule.html
3) since postgresql rules can only handle update statements that affect
only
one tuple at a time, your cursor must only be able to update one record at
a
time.
Regards,
Richard Broersma Jr.
------=_Part_19846_4532381.1204554696125
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On Sun, Mar 2, 2008 at 11:06 PM, Premsun Choltanwanich <<a
href="mailto:Premsun@[EMAIL PROTECTED]
">Premsun@[EMAIL PROTECTED]
>>
wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt
0.8ex; padding-left: 1ex;">
<div style="margin: 4px 4px 1px; font-family: MS Sans Serif; font-style:
normal; font-variant: normal; font-weight: normal; font-size: 10pt;
line-height: normal; font-size-adjust: none; font-stretch: normal;">
<div>Dear All,</div>
<div> </div>
<div> Regarding to my conversation on mailing list
as shown below, Is my problem related with any function on psqlODBC ? And,
How can I fix it?</div>
<div> </div></div></blockquote></div>No, the problem is not with the
ODBC driver. The problem is that views in postgresql are static
non-update-able by default. So if you try to update and record in a
view using a cursor or any other sql statement, you will get an error.<br>
<br>This problem can be fixed if your view meets the following
criteria:<br><br>1) your view is based on only one table<br><br>2) your
create rules for your view that define how updates to the view are to be
handled/cascaded to the base table.<br>
<a
href="http://www.postgresql.org/docs/8.3/interactive/sql-createrule.html">http://www.postgresql.org/docs/8.3/interactive/sql-createrule.html</a><br><br>3)
since postgresql rules can only handle update statements that affect only
one tuple at a time, your cursor must only be able to update one record at
a time.<br>
<br><br>Regards,<br>Richard Broersma Jr.<br>
------=_Part_19846_4532381.1204554696125--


|