Edit schema objects with sql workshop
I am trying to setup the ability for admin type user to log in via
HTMLDB and use the sql workshop to create / change objects in
the owning schema.
But I can't seem to get it right.
I have a schema, this was prexisting before HTMLDB
BOB which contains hundreds of objects. From the outside world, the users would log in as BOB with BOB's password to trouble shoot and develop PL/SQL - say with Toad or pl/sql developer.
We have 2 htmldb applications that run from BOB and work great (HTMLDB is great!)
The number of people needing access to BOB has increased dramatically.
I have created HTMLDB users that log into the BOB HTMLDB workspace and can via all the table data and the like.
But when they go to look at PL/SQL the screen is red and there is no wrapping of lines and no scroll bar to see everything.
So, I assumed it is priveleges - I granted everything, same thing. I ran a select user from dual from the sql scripts screen and it comes back as HTMLDB_PUBLIC_USER.
I have tried logging into the workspace with the BOB oracle user password - won't work (invalid credentials). I created an HTMLDB BOB user and it still hits the database as HTMLDB_PUBLIC_USER.
Is it possible somehow to "link" Bob HTMLDB user to BOB oracle user so that when the user logs into HTMLDB sql work shop (even if it is as BOB) they can edit PL/SQL, triggers etc?
So, basically - log into the database using a database user/pass but have access to the wonderful sql work shop and utilities tools?
I have tried messing with the DAD etc, but doesn't seem to work.
I have checked the documentation, can't find anything.
Help please.
Hi,
you have a typo there. You need a "." before the xbl and htc.
See here for the full config:
Alias /i/ "/u05/oracle/oraweb/marvel/images/"
AddType text/xml .xbl
AddType text/x-component .htc
<Location /pls/htmldb>
SetHandler pls_handler
Order deny,allow
Allow from all
AllowOverride None
PlsqlDatabaseUsername HTMLDB_PUBLIC_USER
PlsqlDatabasePassword PSWD
PlsqlDatabaseConnectString MYSERVER:MYPORT:BOBSID ServiceNameFormat
PlsqlDefaultPage htmldb
PlsqlDocumentTablename wwv_flow_file_objects$
PlsqlDocumentPath docs
PlsqlDocumentProcedure wwv_flow_file_manager.process_download
PlsqlAuthenticationMode Basic
PlsqlNLSLanguage AMERICAN_AMERICA.US7ASCII
</Location>Regards,
~Dietmar.
P.S.: Make sure to clear the browser cache before retrying.
Message was edited by:
daust_de
Similar Messages
-
Could not get schema Object:java.sql.SQLSyntaxErrorException ora-904
All of a sudden I get
Could not get schema Object:java.sql.SQLSyntaxErrorException: ORA-00904: "SYS"."O"."NAME": ongeldige ID
when doing anything in the tables tree in the connections pane
The only thing I set recently is pga_aggregate_target
Environment
Oracle 11.2.0.1
OS Windows Vista Ultimate sp2
Sql developer 2.1.1.64.39 with its own JDK
As the download links on OTN are broken I can not upgrade, and I'd rather not work in command line sqlplus.
Help!!!
Sybrand Bakker
Senior Oracle DBAMy copy of sqldeveloper isn't located in that directory. Would that matter?
In the mean time I have disabled filtering the tables node. Opening the tables node doesn't result in exceptions anymore.
Now, when I click on any table in that node I get 4 identical ora-904 error messages for sys.o.name for any table.
Apparently it is querying either the all_objects view and it thinks it is querying sys.obj$.
I didn't yet enable sql_trace for the session, I'm more or less giving up on sqldeveloper. I can not use the space bar in any datagrid, sqldeveloper has always been extreemly unresponsive when navigating the schema browser (as opposed to Toad), etc, etc. Too bad I bought Sue Harpers book, but I think I will be de-installing sqldeveloper soon.
Sybrand Bakker
Senior Oracle DBA -
How to synchronize test schema objects with the prod schema objects.
Hi,
I have a requirement of synchronizing test schema objects with the production schema objects. Please let me know the below
1. if there is a standardized method for such activity,
2. if there are oracle utilities for this task.
3. If i had to do this job manually, can you let me know the check list if any.
Thanks
Purushotham Mhttp://www.oracle.com/technetwork/issue-archive/2012/12-sep/o52sqldev-1735911.html
You could try database diff tool in sql developer(but there are some licence restrictions).
I don't know your database version, you could try DBMS_COMPARISON package also.
Look at this link http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_comparison.htm
Other solution is to create db link between test and production database, and then you can try different types of queries like
select table_name from user_tables
minus
select table_name from user_tables@db_link_to_other_database
And you can do this for columns, indexes and so on.
But you must have proper DDL scripts for this, to generate sync script.
Also there is a question about work process, you are doing sync in reverse order(from production to test). Test db is for test, after test you go to production db with proper ddl and dml scripts, so these schemas shouldn't be different in the first place(talking about schema, not data here). -
Loading Objects with SQL*Loader
When loading a column object with SQL*Loader, is it possible to specify a column specific 'TERMINATED BY' clause in the control file?
I've successfully defined column-level termination characters for regular columns and nested tables, but can't seem to find any way of achieving the same result with column objects.When loading a column object with SQL*Loader, is it possible to specify a column specific 'TERMINATED BY' clause in the control file?
I've successfully defined column-level termination characters for regular columns and nested tables, but can't seem to find any way of achieving the same result with column objects. -
Hi All,
I would like to know what are the Drawbacks of using BizTalk Server Enterprise Edition 2009/2013 with SQL Server Standard Edition vs Enterprise Edition.
We are currently using Enterprise Edition.
1) Are there any adverse performance constraints? Microsoft mentions to use SQL Server Enterprise Edition for "Optimal Performance" but does not expand on the topic.
2) Any features missing?
2) Is there a supported way to downgrade SQL Enterprise to Standard for an exisiting BTS Environment?
Thanks!1) SQL Standard is limited to 4 CPU's and 64GB of memory while Enterprise is 8 CPU and 2TB or memory.
2) The only BizTalk feature dependency on a SQL Enterprise feature is BAM Real-Time Aggrigations which requires Analysis Services RTA.
3) Yes, but it's not a SQL downgrade really, you would move the BizTalk databases:
http://msdn.microsoft.com/en-us/library/aa559835.aspx -
User has no privileges on the schema when entering SQL Workshop
I installed Oracle Apex 4.0 and created a workspace in a new schema called APEX_TEST. Later on I reassigned the workspace to the existing schema TEST and then when an admin or developer user clicks on the SQL Workshop button this error appears :
Help
ORA-20000: User FARS has no privileges on the APEX_TEST schema.
The user still has access to the object browser or SQL Commands pages but there are no object or SQL result showing.
Did I forget to give a privilege from TEST to APEX ? If I can't resolve the issue I can create another workspace this is only a testing workspace.
Thank you
FrancisI tried to match the APEX user default schema with the workspace new schema and still had the same error. The error appears even if I give access on multiple workspace to the user.
If I change them both to the APEX_TEST it works but the user cannot access the objects in the TEST schema without synonyms.
The best thing to do would be to create a new schema and start over again ou export/import the applications.
Edited by: APQ on Jul 15, 2010 2:16 PM -
I can compile objects with SQL dev tool but not with a direct sql
hi,
This is a bit weird - I'm probably not familiar enough with Oracle's compilation process...
I'm creating a some functions / procedures / triggers. When I run the script to create them with Oracle's SQL Developer tool, usually they become immediately valid, and if not then I can manually right click them and choose Compile, and they're compiled correctly and become valid.
However, when running them with command line tools, they're uncompiled after created. I'm trying compile them with
ALTER PROCEDURE / FUNCTION / TRIGGER MySchema.MyFunction COMPILE;
and it always returns
Error starting at line 1 in command:
alter function MySchema.MyFunction compile
Error report:
SQL Command: alter function
Failed: Warning: execution completed with warning
alter function MySchema.MyFunction succeeded.
and the object remains uncompiled / invalid.
also tried with DBMS_... utils and got the same results.
Same with adding things such as PLSQL_WARNINGS = 'ERROR:ALL' to the stmt
But when I go in SQL Developer to the object, right click and click Compile, it compiles fine w/o warnings / errors and becomes valid.
Is there anything else I should run other than this alter..compile? Is SQL Dev tool doing something different than "alter function ... compile" when right clicking and object and clicking "Compile"?
thanks!hi,
I'm having difficulties connecting with SQL Plus, since it seem to require at startup some admin user/password, which I don't have at the moment. Also tried to give it in command line the db name and params and it still require this pass... Will try to get it...
But again, when I'm right clicking the object in SQL Developer and click Compile, it compiles fine and becomes valid. After doing that, running
alter function mySchema.MyTestFunction compile;
passes with
"alter function mySchema.testfunction succeeded"
If I run this sql before doing compile with SQL Developer, it fails with what I posted before.
I wonder if SQL Developer does things other than the above compile stmt.
If I right click on Functions in SQL Dev and click Compile All or Compile Invalid, I can see the sql it about to generate, and it's the same as I tried - and fails as well... Only when right clicking the object and Compile it works...
A test func I tried, for example:
create or replace
FUNCTION testFunction(n in number)
RETURN NUMBER
IS
BEGIN
RETURN n + 1;
END; -
EA 3.0 and schema Browser with SQL Server
Once again a very good tool!
In testing today I noted on a SQL Server connection in Schema browser even logged on as SA (like SYS in Oracle) I could not change from schema to schema as you can do in Oracle.
If would be awesome if this could be resolved prior to GA.Yup, this is a bug. The Schema Browser in the EA is Oracle focused. But we intend to provide support for our supported third-party connection types (and Times Ten as well).
- John
SQL Developer Team -
How to Populate the JTable Object programatically with SQL Results
I'm wondering if someone could help me on how to populate the JTable Object with SQL Results wherein the Row of tjhe JTable object is automatically adjusted depending on how many records you have queried.
Thanks in advance and God bless! (",)
* frmMain.java
* Created on October 4, 2006, 6:15 AM
package tds;
import java.io.*;
import java.awt.Toolkit;
import javax.swing.JFrame;
import javax.imageio.*;
import javax.swing.JFrame;
import java.sql.*;
import javax.swing.table.DefaultTableModel;
* @author Dexter.Carlit
public class frmMain extends javax.swing.JFrame {
private Connection connection = null;
private DefaultTableModel model;
/** Creates new form frmMain */
public frmMain() {
initComponents();
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
jSplitPane = new javax.swing.JSplitPane();
jScrollPane1 = new javax.swing.JScrollPane();
jPanel3 = new javax.swing.JPanel();
jScrollPane2 = new javax.swing.JScrollPane();
jTree1 = new javax.swing.JTree();
jTabbedPane1 = new javax.swing.JTabbedPane();
jPanel1 = new javax.swing.JPanel();
jPanel4 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jTextField2 = new javax.swing.JTextField();
jLabel3 = new javax.swing.JLabel();
jTextField3 = new javax.swing.JTextField();
jLabel4 = new javax.swing.JLabel();
jTextField4 = new javax.swing.JTextField();
jPanel5 = new javax.swing.JPanel();
jScrollPane3 = new javax.swing.JScrollPane();
jGrid = new javax.swing.JTable();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jProgressBar1 = new javax.swing.JProgressBar();
jPanel2 = new javax.swing.JPanel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowOpened(java.awt.event.WindowEvent evt) {
formWindowOpened(evt);
getAccessibleContext().setAccessibleName("frmMain");
jSplitPane.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
jSplitPane.setDividerLocation(200);
jSplitPane.setDividerSize(10);
jScrollPane2.setViewportView(jTree1);
org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel3Layout.createSequentialGroup()
.add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 916, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 410, Short.MAX_VALUE)
jScrollPane1.setViewportView(jPanel3);
jSplitPane.setLeftComponent(jScrollPane1);
jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
jLabel1.setText("First Name:");
jLabel2.setText("Last Name:");
jLabel3.setText("Position :");
jLabel4.setText("Department:");
jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Search Results"));
jGrid.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
new String [] {
"LName", "FName", "Position", "Department", "Office No", "Local No", "Office Mobile No", "Home No", "MobileNo", "Email Address"
jGrid.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
jGrid.setColumnSelectionAllowed(true);
jGrid.setName("");
jGrid.setTableHeader(jGrid.getTableHeader());
jScrollPane3.setViewportView(jGrid);
jScrollPane3.getAccessibleContext().setAccessibleName("rset");
org.jdesktop.layout.GroupLayout jPanel5Layout = new org.jdesktop.layout.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 386, Short.MAX_VALUE)
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE)
jButton1.setText("Find");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton1MouseClicked(evt);
jButton2.setText("Clear");
jButton2.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton2MouseClicked(evt);
org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel4Layout.createSequentialGroup()
.addContainerGap()
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(org.jdesktop.layout.GroupLayout.LEADING, jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(org.jdesktop.layout.GroupLayout.LEADING, jPanel4Layout.createSequentialGroup()
.add(jLabel1)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE))
.add(org.jdesktop.layout.GroupLayout.LEADING, jPanel4Layout.createSequentialGroup()
.add(jLabel2)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jTextField2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE)
.add(1, 1, 1))
.add(org.jdesktop.layout.GroupLayout.LEADING, jPanel4Layout.createSequentialGroup()
.add(jLabel3)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jTextField3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jLabel4)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jTextField4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE))
.add(jPanel4Layout.createSequentialGroup()
.add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jButton2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
jPanel4Layout.linkSize(new java.awt.Component[] {jButton1, jButton2}, org.jdesktop.layout.GroupLayout.HORIZONTAL);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel4Layout.createSequentialGroup()
.addContainerGap()
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel1)
.add(jTextField1))
.add(18, 18, 18)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel2)
.add(jTextField2))
.add(16, 16, 16)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel3)
.add(jTextField3)
.add(jLabel4)
.add(jTextField4))
.add(14, 14, 14)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jButton2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jButton1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap()
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(org.jdesktop.layout.GroupLayout.LEADING, jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(org.jdesktop.layout.GroupLayout.LEADING, jProgressBar1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 438, Short.MAX_VALUE))
.addContainerGap())
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap()
.add(jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jProgressBar1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
jTabbedPane1.addTab("Search", jPanel1);
org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 458, Short.MAX_VALUE)
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 401, Short.MAX_VALUE)
jTabbedPane1.addTab("Directory", jPanel2);
jSplitPane.setRightComponent(jTabbedPane1);
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jSplitPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 675, Short.MAX_VALUE)
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jSplitPane)
pack();
}// </editor-fold>//GEN-END:initComponents
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
}//GEN-LAST:event_jButton1ActionPerformed
private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton2MouseClicked
jGrid.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null, null, null, null, null, null, null},
{null, null, null, null, null, null, null, null, null, null},
{null, null, null, null, null, null, null, null, null, null},
{null, null, null, null, null, null, null, null, null, null}
new String [] {
"LName", "FName", "Position", "Department", "Office No", "Local No", "Office Mobile No", "Home No", "MobileNo", "Email Address"
jGrid.updateUI();
}//GEN-LAST:event_jButton2MouseClicked
private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked
try {
//Load and register SQL Server driver
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
//Establish a connection
Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://X.X.X.X:1433","MyAccount","MyPassword");
//Create a Statement object
Statement sql_stmt = connection.createStatement();
//Create a ResultSet object, execute the query and return a
// resultset
ResultSet rset = sql_stmt.executeQuery("SELECT * FROM EpxDirectory..Directory Order By LName");
// Populates a JTABLE Object
int i=0;
while (rset.next()){
String LName = rset.getString(1);
String FName = rset.getString(2);
String Position = rset.getString(3);
String Dept_Code = rset.getString(4);
String OffPhoneNo = rset.getString(5);
String LocalNo = rset.getString(6);
String OffMobileNo = rset.getString(7);
String HomePhoneNo = rset.getString(8);
String MobileNo = rset.getString(9);
String Email = rset.getString(10);
jGrid.updateUI();
jGrid.setValueAt(rset.getString(1).trim(),i,0);
jGrid.setValueAt(rset.getString(2).trim(),i,1);
jGrid.setValueAt(rset.getString(3).trim(),i,2);
jGrid.setValueAt(rset.getString(4).trim(),i,3);
jGrid.setValueAt(rset.getString(5).trim(),i,4);
jGrid.setValueAt(rset.getString(6).trim(),i,5);
jGrid.setValueAt(rset.getString(7).trim(),i,6);
jGrid.setValueAt(rset.getString(8).trim(),i,7);
jGrid.setValueAt(rset.getString(9).trim(),i,8);
jGrid.setValueAt(rset.getString(10).trim(),i,9);
i++;
//Close the ResultSet and Statement
rset.close();
sql_stmt.close();
//Close the database connection
connection.close();
System.out.println(Integer.toString(i) + " rows found");
} catch(Exception e) {
System.out.println("Failed to connect; Please view Stack Trace");
e.printStackTrace();
}//GEN-LAST:event_jButton1MouseClicked
private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
}//GEN-LAST:event_formWindowOpened
public static void run(){
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
frmMain frmMain = new frmMain();
frmMain.setLocationRelativeTo(null); // Center the JFrame on the
frmMain.setVisible(true);
private void exitApplication() {
// try {
// //gui.putStatus("Closing the connection....please wait.....");
// if(connection != null) {
// // connection.close(); //Closing the connection object.
// } catch(SQLException ex) { //Trap SQLException
// //gui.putStatus(ex.toString());
System.exit(0); //Exit the aplication
* @param args the command line arguments
public static void main(String args[]) {
run();
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JTable jGrid;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JPanel jPanel4;
private javax.swing.JPanel jPanel5;
private javax.swing.JProgressBar jProgressBar1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JScrollPane jScrollPane3;
private javax.swing.JSplitPane jSplitPane;
private javax.swing.JTabbedPane jTabbedPane1;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
private javax.swing.JTextField jTextField3;
private javax.swing.JTextField jTextField4;
private javax.swing.JTree jTree1;
// End of variables declaration//GEN-END:variables
}Use code tags.
Don't mix GUI and JDBC together. Split them out into separate classes.
You have a good start, but you will need to loop through your resultset and also pull the ResultSet metaData for you column headings -
LOV shows no results, but SQL Workshop does.
Hello,
I am using a select list with a named LOV. The select statement returns results when executed with SQL Workshop, but when I use the named LOV with any select item it allways shows no results.
I already checked the assigned schema and everything seems to be correct.
Is this a bug in APEX 3.2.1 ?
Best regards
TareqI would try a couple of things:
1. Trying passing the query into a report region to get a better look at what it is returning - at least it will rule out a problem with LOV per se i.e. if it doesn't run as a straight report then we know its query-related.
2. create a before header process to output the value of apex_util.get_default_schema to ensure that a valid value is returned. Something along these lines:
begin
wwv_flow.debug('apex_util.get_default_schema: '|| nvl(apex_util.get_default_schema,'invalid value');
end;If you re-run the page with 'Debug' switched on, you should see if a result is returned - this may well return a different value to what you were expecting.
On that note, obviously I have no idea what your application is trying to ultimately achieve, but I wonder if the default schema user is what you are looking for. The reason I say this is surely you would always have the same user (namely 'PUBLIC' or whatever DAD user you use to link to your oracle db) - unless you have multpile DADs and different instances referencing the same p_users_db table, I don't see how this is helpful to you.
Edited by: JoelC on 26-Apr-2010 09:19 -
Error creating EO- The specified schema object is not an existng object
hi,
I am getting an error "The specified schema object is not an existing object .Please un check Exisiting Object or select an exisiting object" while creating an EO.
Does any one knows how to get rid of it.
Thanks,
MurlaiHello
Looks like this is an old thread, but since I had the same problem and figured it out, I though I'll share it here:
What I figured is that in the Select Schema Object wizard, if I prefix the schema object with the schema name, then the attributes are fetched from the database. like this:
dbo.employeeinstead of this:
employeewhich is kind of strange because the schema is already mentioned in the database schema section and jdeveloper fills the object value after we choose it.
Good luck -
List the count of each schema objects.. schema wise sql query needed
Hi Friends,
i need a sql query which has to list the schema name along with the count of schema objects like tables,views,triggers.... order by schemaname
Regards,
DBHi
You can try this option if you use 11g .
Get all the object types in your db.
SELECT DISTINCT object_type
FROM dba_objects;Then include all the object types in to the below query.
select *
from (select owner, object_type, 1 CNT
from dba_objects ) e
pivot( sum(CNT) for object_type in
( 'INDEX','TYPE','VIEW','LIBRARY','TRIGGER','DIRECTORY','PACKAGE','QUEUE','PACKAGE BODY','TABLE PARTITION','PROCEDURE',
'WINDOW','CLUSTER','LOB','FUNCTION','CONSUMER GROUP','CONTEXT','RULE','XML SCHEMA','SEQUENCE','INDEX PARTITION','OPERATOR',
'EVALUATION CONTEXT','SCHEDULE','JOB','SCHEDULER GROUP','LOB PARTITION','JOB CLASS','INDEXTYPE','TABLE','TYPE BODY','RESOURCE PLAN',
'TABLE SUBPARTITION','UNDEFINED','DESTINATION','SYNONYM','EDITION','PROGRAM','RULE SET' ) )
order by owner;Cheers
Kanchana -
Problem with database schema objects in the entity object wizard
Hi All,
When creating a new entity object, I am facing a problem with database schema objects in the entity object wizard, database schema objects (check boxes for tables,synonyms...) are disabled. Actually I am using a synonym but I am not able to select the synonym check box.
Can any of you folks tell me how to enable the database schema objects (check boxes for tables,synonyms...).
Thanks in Advance.
Raja.MMake sure your using rite version of jdeveloper..
Make sure your using apps schema and check whether your able perform DML operations in the schema vis sql developer.
--Prasanna -
Problem creating table with foreign key in SQL Workshop
Application Express version 2.2.1.00.04
Get error message "Number of referencing columns/data types must match referenced columns"
Master table SLS_SUPPLIERS has primary key SLS_ID NUMBER(8,0) and when creating table SLS_PRODUCTS with FK SLS_SLP_ID NUMBER(8,0) using the create table wizard I get the above error.
The name of the FK is SLP_SLS_FK, key column is SLP_SLS_ID, referenced table is SLS_SUPPLIERS and referenced column is SLS_ID.
Any help is much appreciated.
James Edey
I should add that if I create the table without the foreign key constraint and then create the constraint separately in SQL Workshop then it creates OK. It only fails in the create table wizard dialog.
Message was edited by:
edeyje
Obviously no-one interested in this - just thought it may be a bug in v2.2 that the development team would find useful.
James
Message was edited by:
edeyjeI replied to the other thread on this too -
there is a bug on that page when you click Next. If you define more than one fk but then navigate using the links on the process chart on the left (Constraints, Confirm, etc), the page works fine. We do have a bug on this now and I just added the notes I will need to get this fixed in 3.1 (I have already assigned it to me - must have some rogue validation that fires on next).
Sorry it took so long for this to get noticed - I am glad I checked the forum this morning -
-- Sharon -
Hi there,
I am running LR4.1/CS5/ACR6.7 on a Win7 64bits system.
The feature "Edit-In" > "Open as Smart Object with Photoshop..." does work Ok with raw files (.NEF).
However, when i do try to use the same feature with 32 bits .TIFF files (which are output of the LR4.1's "Edit-In" > "Merge to HDR Pro in Photoshop..." other feature), nothing does happen (the Photoshop application windows does open but w.o the image that i've just selected).
I've used search engines and Adobe online help to see if there was any limit preventing the usage of this feature with 32 bits .TIF files but couldn't see such note.
Thanks for your help !
AlbertThanks Rikk,
That did work with a DNG file :-)
I am working with very huge .TIF files (400MB), so i am wondering if size could be the main issue (although my PC has lots of HW resources).
I will explore the DNG way, a format which seems anyways to be very promising now with LR4.
In case anyone has an idea why it doesn't work the .TIF files, please shoot !
Maybe you are looking for
-
I had a lovely computer, about 8 years old, running Windows XP; the mother board died; the hard drive was fine. I now have a new computer, running Windows 7, and I have the old hard drive as my 2nd hard drive. How do I get my old Firefox bookmarks of
-
Anyone that has attempted to deploy JSF apps to OC4J would no doubt have experienced this one. It is not new and occurs on many AS. OC4J instance start up fails attempting to initialize FacesServlet. The message reads java.lang.NullPointerException a
-
hello everybody! I use OpenSPARC T1. In floating point multiplication the upper 64 bit (64 to 128) where they compute and stored? ...in the fpu or it uses the SPU unit? thanx in advance
-
hi, 1) may i know what is the use of item relev for div (item relevant for delivery) in VOV7 (define item category). what is the implication if ticked or not ticked. 2) we have 1 standard item but this standard item category does not select this fiel
-
Creating a midlet thats dependent on a online database
Hi, I'm new to Java. I'm in the process of creating a midlet, but need to access an online mysql database. I've been searching, but all the ways i've found so far are long to implement and seem very complicated. Is there no quick and simple way to do