Showing posts with label oracle. Show all posts
Showing posts with label oracle. Show all posts
Wednesday, August 20, 2008
'Java.exe' and Oracle SQL Developer
I've just upgraded to v1.5.1 of 'Oracle SQL Developer'. When you first start the program, it will ask for the path to 'java.exe'. If you need to change or reset that path to a different value, you need to locate text file 'sqldeveloper.conf' and edit the value of setting 'SetJavaHome'. You may want to change this setting if you try to use an 'Unsupported Java Version'.
Thursday, June 12, 2008
Oracle, Access & ODBC: Problems & Solution
I was using Microsoft Access, in this case Access 97, to connect to an Oracle 10g database, using the ability of Access to set linked tables using an ODBC data source.
For the client, I was using the Oracle Instant Client v10.1.0.4 and setting an environmental variable NLS_LANG.
I was seeing two problems. First, when trying to link to the tables/views on the Oracle server, after selecting the ODBC data source DSN, Access would list all the tables/views on the Oracle server, but It would only display the first character of the name of the tables/views, making it impossible to find the correct table/view.
Second, when I tried setting up the Oracle linked tables in the Access MDB file on another PC, where everything was working ok, and then going back to the original problem PC and opening same MDB file, when opening the Oracle linked tables, all rows and all fields contained #Deleted.
I did a Google and found this Microsoft KnowledgeBase article - Q913070:
#Deleted is displayed in the records when you open a linked ODBC table from an Oracle 10g database in Access 2003, in Access 2002, or in Access 2000
To cut a long story short, I had set the client side environmental variable
but this did not match the setting on the Oracle database, and I was advised
by our Oracle DBA that I should have been using:
Apparently, our Oracle DBA had changed the NLS_CHARACTERSET of the database at some stage in the past.
After I corrected the value of NLS_LANG, everything starting working ok. It seems WE8MSWIN1252 is a binary super set of WE8ISO8859P1.
See these links for further background:
For the client, I was using the Oracle Instant Client v10.1.0.4 and setting an environmental variable NLS_LANG.
I was seeing two problems. First, when trying to link to the tables/views on the Oracle server, after selecting the ODBC data source DSN, Access would list all the tables/views on the Oracle server, but It would only display the first character of the name of the tables/views, making it impossible to find the correct table/view.
Second, when I tried setting up the Oracle linked tables in the Access MDB file on another PC, where everything was working ok, and then going back to the original problem PC and opening same MDB file, when opening the Oracle linked tables, all rows and all fields contained #Deleted.
I did a Google and found this Microsoft KnowledgeBase article - Q913070:
#Deleted is displayed in the records when you open a linked ODBC table from an Oracle 10g database in Access 2003, in Access 2002, or in Access 2000
To cut a long story short, I had set the client side environmental variable
NLS_LANG = ENGLISH_UNITED KINGDOM.WE8ISO8859P1
but this did not match the setting on the Oracle database, and I was advised
by our Oracle DBA that I should have been using:
NLS_LANG = ENGLISH_UNITED KINGDOM.WE8MSWIN1252
Apparently, our Oracle DBA had changed the NLS_CHARACTERSET of the database at some stage in the past.
After I corrected the value of NLS_LANG, everything starting working ok. It seems WE8MSWIN1252 is a binary super set of WE8ISO8859P1.
See these links for further background:
Friday, January 18, 2008
Calling Oracle Stored Procedure with PHP
I've just been following this excellent tutorial article
on the Oracle WebSite:
Calling Oracle Stored Procedure with PHP
I'm only just starting to use Oracle PL/SQL and PHP,
and it's still early days. So I'm making really stupid
mistakes and getting errors like this:
Here was my code:
The fix was simple:
Yes, the Procedure is in a Package.
So you need to prefix the procedure name, with the package name.
Being a newbie, it look me a while to spot that!
on the Oracle WebSite:
Calling Oracle Stored Procedure with PHP
I'm only just starting to use Oracle PL/SQL and PHP,
and it's still early days. So I'm making really stupid
mistakes and getting errors like this:
Warning: oci_execute() [function.oci-execute]: ORA-06550: line 1, column 7:
PLS-00201: identifier 'ROLLROUTE' must be declared ORA-06550: line 1, column 7:
Here was my code:
$sql = "BEGIN RollRoute(:PartNo); END;";
$s = oci_parse($c, $sql );
oci_bind_by_name($s,':PartNo',$PartNo,32);
oci_execute($s);
The fix was simple:
$sql = "BEGIN RROUTING_API.RollRoute(:PartNo); END;";
Yes, the Procedure is in a Package.
So you need to prefix the procedure name, with the package name.
Being a newbie, it look me a while to spot that!
Subscribe to:
Posts (Atom)