473,395 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

PostGreSQL to Access Updatable recordset

I have a postgresql backend with an access front end and I am trying to
redefine the recordset of the form to use an ADO recordset. The problem is
that the CursorType always changes to AdOpenStatic, even if I choose
adOpenDynamic. If anyone has any thoughts, please let me know. The form
works great for viewing, but I cannot update or insert any new records.

Below is the code I am using:

connectstr = "DSN=SAP_PG;uid=postgres"
Set conn = New ADODB.Connection
conn.Open (connectstr)
rs.CursorLocation = adUseClient
rs.Open "select ProductID,ProductName,ProductTypeID,StockTypeID from
Products order by ProductName", conn, adOpenDynamic, adLockOptimistic
Set Me.Recordset = rs
Me.Requery

The conn object contains the following:
Provider=MSDASQL.1;Extended
Properties="DSN=SAP_PG;DATABASE=sap;SERVER=10.1.1. 76;PORT=5432;UID=username;
PWD=password;ReadOnly=0;Protocol=6.4;FakeOidIndex= 0;ShowOidColumn=0;RowVersi
oning=1;ShowSystemTables=0;ConnSettings=;Fetch=100 ;Socket=4096;UnknownSizes=
0;MaxVarcharSize=4094;MaxLongVarcharSize=4094;Debu g=0;CommLog=0;Optimizer=1;
Ksqo=1;UseDeclareFetch=0;TextAsLongVarchar=0;Unkno wnsAsLongVarchar=0;BoolsAs
Char=0;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePre fixes=dd_;;LFConversion=1;
UpdatableCursors=1;DisallowPremature=0;TrueIsMinus 1=0;BI=0;ByteaAsLongVarBin
ary=0;UseServerSidePrepare=0"
In answer to your upcoming questions:

1) ProductID is the primary key on the table.
2) I do not want to use linked forms, they go much slower then connecting
directly through the ADO recordset.
3) I put a breakpoint right after the open statement and checked the value
of rs.CursorType and that is when I saw it was adOpenStatic
4) I am using PostGreSQL 8.0beta1
5) ODBC driver 7.03.02.00
Nov 23 '05 #1
3 5444
On Tue, Nov 09, 2004 at 01:53:18PM +0200, Sim Zacks wrote:
I have a postgresql backend with an access front end and I am trying to
redefine the recordset of the form to use an ADO recordset. The problem is
that the CursorType always changes to AdOpenStatic, even if I choose
adOpenDynamic. If anyone has any thoughts, please let me know. The form
works great for viewing, but I cannot update or insert any new records.


Postgres does not support updatable cursors yet. Maybe that's why the ADO
driver changes the cursor type from AdOpenDynamic to AdOpenStatic.

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"Nunca se desea ardientemente lo que solo se desea por razón" (F. Alexandre)

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #2
hat pretty much solves my problem. Also I found that Access doesn'r support
ODBC updateable cursors until at least Access 2002 (we're using Access
2000), though I thought I had figured out how to get around that and it
didn't work.
I assumed the ODBC driver did support updateable cursors simply because
there is an option in the driver settings called "Updateable cursor"

Thank you for your clarification.
Sim Zacks
IT Manager
Compulab
to email me use: sim "the at sign" compulab "the dot" co "the dot" il
"Alvaro Herrera" <al******@dcc.uchile.cl> wrote in message
news:20********************@dcc.uchile.cl...
On Tue, Nov 09, 2004 at 01:53:18PM +0200, Sim Zacks wrote:
I have a postgresql backend with an access front end and I am trying to
redefine the recordset of the form to use an ADO recordset. The problem is that the CursorType always changes to AdOpenStatic, even if I choose
adOpenDynamic. If anyone has any thoughts, please let me know. The form
works great for viewing, but I cannot update or insert any new records.
Postgres does not support updatable cursors yet. Maybe that's why the ADO
driver changes the cursor type from AdOpenDynamic to AdOpenStatic.

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"Nunca se desea ardientemente lo que solo se desea por razón" (F.

Alexandre)
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #3
On second thought, I am now confused. The data is updatable when using
linked tables, just not when using ADO recordsets connected to forms. I
tried connected to PostGreSQL using DAO, and I got the recordset back, but
it was also non-updatable.

For the time being I am using Linked Tables, even though it is much slower
to open the forms using that methodology.
--
Sim Zacks
IT Manager
Compulab
to email me it is sim "the at sign" compulab "the dot" co "the dot" il

"Sim Zacks" <si*@nospam.com> wrote in message
news:cn***********@news.hub.org...
hat pretty much solves my problem. Also I found that Access doesn'r support ODBC updateable cursors until at least Access 2002 (we're using Access
2000), though I thought I had figured out how to get around that and it
didn't work.
I assumed the ODBC driver did support updateable cursors simply because
there is an option in the driver settings called "Updateable cursor"

Thank you for your clarification.
Sim Zacks
IT Manager
Compulab
to email me use: sim "the at sign" compulab "the dot" co "the dot" il
"Alvaro Herrera" <al******@dcc.uchile.cl> wrote in message
news:20********************@dcc.uchile.cl...
On Tue, Nov 09, 2004 at 01:53:18PM +0200, Sim Zacks wrote:
I have a postgresql backend with an access front end and I am trying to redefine the recordset of the form to use an ADO recordset. The problem
is
that the CursorType always changes to AdOpenStatic, even if I choose
adOpenDynamic. If anyone has any thoughts, please let me know. The
form works great for viewing, but I cannot update or insert any new

records.
Postgres does not support updatable cursors yet. Maybe that's why the ADO driver changes the cursor type from AdOpenDynamic to AdOpenStatic.

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"Nunca se desea ardientemente lo que solo se desea por razón" (F.

Alexandre)

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Nov 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Henry Bloom | last post by:
Hello, I have two questions: 1. The file-size of my mdb-Database grew extremely large after having written a lot of VBA-code. I know about the /decompile-option tried it .... it did not work....
10
by: Steve Jorgensen | last post by:
Hi all, Over the years, I have had to keep dealing with the same Access restriction - that you can't update a table in a statement that joins it to another non-updateable query or employs a...
1
by: Just_Buy | last post by:
Environment: MS Access 97 Problem: Trying to force a record to update using the recordset.Update property. What syntax do I need to force a record to be updated? I have searched the...
1
by: Bob Darlington | last post by:
I am using code (simplified for this post) to generate a recordset to which I want to add a record. Set rs = db.Openrecordset("SELECT * FROM qVariations WHERE ......") ws.Begintrans If...
0
by: kentsoi | last post by:
i write the code as follow: when i try to edit text3's content' the message " this recordset is not updatable" is display. can anyone tell me what's wrong ??? thanks a lot...
7
by: David C. Barber | last post by:
I've upsized an Access 2000 MDB to an ADP and changed the tables from a linked Access Backend to SQL Server. Now I'm told I can't use DAO any more and need to convert to ADO. While I've used ADO...
0
by: magickarle | last post by:
Hi to all. Little introduction on what I'm trying to do: I'm in charge of creating an access database for our supervisor where they can grade their agents. Per ex: agents are talking to customers...
1
by: beceri | last post by:
Hi ; I use too mix query ( four relationship and main and child tables :) ) so that of couse my query is not updatable I agree this ! :( but I want to different thing ; when form is open my mix...
0
by: shajimon | last post by:
hai All I am very new to PostgreSql. I have given the following code to VB 6. and it takes around 2 to 3 minutes to exicute with PostgreSQL back end. However, the same code work in a fraction of a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.