472,353 Members | 1,681 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 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 5288
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...
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...
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...
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...
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...
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...
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...
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...
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...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...

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.