How to use forms with a hetrogeneous DB Link [message #323370] |
Wed, 28 May 2008 05:45  |
esraa90
Messages: 63 Registered: May 2008 Location: EGYPT
|
Member |
|
|
Dear Sir,
I finished creating DB Link from my Oracle database to MS-Access database through Hetrogeneous conectivity.
I could read MS-access tables and also update them form Oracle DB.
SQL> select ........
My database link is access_db
so my command is:
SQL> select * from table1@access_db;
---------------------------------------------
how could I connet with oracle forms and create datablock to MS-access ????
|
|
|
|
Re: How to use forms with a hetrogeneous DB Link [message #323449 is a reply to message #323405] |
Wed, 28 May 2008 08:46   |
esraa90
Messages: 63 Registered: May 2008 Location: EGYPT
|
Member |
|
|
I already did.
I created view based on ....@access_db
I created form block based on that view.
When running the form nothing displayed.
error appear at th bottom of form FRM-40505
in help means :
The table associated with the current block of the form might not exist, or your username might not have authority to perform the specified action on the table.
When selecting rows from view using sql I find records.
SQL> select .....
What is wrong???
[EDITED by LF: removed [quote] tags]
[Updated on: Wed, 28 May 2008 15:14] by Moderator Report message to a moderator
|
|
|
|
Re: How to use forms with a hetrogeneous DB Link [message #323621 is a reply to message #323549] |
Thu, 29 May 2008 00:51   |
esraa90
Messages: 63 Registered: May 2008 Location: EGYPT
|
Member |
|
|
As I explained before:
When running the form nothing displayed.
error appear at the bottom of form FRM-40505
in help means :
The table associated with the current block of the form might not exist, or your username might not have authority to perform the specified action on the table.
|
|
|
|
|
|
Re: How to use forms with a hetrogeneous DB Link [message #323691 is a reply to message #323370] |
Thu, 29 May 2008 04:36   |
esraa90
Messages: 63 Registered: May 2008 Location: EGYPT
|
Member |
|
|
connect sys/sys as sysdba
SQL> select view_name ,owner from all_views where owner = 'EMPLOYMENT'
2 /
VIEW_NAME OWNER
------------------------------ ------------------------------
ORA_ATTENDANCE EMPLOYMENT
VACANCY EMPLOYMENT
INDEX_BY_TYPES EMPLOYMENT
SQL> select text from all_views where view_name = 'ORA_ATTENDANCE';
TEXT
--------------------------------------------------------------------------------
select ID,USERID,CHECKTIME from my_attendance@access_db
-----------------------------------------------------------------
After connect to oracle schema 'employment':
SQL> desc ora_attendance;
Name
---------------------------------------
ID
USERID
CHECKTIME
|
|
|
|
|
Re: How to use forms with a hetrogeneous DB Link [message #323752 is a reply to message #323744] |
Thu, 29 May 2008 06:30   |
esraa90
Messages: 63 Registered: May 2008 Location: EGYPT
|
Member |
|
|
I created the view again with ID,USERID only.
Also delete CHKTIME from datablock in form.
Compiled the form.
Same problem during runtim.
----------------
Kindly, note that the problem in ROWID.
data type for CHKTIME in access is Date/Time.
----------------
|
|
|
Re: How to use forms with a hetrogeneous DB Link [message #323765 is a reply to message #323752] |
Thu, 29 May 2008 07:01   |
 |
Littlefoot
Messages: 21826 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Obviously, I was wrong; I *know* the error mentions ROWID. It might be because MS Access rowid is different from Oracle's one (is it? I don't know). As ROWID represents record's physical location, hm, maybe Forms can't interpret MS Access ROWID correctly.
Unfortunately, I'm out of idea.
Though, two more which are probably useless, but ... until you find a better answer, you might try with these: how about creating a view based on a view? First one is already created, and it select data from MS Access table via database link. Now, create another view as SELECT * FROM the_first_view, and base form data block on this, new view.
Or, would it be possible to create a materialized view instead of a view? And use it as a data source in a form?
I'm sorry, but I can't test it myself; if I could, I'd probably shut up much earlier.
|
|
|
|
|
|
|
|
Re: How to use forms with a hetrogeneous DB Link [message #324046 is a reply to message #323783] |
Fri, 30 May 2008 07:03   |
 |
Littlefoot
Messages: 21826 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Hm, OK, here it is: I've created a view in Oracle schema based on MS Access table. I used this view as data block source. Set
- Key Mode block property = UPDATEABLE
- Primary key property (ID item) = YES
- Column name property (all items): enclose column names into double quotes ("id", "userid", "checktime")
Run the form!
I *believe* it should work; at least, it did for me.

Now, I'm smarter than yesterday, but my problem is that I forget things too soon. Maarten has described the whole walkthrough of connecting MS Access and Oracle in this thread; the solution of your problem is described in step #8. You'll probably see that I was overwhelmed when I saw his post, but - as I've said - I forgot what I saw. Too bad for me.
Sorry for wasting your time yesterday; but OK, that's the price. OraFAQ Forum Guide suggests several ways of finding the answer to your questions, and one of them is Search the board!.
|
|
|
|
Re: How to use forms with a hetrogeneous DB Link [message #324259 is a reply to message #324250] |
Sun, 01 June 2008 04:13   |
 |
Littlefoot
Messages: 21826 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
I tried to update a record, but there was an error: ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Generic Connectivity Using ODBC][A055] The column <column name> is not updateable.
The solution, according to Metalink note 276284.1, is to enable the option to allow updateable cursors in the ODBC-Driver/Client-Access.
That's theory. But, where can I enable that option? This is the ODBC driver's Advanced Options window:

However, there is not "updateable cursors" there. Google wasn't helpful (or, more precisely, I was unable to find the answer). So, if someone knows how to do that, please, share the knowledge.
|
|
|
Re: How to use forms with a hetrogeneous DB Link [message #324261 is a reply to message #324259] |
Sun, 01 June 2008 04:32   |
esraa90
Messages: 63 Registered: May 2008 Location: EGYPT
|
Member |
|
|
I don't think so.
I could update MS-Access table using Oracle SQL>
SQL> update table .....@access_db
access_db is my database link.
-----------------------------------------
Now, when we go to forms.
I want to connect to user/password@access_db to create a data block on that table not on a view.
This is what I am asking about .
What will be the user name and password??
Or what else??
|
|
|
|
Re: How to use forms with a hetrogeneous DB Link [message #324269 is a reply to message #324263] |
Sun, 01 June 2008 04:57   |
esraa90
Messages: 63 Registered: May 2008 Location: EGYPT
|
Member |
|
|
Sure, I already created a synonym for MS-access table@access_db
Then, I created my forms datablock on that synonym.
Chnaged the proberties you mentioned before.
Then I ran the form.
It displays data.
When trying to change something I got :
40501 Oracle error.
Unable to reserve record for update or delete .
I think the problem is another proberty should be changed not more.
Best Regards
|
|
|
|
|
|
|