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!

Using Oracle sequence w/bound form

Status
Not open for further replies.

iamareplicant

Programmer
Aug 7, 2004
50
US
Experts,

I have an Access 2003 app that utilizes Oracle tables.

I have multiple pass-thru queries, sequences set up, all is well.


At the moment, I am developing unbound forms. A lot more work, but they work and I have complete control of the data as I have set up the app so far as a 2-tier app.

I would like to explore, though, binding the forms to the tables.

The problem:

In an Access form bound to an Access table with Autonumber, using docmd.gotorecord acNewRec is no problem as Access takes care of creating a new record and realizes that, even if there are constraints (NOT NULL in some fields, etc), it will allow you to create a new record and then save it.

But with my Oracle tables, when I try goto asNewRec, I of course get an error because Oracle will not let a new record be created until all of the fields (with constraints) are populated.

So, I cannot use goto acNewRec, period, unless I find a work-around to being able to get the Oracle sequence, insert it into a new record, but not error out because Oracle throws the error that ya cant create a record with all of the NULL values, etc.

Hope I am making sense...

So, what is the work around for a bound 2003 MS Access form that is bound to an Oracle table?

TIA,

JBG
 
Shoulda mentioned that one work around i am aware of is to create a temp table for each form, then (to view a rec), grab the rec from the Oracle table, populate the temp table, and have the form bound to that temp table.

Then, to create a new rec, populate the temp table with the new rec Oraclc esequence, etc, then append from the temp table to the Oracle table form the temp table.

But this really is not a bound form in the sense that, I might as well make the form unbound and just talk directly to the Oracle tables and cut out the middle man, so to speak.

Are there any other work arounds?

JBG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top