|
|
Subject:
MS Access linking to Oracle using Sequences
Category: Computers > Programming Asked by: ny_insomniac-ga List Price: $5.00 |
Posted:
02 Mar 2004 11:10 PST
Expires: 01 Apr 2004 11:10 PST Question ID: 312679 |
I have an MS Access (2000) database with linked tables to Oracle (9i). I want to be able to add records to the Oracle table in a form. The problem is the Oracle tables use Sequences to generate values for an ID column. What's the best way to get the sequence number or do the insert. |
|
There is no answer at this time. |
|
Subject:
Re: MS Access linking to Oracle using Sequences
From: scubajim-ga on 04 Mar 2004 09:55 PST |
It depends. There might already be a trigger on the table that will update that value for you. In that case you don't do anything, just insert a row without specifying the ID. The trigger will fill it in for you. Just try it. Otherwise, you would have to know the name of the specific sequence and in the insert call sequence_name.nextval. eg insert into mytable (id,col1,col2) values(sequence_name.nextval,val1,val2); |
Subject:
Re: MS Access linking to Oracle using Sequences
From: ny_insomniac-ga on 05 Mar 2004 04:49 PST |
There is no trigger. I would like to add a record from an Access form--right now I am not sending an Insert statement. |
Subject:
Re: MS Access linking to Oracle using Sequences
From: scubajim-ga on 08 Mar 2004 11:50 PST |
Access via the form sends an insert statement for you.(only mechanism to add a row to the table) What happens if you just try to add a record via the Access form? What exactly is the error message? If there isn't a trigger in Oracle on the table then the easiest way would be to put one. This would require the proper rights to do so, knowledge of how to write a trigger (not particularily difficult), and knowledge of what the sequence is called. I fear that you are trying to access something that perhaps you should not be via a mechanism that your company doesn't support. (Access updating some application table in Oracle) How do you know there isn't a trigger? You don't provide very much detail. Did you ask the DBA about the table? |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |