Search Postgresql Archives

Is an updateable/insertable recordset via ADO possible using MS-Access?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

I have an MS - Access front end which connects to PostgreSQL 8.1.3.
Almost everything is working great, I especially love how I can use
rules in PostgreSQL to be able to update and insert into views, which
is awesome.

Now my only issue, and I'm not sure this is even possible but here it
is.  Can one base an MS Access form on a PostgreSQL table using only
ADO and have it be updateable and insertable?  Currently all I'm able
to do is get the data as READONLY when I do it via ADO, yet when I use
linked tables in MS Access I am able to update and insert.  Here is the
ADO code:

Sub Form_Open ( Cancel As Integer)

Dim cn As ADODB.Connection
Dim rs AS ADODB.RecordSet

Set cn = New ADODB.Connection
Set rs = New ADODB.RecordSet

cn.Open  "DSN=PostgreSQL ANSI; Database=db; UID=postgres;
Password=xxxx;"

rs.CursorLocation = adUseServer
rs.Open "SELECT * FROM view_x;", cn, adOpenKeySet, adLockOptimistic
Set Me.Recordset = rs

End Sub

The above returns records to the form, its just that they are not
updateable or insertable.  Thanks for your help.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux