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

Поиск
Список
Период
Сортировка
От Karen Hill
Тема Is an updateable/insertable recordset via ADO possible using MS-Access?
Дата
Msg-id 1146875200.422512.204900@u72g2000cwu.googlegroups.com
обсуждение исходный текст
Ответы Re: Is an updateable/insertable recordset via ADO possible using MS-Access?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
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.


В списке pgsql-general по дате отправления:

Предыдущее
От: Matthew Hixson
Дата:
Сообщение: Re: EnterpriseDB
Следующее
От: "Tzahi Fadida"
Дата:
Сообщение: Re: Google Summer of Code: Full Disjunctions