Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pass-through query /bound forms

Status
Not open for further replies.

TAMSIN

Programmer
Sep 6, 2000
31
GB
Hi,
I'm using access as the front-end to a postgreSQL database using odbc, and I'm looking for the best way to talk to the database. I don't want to use directly linked tables because the sql that gets generated isn't really optimised for postgreSQL, so I'm looking at ADO, pass-through queries etc.

When I create a bound form based on a pass-through query, I can't edit any of the fields, which I understand because pass-through queries aren't updateable, but: is there any way to base a bound form on a pass-through query, allow the fields to be edited, but then catch the update in an event, and send my own SQL to the database for the update? It would just be nice to be able to create bound forms to start with, rather than having to go through setting all the fields when the form loads or whatever.
Cheers for any pointers!
 
You could probably dump the records into a temp table, open the form based on the table, and then use event procedures as you have said to update the database. I would think the performance using linked tables would have to be extremely poor for you to go through all this trouble.

Jeff
 
Thanks for the idea. You're right, it does seem a lot of work. But the queries that access generates don't seem ideal. e.g. for updates it does something like:

update tablename set field1 = "value1", field2 = "value2" , ...
where field1 = "oldvalue1" and field2 = "oldvalue2" ... etc etc
i.e. it doesn't seem to recognise the primary key to use in the where clause, which just looks wrong to me.
However, I might put up with it for now & see how the performance is like you say. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top