Help with ResultSets....
I have a bit of code that gets a sql statement from a TIBCO repository.. executes it.. get's a result set and is then supposed to update a status code for each row within the result, then process the records within the result set.
So the code looks like this:
Connection conn = DBService.initConnection(Constants.QTMx_DB_URL);
Statement st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
if (sql != null){
rs = st.executeQuery(sql);
if (!updateStatusCodes(rs)){
throw new Exception("Failed while updating status codes");
else{
Logger.debug("Status Code Update COMPLETE!");
else{
throw new Exception("Invoice SQL query statement is null");
Logger.debug("After Polling Query");
//iterate over each deal
while (rs.next()){
Logger.debug("In result set loop - processing deals");
blah blah blah......
The issue is that the ResultSet is not being populated with records. So I write the value of sql to a log file and get this.....
select hdr.INVOICE_NUM, hdr.INVOICE_DATE, hdr.DUE_DATE, hdr.DETAIL_COUNT, hdr.SETTLEMENT_AMOUNT, hdr.SETT
LEMENT_CURR_ID, hdr.ENTITY, hdr.SAP_XREF_ID, hdr.PARTNER, hdr.INTRACOMPANY_FLAG, hdr.SETTLEMENT_TYPE_ID, hdr.PRIOR_SETTLEMENT_DOC, h
dr.PAYMENT_METHOD_CODE, hdr.INTERFACE_STATUS_CODE, hdr.SAP_DOC_ID, hdr.LASTCHANGE, hdr.RPL_CODE, hdr.ACCTMONTH, dtl.DEAL_NUM, dtl.DE
ALDATE, dtl.DEAL_TYPE, dtl.DESK, dtl.QUANTITY, dtl.UNIT, dtl.SETTLEMENT_AMOUNT, dtl.SEQ_NUM, dtl.COSTID,dtl.PRODMONTH, dtl.TAXTYPE,
dtl.PIPELINE, dtl.METER from SAPUSR.SAP_INTERFACE_HDR hdr, SAPUSR.SAP_GMS_INTERFACE_DTL dtl where rtrim(hdr.SOURCE_SYS_ID)='GMS' and
(rtrim(hdr.INTERFACE_STATUS_CODE) = 'RE' or rtrim(hdr.INTERFACE_STATUS_CODE) is null) and hdr.SOURCE_SYS_ID=dtl.SOURCE_SYS_ID and h
dr.INVOICE_NUM=dtl.INVOICE_NUM order by dtl.INVOICE_NUM
So I cut and copy it into my handy dandy SQL Application and run it...
BAM! 97 Records returned....
What am I missing here. Also .... rs is a module wide object which is not declared in this method, it is just used in this method.
I hate to state the obvious but if you aren't getting any records back then the problem likely lies in the information following the "WHERE" portion of the SQL.
So to start with to remove complications, I would suggest reducing the size of your SQL statment to be either "select *" or
"select hdr.SOURCE_SYS_ID, hdr.INTERFACE_STATUS_CODE, dtl.SOURCE_SYS_ID, hdr.INVOICE_NUM, dtl.INVOICE_NUM"
as those seem to be the only critical columns in your table for your query.
Then remove the order by portion of the statement.
Then re-run the query. If that still fails to yield any records, then remove some of the joins in your statement or the usage of the rtrim statements to establish equation with some other variable/constant.
I realize this is an obvious avenue to proceed along. But I can't think of any reason a SQL query would work in one case and not in another on the same database.
One other thing you could look at is the portion of the statement where you state "is null". I'm not sure but I seem to remember something about some incompatibility with that (there is a work around if I am remembering correctly) and using JDBC.
One last theory is that it is the use of aliases:
SAPUSR.SAP_INTERFACE_HDR hdr
(i.e. these may be the cause of problems)
Hope this helps,
Tim
Similar Messages
-
Help with resultset and looping thru a sql filed
Hi,
I have a SQL statement which connects two tables with accounting number, the table2 have multiple rows for one accounting number in table1.
So I did if else condition in accounting number in resultset as following:
List<AccRecord> retval = new ArrayList<AccRecord>();
while(rs.next())
//instance of account record
AcciRecord acct1 = new AccRecord();;
if(acc_No != accountNumber)
//then get all data from table1
acc1.setEmpId(rs.getInt("ACC_ID"));
acc1.setEmpId(rs.getString("Acc_Name"));//and other 20 fields like this
else if(acc_No == accountNumber) //this is where it breaks down if same acc number has more than one row in table2,we don't //want to get all other data again from table1
//also get all data associated with that accounting number from table2
Other other1 = new Other();
other1.setEmpId(rs.getInt("EMP_ID"));//these are datas from table2
other1.setjobCode(rs.getString("JOB_CD"));
other1.add(crew1);
retval.add(acc1);
}My question is how can I make logic right, in above code for the first account number it will go to else if condition (coz very first time acc number is never going to be different then previous accounting number,so it won't get my accounting data, the way I have compared it)
I want to code like for one accounting number it brings all accounting data and for that accounting number it also brings all employee data (which is in table2) which will more than one entires,
So..when accounting number is same as previous it shouldn't get all data again from table 1 ,it should go to only else if condition to get data from table 2 , it should go to my if block only when there is a new accounting number, in other words when there is next record in table1
Can anybody help me??
Please...
Thanks
Edited by: ASH_2007 on Mar 28, 2008 11:55 AMhi there,
thanks for ur feedback
but it is always going to contian accno .. so it will never go in your condition
May be I haven't explained it well
I need something which gets all data for every new account number in table 1
Now for that same account number, table2 have 3 rows including that account number 3 times (I am connecting this 2 tables with acc no, table 1 doesn't have duplicate acc no but table 2 does)So my resultset runs 3 times for the first record in table 1, because for that accno table 2 has 3 entries
This is because my sql is as follow,,which I have to,,I can't change due to requirements...
SELECT A.accNumber, A.Date, B.EMP_ID, B.JOB_CD
FROM Table A, Table B, (SELECT SSA.accNumber FROM Table SSA, Table SSB
WHERE SSB.EMP_ID = ? AND
SSA.accNumber = accNumber) C
WHERE A.accNumber = C.accNumber
AND A.accNumber = B.accNumber
//so if I do: like this in my resultset
while(rs.next())
Integer accNumber = rs.getINt(accNumber);
accno =accnumber;
if (accno != accNumber)
{ get all account data
else if(accno == accNumber)
{ get all other data
}but question is it will not satisfy my if condition , because for a new record ,in this case,in first record acc number will never match...
I appreciate your help and time
Please help me
THnaks
Edited by: ASH_2007 on Mar 28, 2008 1:54 PM -
When I run this program, the result set show up in the results textarea but it does not start a new line after each record even after inserting the "\n" escape character
import java.awt.*;
import java.sql.*;
import java.awt.event.*;
import javax.swing.*;
* @author wezi
* A java program for keeping track of the inventory of
* books belonging to the ACM bookclub of Riverside
public class ACMBooks extends JFrame
private JTabbedPane mainTab;
private JPanel connectpane, querypane, processpane, adminpane;
private JPanel quadpane[] = new JPanel[4];
//components for pane 1
private JTextField txtUser, txtPort, txtHost, txtdb;
private JLabel lbluser, lblpasswd, lblport, lblhost, lbldb, lblstatus;
private JPasswordField pwdconnect;
private JButton btnConnect ;
private String tooltip[] = {"Default Name = bookdb","",
"Default port for MySQL = 3306",
"Default host is localhost", "Default database is acmbooks"};
//Components for pane 2
private JPanel sqlpane, searchpane, resultspane;
private JTextArea txaSQL, txaResults;
private JButton btnQuery, btnSearch, btnReset;
private JLabel lblAuthor, lblTitle, lblISBN, lblCategory;
private JTextField txtauthor, txttitle, txtisbn, txtCat;
private JScrollPane scroller;
//Components for panel 3
private JPanel checkIn, checkOut;
private GridLayout gl,gl2, gl3;
private GridBagLayout gbl = new GridBagLayout();
private GridBagConstraints gbc = new GridBagConstraints();
private GridBagConstraints gbc2 = new GridBagConstraints();
//private String pwd;
//Set up the GUI
public ACMBooks()
super("ACM Book Library");
lbldb = new JLabel("Database");
lblstatus = new JLabel("Connection settings");
gl = new GridLayout(2,2);
Container cont = getContentPane();
mainTab = new JTabbedPane();
connectpane = new JPanel();
adminpane = new JPanel();
//set up the connection pane GUI
connectpane.setLayout(gl);
for(int i=0; i<4; i++)
quadpane[i] = new JPanel();
connectpane.add(quadpane);
gbc.insets = new Insets(0,20,0,0);
quadpane[0].setLayout(gbl);
lbluser = new JLabel("User Name:");
gbc.anchor = GridBagConstraints.NORTHEAST;
gbc.gridx = 0; gbc.gridy = 0;
gbc.weightx = 0.5; gbc.weighty = 0.5;
quadpane[0].add(lbluser,gbc);
lblpasswd = new JLabel("Password:");
gbc.gridx = 0; gbc.gridy = 1;
quadpane[0].add(lblpasswd,gbc);
lblport = new JLabel("Port:");
gbc.gridx = 0; gbc.gridy = 2;
quadpane[0].add(lblport,gbc);
lblhost = new JLabel("Host:");
gbc.gridx = 0; gbc.gridy = 3;
quadpane[0].add(lblhost,gbc);
lbldb = new JLabel("Database:");
gbc.gridx = 0; gbc.gridy = 4;
quadpane[0].add(lbldb,gbc);
gbc.anchor = GridBagConstraints.NORTHWEST;
gbc.insets = new Insets(0,10,0,0);
gbc.gridx = 1; gbc.gridy = 0;
txtUser = new JTextField(10);
txtUser.setToolTipText("Default username = bookdb");
quadpane[0].add(txtUser,gbc);
gbc.gridx = 1; gbc.gridy = 2;
txtPort = new JTextField(10);
txtPort.setToolTipText("Default port = 3306");
quadpane[0].add(txtPort,gbc);
gbc.gridx = 1; gbc.gridy = 3;
txtHost = new JTextField(10);
txtHost.setToolTipText("Default host = localhost");
quadpane[0].add(txtHost,gbc);
gbc.gridx = 1; gbc.gridy = 4;
txtdb = new JTextField(10);
txtdb.setToolTipText("Default database = acmbooks");
quadpane[0].add(txtdb,gbc);
pwdconnect = new JPasswordField(10);
gbc.gridx = 1; gbc.gridy = 1;
quadpane[0].add(pwdconnect,gbc);
//Create a connection button
btnConnect = new JButton("Connect");
gbc.anchor = GridBagConstraints.NORTHWEST;
gbc.gridx = 2; gbc.gridy = 4;
quadpane[0].add(btnConnect,gbc);
//create the reset button
btnReset = new JButton(" Reset ");
btnReset.setSize(btnConnect.getHeight(),btnConnect.getWidth());
gbc.gridx = 2; gbc.gridy = 3;
quadpane[0].add(btnReset,gbc);
//Connection status
lblstatus = new JLabel();
quadpane[3].setLayout(gbl);
gbc.anchor = GridBagConstraints.SOUTHEAST;
gbc.insets = new Insets(0,10,20,20);
quadpane[3].add(lblstatus,gbc);
//Add a border to the first pane & add it to the main container
quadpane[0].setBorder(BorderFactory.createTitledBorder("Details"));
mainTab.addTab("Connection Settings",null,connectpane,"connections");
//Create the second tab (Query pane)
querypane = new JPanel();
GridBagLayout gblquery= new GridBagLayout();
GridBagConstraints gbcquery = new GridBagConstraints();
gl2 = new GridLayout(4,1);
querypane.setLayout(gblquery);
//The sql query pane
sqlpane = new JPanel();
sqlpane.setLayout(gbl);
gbc2.gridx = 0; gbc2.gridy = 0;
gbc2.weightx = 0.5; gbc2.weighty = 0.5;
txaSQL = new JTextArea(4,44);
txaSQL.setBorder(BorderFactory.createLoweredBevelBorder());
gbc2.anchor = GridBagConstraints.NORTHWEST;
gbc2.insets = new Insets(0,10,0,0);
sqlpane.add(txaSQL,gbc2);
gbc2.gridx = 1; gbc2.gridy = 0;
btnQuery = new JButton("Enter Query");
gbc2.insets = new Insets(0,16,5,10);
gbc2.anchor = GridBagConstraints.SOUTHEAST;
sqlpane.add(btnQuery,gbc2);
sqlpane.setBorder(BorderFactory.createTitledBorder("SQL Queries:"));
gbcquery.gridheight =1; gbcquery.gridwidth = 1;
gbcquery.gridx = 0; gbcquery.gridy = 0;
gbcquery.anchor = GridBagConstraints.NORTHWEST;
gbcquery.weightx = 0.5; gbcquery.weighty =0.5;
gbcquery.fill =GridBagConstraints.REMAINDER;
gbcquery.insets = new Insets(0,0,2,0);
gbcquery.ipadx = 1; gbcquery.ipady = 1;
querypane.add(sqlpane,gbcquery);
//The search by pane
searchpane = new JPanel();
searchpane.setLayout(gbl);
gbc2.insets = new Insets(0,14,5,5);
lblAuthor = new JLabel("Author:");
gbc2.anchor = GridBagConstraints.NORTHEAST;
gbc2.gridx = 0; gbc2.gridy = 0;
searchpane.add(lblAuthor,gbc2);
lblTitle = new JLabel("Title:");
gbc2.gridx = 0; gbc2.gridy = 1;
searchpane.add(lblTitle,gbc2);
lblISBN = new JLabel("ISBN:");
gbc2.gridx = 2; gbc2.gridy = 0;
searchpane.add(lblISBN,gbc2);
lblCategory = new JLabel("Category:");
gbc2.gridx = 2; gbc2.gridy =1;
searchpane.add(lblCategory,gbc2);
txtauthor = new JTextField(15);
gbc2.gridx = 1; gbc2.gridy = 0;
gbc2.anchor = GridBagConstraints.NORTHWEST;
searchpane.add(txtauthor,gbc2);
txttitle = new JTextField(15);
gbc2.gridx = 1; gbc2.gridy = 1;
searchpane.add(txttitle,gbc2);
txtisbn = new JTextField(15);
gbc2.gridx = 3; gbc2.gridy = 0;
searchpane.add(txtisbn,gbc2);
txtCat = new JTextField(15);
gbc2.gridx = 3; gbc2.gridy = 1;
searchpane.add(txtCat,gbc2);
btnSearch = new JButton("Search >>>");
gbc2.anchor = GridBagConstraints.SOUTHEAST;
gbc2.gridx = 4; gbc2.gridy = 1;
gbc2.insets = new Insets(0,5,20,10);
searchpane.add(btnSearch,gbc2);
searchpane.setBorder(BorderFactory.createTitledBorder("Search By:"));
gbcquery.gridheight =1; gbcquery.gridwidth = 1;
gbcquery.gridx = 0; gbcquery.gridy = 1;
gbcquery.insets = new Insets(0,0,0,0);
querypane.add(searchpane,gbcquery);
//The results pane
resultspane = new JPanel();
resultspane.setSize(20,60);
resultspane.setLayout(gbl);
gbc2.gridx = 0; gbc2.gridy = 0;
gbc2.anchor = GridBagConstraints.NORTHWEST;
txaResults = new JTextArea(" ",9,55);
scroller = new JScrollPane(txaResults);
resultspane.add(new JScrollPane(txaResults));
txaResults.setBorder(BorderFactory.createLoweredBevelBorder());
resultspane.add(txaResults,gbc2);
resultspane.setBorder(BorderFactory.createTitledBorder("Results:"));
gbcquery.gridheight =3; gbcquery.gridwidth = 1;
gbcquery.gridx = 0; gbcquery.gridy = 2;
gbcquery.weightx = 1; gbcquery.weighty = 1;
querypane.add(resultspane,gbcquery);
mainTab.addTab("Query Entry",null,querypane,"Query page");
//Create a third tab to process book checkin and out
processpane = new JPanel();
gl3 = new GridLayout(4,1);
processpane.setLayout(gl3);
//Create the checkin panel
checkIn = new JPanel();
checkIn.setBorder(BorderFactory.createTitledBorder("Return Books"));
checkIn.setLayout(gbl);
//Create the checkout panel
checkOut = new JPanel();
checkOut.setBorder(BorderFactory.createTitledBorder("Check Books Out"));
processpane.add(checkOut,gl3);
processpane.add(checkIn,gl3);
mainTab.addTab("Process Books",null, processpane,"Book Processing page");
//Create an administration panel
adminpane = new JPanel();
mainTab.addTab("Admin",null,adminpane,"Administration page");
cont.add(mainTab);
//Register the eventhandlers
ButtonHandler btnHandler = new ButtonHandler();
btnConnect.addActionListener(btnHandler);
btnQuery.addActionListener(btnHandler);
btnSearch.addActionListener(btnHandler);
btnReset.addActionListener(btnHandler);
setSize(650,460);
setVisible(true);
}//end constructor
private class ButtonHandler implements ActionListener
public void actionPerformed(ActionEvent e)
String errMsg;
Statement stmt;
ResultSet rs;
Connection con = null;
String pwd;
String user;
//Create a url from user input
String url = "jdbc:mysql://";
url += txtHost.getText();
url += ":";
url += txtPort.getText();
url += "/";
url += txtdb.getText();
try
//Register the JDBC Mysql Driver
Class.forName("com.mysql.jdbc.Driver");
//Get the password and user name for the database
pwd = new String(pwdconnect.getPassword());
user = new String(txtUser.getText());
//Open a connection to the database
con = DriverManager.getConnection(url,user,pwd);
//Add the action event for the btnReset
if(e.getSource() == btnReset)
//Clear all the text fields and the status label
lblstatus.setText(" ");
txtUser.setText(" ");
txtdb.setText(" ");
txtHost.setText(" ");
txtPort.setText(" ");
pwdconnect.setText("");
txaResults.setText(" ");
txaSQL.setText(" ");
try{
if(!con.isClosed())
con.close();
catch(Exception closeError)
String clErr = new String(closeError.toString());
txaResults.setText(clErr);
}//end btnReset
//If the connect button is pressed
if(e.getSource() == btnConnect)
if(!con.isClosed())//if connection is open
lblstatus.setText("");
lblstatus.setVisible(true);
lblstatus.setText("Connected to " + txtdb.getText()
+" on " + txtHost.getText());
else
{ lblstatus.setText("Not Connected"); }
}//end btnConnect
if(e.getSource() == btnQuery || e.getSource()== txaSQL)
String strQuery = new String(txaSQL.getText());
ResultSetMetaData rsmtd;
int numCol;
try
stmt = con.createStatement();
rs = stmt.executeQuery(strQuery);
rsmtd = rs.getMetaData(); //to get metadata
numCol = rsmtd.getColumnCount(); //for number of columns
String strCol[] = new String[numCol];
String colName[] = new String[numCol];
String txaColumn = new String("");
String strHeading = new String("");
//Write the results of the query to the results text area
txaResults.setText(" ");
//Get the data from the result set
//first get the column headings
for(int i=1; i<=numCol; i++)
colName[i-1] = rsmtd.getColumnName(i);
strHeading += colName[i-1] + "\t";
txaResults.setText(strHeading + "\n");
while(rs.next())
//Get the values & create a display column
for(int i=1; i<=numCol; i++)
strCol[i-1] = rs.getString(i);
txaColumn += strCol[i-1] + "\t";
}//end for
//Display the values
txaResults.append( txaColumn + "\n");
catch(Exception sqlError)
txaResults.setText("");
String strSqlErr = new String(sqlError.toString());
txaResults.setText(strSqlErr);
}//end btnQuery
if(e.getSource() == btnSearch)
try
String strAuthor = new String(txtauthor.getText());
String strISBN = new String(txtisbn.getText());
String strTitle = new String(txttitle.getText());
String strCat = new String(txtCat.getText());
* Need to add code to change the search fields to
* any if the field is blank i.e if the field is blank
* search using a wild card. If all fields are blank, then
* do not search at all.
stmt = con.createStatement();
rs = stmt.executeQuery("Select * from books where" +
" bookAuthor = " + strAuthor +
" bookISBN = " + strISBN +
" bookTitle = " + strTitle +
"bookCategory = " + strCat);
catch(Exception searchError)
errMsg = new String(searchError.toString());
txaResults.setText("");
txaResults.setText(errMsg);
}//end btnSearch
catch(Exception connectError)
errMsg = new String(connectError.toString());
lblstatus.setText("");
lblstatus.setText(errMsg);
}//end actionPer
}//end ButtonHandler
public static void main(String[] args)
ACMBooks app = new ACMBooks();
app.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}//end main
}//end class ACMBooksHi,
Here is a template of Manifest file which you can use for your reference:
Manifest-Version: 1.0
Created-By: Apache Ant 1.5.1
Main-Class: com.pkg1.pkg2.MainClass
Class-Path: . ./libs/ ./libs/database-driver.jar ./libs/jdom.jar ./libs/xercesImpl.jar ./libs/log4j.jar ....
Name: com.pkg1.pkg2Main-Class: Specify the main class with complete package name
Class-Path: Put all the jar file name with path
<b>So the solution to your problem is to put you jar file name with the relative or complete path</b>
Thanks
Duke. -
Urgent help with simple BPEL process for reading data from database
Hello there,
I need help with BPEL project.
i have created a table Employee in Database.
I did create application, BPEL project and connection to the database properly using Database Adapter.
I need to read the records from the database and convert into xml fomat and it should to go approval for BPM worklist.
Can someone please describe me step by step what i need to do.
Thx,
DpsI have created a table in Database with data like Empno,name,salary,comments.
I created Database Connection in jsp page and connecting to BPEL process.
It initiates the process and it goes automatically for approval.
Please refer the code once which i created.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@page import="java.util.Map" %>
<%@page import="com.oracle.bpel.client.Locator" %>
<%@page import="com.oracle.bpel.client.NormalizedMessage" %>
<%@page import="com.oracle.bpel.client.delivery.IDeliveryService" %>
<%@page import="javax.naming.Context" %>
<%@page import="java.util.Hashtable" %>
<%@page import="java.util.HashMap" %>
<%@ page import="java.sql.*"%>
<%@ page import= "jspprj.DBCon"%>
<html>
<head>
<title>Invoke CreditRatingService</title>
</head>
<body>
<%
DBCon dbcon=new DBCon();
Connection conn=dbcon.createConnection();
Statement st=null;
PreparedStatement pstmt=null;
Hashtable env= new Hashtable();
ResultSet rs = null;
Map payload =null;
try
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.PROVIDER_URL, "opmn:ormi://localhost:port:home/orabpel");//bpel server
env.put("java.naming.security.principal", "username");
env.put("java.naming.security.credentials", "password");//bpel console
Locator locator = new Locator("default","password",env);
IDeliveryService deliveryService =
(IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
// construct the normalized message and send to Oracle BPEL Process Manager
NormalizedMessage nm = new NormalizedMessage();
java.util.HashMap map = new HashMap();
st=conn.createStatement();
out.println("connected");
String query1="Select * from EMPLOYEE";
rs=st.executeQuery(query1);
/*reading Data From Database and converting into XML format
so that no need of going to BPEL console and entering the details.
while (rs.next()){
String xml1 = "<AsynchBPELProcess1ProcessRequest xmlns='http://xmlns.oracle.com/AsynchBPELProcess1'>"+
"<Empno>"+rs.getString(1)+"</Empno>"+
"<EmpName>"+rs.getString(2)+"</EmpName>"+
"<Salary>"+rs.getString(3)+"</Salary>"+
"<Comments>"+rs.getString(4)+"</Comments>"+
"</AsynchBPELProcess1ProcessRequest>";
out.println(xml1);
nm.addPart("payload", xml1 );
// EmployeeApprovalProcess is the BPEL process in which human task is implemented
deliveryService.post("EmployeeApprovalProcess", "initiate", nm);
// payload = res.getPayload();
out.println( "BPELProcess CreditRatingService executed!<br>" );
// out.println( "Credit Rating is " + payload.get("payload") );
//Incase there is an exception while invoking the first server invoke the second server i.e lsgpas13.
catch(Exception ee) {
//("BPEL Server lsgpas14 invoking error.\n"+ee.toString());
%>
</body>
</html>
Its working fine.And i want it for Bulk approvals.please help me step by step procedure if any other way to implement this. -
Need help with **** Invalid Cursor State ****
Hi,
can someone tell me why am i getting this error....
//******java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
Any help is greatly appreciated.....
Thanks in advance.
//***********this is the output on servlet side**************//
Starting service Tomcat-Standalone
Apache Tomcat/4.0.3
Starting service Tomcat-Apache
Apache Tomcat/4.0.3
init
DBServlet init: Start
DataAccessor init: Start
Accessor init: Loading Database Driver: sun.jdbc.odbc.JdbcOdbcDriver
DataAccessor init: Getting a connection to - jdbc:odbc:SCANODBC
username SYSDBA
password masterkey
DataAccessor init: Preparing searchPolicy
DataAccessor init: Prepared policySearch
DataAccessor init: Prepared ssnSearch
DataAccessor init: End
After the myDataAccessor
Database Connection...
in doGet(...)
SSSSSSSGetpolicynumber
In GetPolicyInformation
b05015195
Getting Policy Informaton for = b05015195
okay, building vector for policy
in GetPolicyInformation for = b05015195
starting query... policy Information
finishing query... Policy Information
Inside the while(next) loop
sun.jdbc.odbc.JdbcOdbcResultSet@4db06e
sun.jdbc.odbc.JdbcOdbcResultSet@4db06e
b05015195
policy information constructor with resultset
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6031)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6188)
at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(JdbcOdbc.java:3266)
at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(JdbcOdbcResultSet.java:
5398)
at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:326)
at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:383)
at viewscreenappletservlet.policyinformation.<init>(policyinformation.ja
va:56)
at viewscreenappletservlet.DatabaseAccessor.getPolicyInformation(Databas
eAccessor.java:145)
at viewscreenappletservlet.Servlet.policyDisplay(Servlet.java:108)
at viewscreenappletservlet.Servlet.doGet(Servlet.java:91)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServl
et.java:446)
at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java
:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:475)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
2343)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
rValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcesso
r.java:1012)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.ja
va:1107)
at java.lang.Thread.run(Thread.java:484)
result set closed
1
sending response
Sending policy vector to applet...
Data transmission complete.1) JDBC-ODBC driver is buggy
2) Some drivers (truly speaking most of them) doesn't
support cursors or supports them in a wrong way
Paul -
Help with Servlets!!
Hi all,
I need help with Java and Jsp. Here are the specs:
1. An HTML web form that contains info about a customer: name, address, telephone number.
2. When the "Submit" button is clicked, the information will go directly into an Oracle database table named "customer".
Where should I start?? So far, I have created the HTML web form. So what i need is to write a servlet that will take the data from the web form and insert that into the Oracle table. If you have any solutions to my problem, please let me know. Thanks a lot in advance.<%@ page language="java" import="java.sql.*" %>
<html>
<head>
<title>
Customer
</title>
</head>
<body>
<%!
java.sql.Connection con;
java.sql.PreparedStatement pstmt;
java.sql.ResultSet rs;
javax.servlet.http.HttpServlet request;
String name,address;
int phone;
int i;
%>
<%
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = java.sql.DriverManager.getConnection
("jdbc:odbc:<DSN name>","scott","tiger");
%>
<% } catch(Exception e){ System.out.println(e.getMessage()); } %>
<%
name = request.getParameter("name");
address = request.getParameter("address");
phone = Integer.parseInt(request.getParameter("phone"));
pstmt=con.prepareStatement("insert into <table name> values(?,?,?)");
pstmt.setString(1,name);
pstmt.setString(2,address);
pstmt.setInt(3,phone);
i=pstmt.executeUpdate();
%>
</body>
</html>
1. create a dsn connecting oracle, using ODBC from control panel
2. name the text fields in the html page as "name","address","phone"
3. enter the table name you created in oracle in place of <table name>
I hope this should work , let me know .......
bye
vamsee -
I need help with paginating my Oracle database records in JSP
Please can someone help with a script that allows me to split my resultsets from an Oracle database in JSP...really urgent..any help would be really appreciated. I'm using the Oracle Apache http server and JSP environment that comes with the database...thanks
First thing you have to do is decide on a platform and
database. Check to see what your server supports. Whether it is ASP
and MSSQL, PHP and MySQL or less likely Cold Fusion. -
Need Help with Listener on JInternalFrame
Below is the code as it is currently.
public class addCustomer extends JInternalFrame implements ActionListener{
//Variable declarations here
private JPanel panel = new JPanel();
private JLabel label1,label2,label3,label4,label5,label6,label7,label8,label9,icon1;
private JTextField CustNum,CFName,CSName,Address1,Address2,City,PostCode,Tel,Cell;
private JButton Cancel, Add;
private ImageIcon pic,FrmPic;
addCustomer() {
super ("Add New Customer",true,true,true,true);
setSize(350,370);
setResizable(false);
On the Frame I have a textfield that I would like to add a listener to. When text is typed into the textfield it should enable a JButton on the frame. My problem is that as soon as I implement KeyListener or EventListener on the above code I get an error of the class is not defined as abstract. If I define it as abstract my main declaration that looks like this gives me an error :
public static void main(String args[]){
new Video().show();
Can anyone help me with a work around.
AlexanderStill have an error in the code. I don't know what I am doing wrong. this is the code so far.
//This class will create the the Panel for Adding new Customers
package VideoShop;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
import java.io.*;
import javax.swing.event.*;
public class addCustomer extends JInternalFrame implements ActionListener{
//Variable declarations here
private JPanel panel = new JPanel();
private JLabel label1,label2,label3,label4,label5,label6,label7,label8,label9,icon1;
private JTextField CustNum,CFName,CSName,Address1,Address2,City,PostCode,Tel,Cell;
private JButton Cancel, Add;
private ImageIcon pic,FrmPic;
addCustomer() {
super ("Add New Customer",true,true,true,true);
setSize(350,370);
setResizable(false);
//Sets the layout for the panel
panel.setLayout(null);
//Creates the labels
label1 = new JLabel("Customer Nr");
label2 = new JLabel("First Name");
label3 = new JLabel("Surname");
label4 = new JLabel("Address");
label5 = new JLabel("Address");
label6 = new JLabel("City");
label7 = new JLabel("Postcode");
label8 = new JLabel("Tel Nr");
label9 = new JLabel("Cell Nr");
//Creates the Textfields
CustNum = new JTextField();
CustNum.setEditable(false);
CFName = new JTextField();
CSName = new JTextField();
Address1 = new JTextField();
Address2 = new JTextField();
City = new JTextField();
PostCode = new JTextField();
Tel = new JTextField();
Cell = new JTextField();
//Creates the buttons
Cancel = new JButton("Cancel");
Add = new JButton("Add");
//Sets the alignment of the label controls
label1.setBounds(20, 20, 90, 20);
label2.setBounds(20, 50, 90, 20);
label3.setBounds(20, 80, 90, 20);
label4.setBounds(20, 110, 90, 20);
label5.setBounds(20, 140, 90, 20);
label6.setBounds(20, 170, 90, 20);
label7.setBounds(20, 200, 90, 20);
label8.setBounds(20, 230, 90, 20);
label9.setBounds(20,260,90,20);
//Sets the alignment of the Textfield controls
CustNum.setBounds(100,20,90,20);
CFName.setBounds(100, 50, 90, 20);
CSName.setBounds(100, 80, 90, 20);
Address1.setBounds(100, 110, 130, 20);
Address2.setBounds(100, 140, 130, 20);
City.setBounds(100, 170, 100, 20);
PostCode.setBounds(100, 200, 65, 20);
Tel.setBounds(100,230, 90,20);
Cell.setBounds(100, 260, 90, 20);
//Sets the alignment of the Button controls
Add.setBounds(200, 310, 90, 20);
Cancel.setBounds(85,310,90,20);
//Creates an icon on the panel
pic = new ImageIcon("/VideoShop/NotePad.gif");
icon1 = new JLabel(pic);
icon1.setBounds(280,10,50,50);
//Adds Mnemonics
Cancel.setMnemonic('c');
Add.setMnemonic('a');
//Adds listener to the Cell TextField to help with validation
Cell.getDocument().addDocumentListener(new DocumentListener(){
public void changeUpdate(DocumentEvent e){
public void removeUpdate (DocumentEvent e){
adjust(e);
public void insertUpdate(DocumentEvent e){ //ERROR////////////
adjust(e);
//Adds listeners to the buttons on the panel
Cancel.addActionListener(this);
Add.addActionListener(this);
//Adds the controls to the panel
panel.add(label1);
panel.add(label2);
panel.add(label3);
panel.add(label4);
panel.add(label5);
panel.add(label6);
panel.add(label7);
panel.add(label8);
panel.add(label9);
panel.add(CustNum);
panel.add(CFName);
panel.add(CSName);
panel.add(Address1);
panel.add(Address2);
panel.add(City);
panel.add(PostCode);
panel.add(Tel);
panel.add(Cell);
panel.add(Cancel);
panel.add(Add);
panel.add(icon1);
//Gets the next customer number from the database
//Variables for the database
String dbuser = "";
String dbpasswd = "";
String DriverPrefix = "jdbc:odbc:";
String DataSource = "Video";
//Holds the value from the database
String val1;
//SQL String for writing data to database
String SQLstring = "SELECT CustNum FROM Customers";
//Loads the driver for the database
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
} catch (Exception e) {
JOptionPane.showMessageDialog(null,"Error Loading driver\n"+e,"Driver Load Error",JOptionPane.WARNING_MESSAGE);
Statement stmt = null;
Connection con = null;
//Create a connection to the database.
try {
con = DriverManager.getConnection(DriverPrefix+DataSource,dbuser, dbpasswd);
stmt = con.createStatement();
}catch (Exception e) {
JOptionPane.showMessageDialog(null,"Cannot connect to Database\n"+e,"Connection Error",JOptionPane.WARNING_MESSAGE);
ResultSet rs = null;
//Gets data from the database
try {
rs = stmt.executeQuery(SQLstring);
while (rs.next()){
val1 = rs.getString(1);
int val2 = Integer.parseInt(val1);
val2++;
CustNum.setText(String.valueOf(val2));
} catch (Exception e){
JOptionPane.showMessageDialog(null,"Cannot connect to database\n"+e,"Communication Error",JOptionPane.WARNING_MESSAGE);
try {
con.close();
} catch (Exception e){
JOptionPane.showMessageDialog(null,"Cannot close database\n"+e,"Error",JOptionPane.WARNING_MESSAGE);
//Adds the panel to the InternalFrame and display it
getContentPane().add(panel);
show();
//Here all action events are processed
public void actionPerformed(ActionEvent e) {
if (e.getSource() == Cancel){
dispose();
if (e.getSource() == Add){
ToDatabase();
//Here the document event is processed
public void adjust(DocumentEvent e){
Cell.setEnabled(e.getDocument().getLength()>0);
//Here the data will be sent to the database
public void ToDatabase() {
//Variables for the database
String dbuser = "";
String dbpasswd = "";
String DriverPrefix = "jdbc:odbc:";
String DataSource = "Video";
//SQL String for writing data to database
String SQLstring ="INSERT INTO Customers VALUES('"+CustNum.getText()+"', '"+CFName.getText()+"','"+CSName.getText()+"','"+Address1.getText()+"','"+Address2.getText()+"','"+City.getText()+"','"+PostCode.getText()+"','"+Tel.getText()+"','"+Cell.getText()+"')";
//Loads the driver for the database
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
} catch (Exception e) {
JOptionPane.showMessageDialog(null,"Error Loading driver\n"+e,"Driver Load Error",JOptionPane.WARNING_MESSAGE);
Statement stmt = null;
Connection con = null;
//Create a connection to the database.
try {
con = DriverManager.getConnection(DriverPrefix+DataSource,dbuser, dbpasswd);
stmt = con.createStatement();
}catch (Exception e) {
JOptionPane.showMessageDialog(null,"Cannot connect to Database\n"+e,"Connection Error",JOptionPane.WARNING_MESSAGE);
//Transfer data to database
try {
stmt.executeUpdate(SQLstring);
con.close();
} catch (Exception e) {
JOptionPane.showMessageDialog(null,"Cannot update database\n"+e,"Communication Error",JOptionPane.WARNING_MESSAGE);
dispose();
The error that I receive is this:
VideoShop/addCustomer.java [98:1] <anonymous VideoShop.addCustomer$1> is not abstract and does not override abstract method changedUpdate(javax.swing.event.DocumentEvent) in javax.swing.event.DocumentListener
public void insertUpdate(DocumentEvent e){ //ERROR////////////
^
1 error
Errors compiling addCustomer.
Is there a way around this or should I rewrite the whole class.
Thanks
Alexander -
Help with if statement in cursor and for loop to get output
I have the following cursor and and want to use if else statement to get the output. The cursor is working fine. What i need help with is how to use and if else statement to only get the folderrsn that have not been updated in the last 30 days. If you look at the talbe below my select statement is showing folderrs 291631 was updated only 4 days ago and folderrsn 322160 was also updated 4 days ago.
I do not want these two to appear in my result set. So i need to use if else so that my result only shows all folderrsn that havenot been updated in the last 30 days.
Here is my cursor:
/*Cursor for Email procedure. It is working Shows userid and the string
You need to update these folders*/
DECLARE
a_user varchar2(200) := null;
v_assigneduser varchar2(20);
v_folderrsn varchar2(200);
v_emailaddress varchar2(60);
v_subject varchar2(200);
Cursor c IS
SELECT assigneduser, vu.emailaddress, f.folderrsn, trunc(f.indate) AS "IN DATE",
MAX (trunc(fpa.attemptdate)) AS "LAST UPDATE",
trunc(sysdate) - MAX (trunc(fpa.attemptdate)) AS "DAYS PAST"
--MAX (TRUNC (fpa.attemptdate)) - TRUNC (f.indate) AS "NUMBER OF DAYS"
FROM folder f, folderprocess fp, validuser vu, folderprocessattempt fpa
WHERE f.foldertype = 'HJ'
AND f.statuscode NOT IN (20, 40)
AND f.folderrsn = fp.folderrsn
AND fp.processrsn = fpa.processrsn
AND vu.userid = fp.assigneduser
AND vu.statuscode = 1
GROUP BY assigneduser, vu.emailaddress, f.folderrsn, f.indate
ORDER BY fp.assigneduser;
BEGIN
FOR c1 IN c LOOP
IF (c1.assigneduser = v_assigneduser) THEN
dbms_output.put_line(' ' || c1.folderrsn);
else
dbms_output.put(c1.assigneduser ||': ' || 'Overdue Folders:You need to update these folders: Folderrsn: '||c1.folderrsn);
END IF;
a_user := c1.assigneduser;
v_assigneduser := c1.assigneduser;
v_folderrsn := c1.folderrsn;
v_emailaddress := c1.emailaddress;
v_subject := 'Subject: Project for';
END LOOP;
END;
The reason I have included the folowing table is that I want you to see the output from the select statement. that way you can help me do the if statement in the above cursor so that the result will look like this:
emailaddress
Subject: 'Project for ' || V_email || 'not updated in the last 30 days'
v_folderrsn
v_folderrsn
etc
[email protected]......
Subject: 'Project for: ' Jim...'not updated in the last 30 days'
284087
292709
[email protected].....
Subject: 'Project for: ' Kim...'not updated in the last 30 days'
185083
190121
190132
190133
190159
190237
284109
286647
294631
322922
[email protected]....
Subject: 'Project for: Joe...'not updated in the last 30 days'
183332
183336
[email protected]......
Subject: 'Project for: Sam...'not updated in the last 30 days'
183876
183877
183879
183880
183881
183882
183883
183884
183886
183887
183888
This table is to shwo you the select statement output. I want to eliminnate the two days that that are less than 30 days since the last update in the last column.
Assigneduser....Email.........Folderrsn...........indate.............maxattemptdate...days past since last update
JIM......... jim@ aol.com.... 284087............. 9/28/2006.......10/5/2006...........690
JIM......... jim@ aol.com.... 292709............. 3/20/2007.......3/28/2007............516
KIM......... kim@ aol.com.... 185083............. 8/31/2004.......2/9/2006............. 928
KIM...........kim@ aol.com.... 190121............. 2/9/2006.........2/9/2006.............928
KIM...........kim@ aol.com.... 190132............. 2/9/2006.........2/9/2006.............928
KIM...........kim@ aol.com.... 190133............. 2/9/2006.........2/9/2006.............928
KIM...........kim@ aol.com.... 190159............. 2/13/2006.......2/14/2006............923
KIM...........kim@ aol.com.... 190237............. 2/23/2006.......2/23/2006............914
KIM...........kim@ aol.com.... 284109............. 9/28/2006.......9/28/2006............697
KIM...........kim@ aol.com.... 286647............. 11/7/2006.......12/5/2006............629
KIM...........kim@ aol.com.... 294631............. 4/2/2007.........3/4/2008.............174
KIM...........kim@ aol.com.... 322922............. 7/29/2008.......7/29/2008............27
JOE...........joe@ aol.com.... 183332............. 1/28/2004.......4/23/2004............1585
JOE...........joe@ aol.com.... 183336............. 1/28/2004.......3/9/2004.............1630
SAM...........sam@ aol.com....183876.............3/5/2004.........3/8/2004.............1631
SAM...........sam@ aol.com....183877.............3/5/2004.........3/8/2004.............1631
SAM...........sam@ aol.com....183879.............3/5/2004.........3/8/2004.............1631
SAM...........sam@ aol.com....183880.............3/5/2004.........3/8/2004.............1631
SAM...........sam@ aol.com....183881.............3/5/2004.........3/8/2004.............1631
SAM...........sam@ aol.com....183882.............3/5/2004.........3/8/2004.............1631
SAM...........sam@ aol.com....183883.............3/5/2004.........3/8/2004.............1631
SAM...........sam@ aol.com....183884.............3/5/2004.........3/8/2004............ 1631
SAM...........sam@ aol.com....183886.............3/5/2004.........3/8/2004............ 1631
SAM...........sam@ aol.com....183887.............3/5/2004.........3/8/2004............ 1631
SAM...........sam@ aol.com....183888.............3/5/2004.........3/8/2004............ 1631
PAT...........pat@ aol.com.....291630.............2/23/2007.......7/8/2008............ 48
PAT...........pat@ aol.com.....313990.............2/27/2008.......7/28/2008............28
NED...........ned@ aol.com.....190681.............4/4/2006........8/10/2006............746
NED...........ned@ aol.com......95467.............6/14/2006.......11/6/2006............658
NED...........ned@ aol.com......286688.............11/8/2006.......10/3/2007............327
NED...........ned@ aol.com.....291631.............2/23/2007.......8/21/2008............4
NED...........ned@ aol.com.....292111.............3/7/2007.........2/26/2008............181
NED...........ned@ aol.com.....292410.............3/15/2007.......7/22/2008............34
NED...........ned@ aol.com.....299410.............6/27/2007.......2/27/2008............180
NED...........ned@ aol.com.....303790.............9/19/2007.......9/19/2007............341
NED...........ned@ aol.com.....304268.............9/24/2007.......3/3/2008............ 175
NED...........ned@ aol.com.....308228.............12/6/2007.......12/6/2007............263
NED...........ned@ aol.com.....316689.............3/19/2008.......3/19/2008............159
NED...........ned@ aol.com.....316789.............3/20/2008.......3/20/2008............158
NED...........ned@ aol.com.....317528.............3/25/2008.......3/25/2008............153
NED...........ned@ aol.com.....321476.............6/4/2008.........6/17/2008............69
NED...........ned@ aol.com.....322160.............7/3/2008.........8/21/2008............4
MOE...........moe@ aol.com.....184169.............4/5/2004.......12/5/2006............629
[email protected]/27/2004.......3/8/2004............1631
How do I incorporate a if else statement in the above cursor so the two days less than 30 days since last update are not returned. I do not want to send email if the project have been updated within the last 30 days.
Edited by: user4653174 on Aug 25, 2008 2:40 PManalytical functions: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/functions2a.htm#81409
CASE
http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#36899
http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/04_struc.htm#5997
Incorporating either of these into your query should assist you in returning the desired results. -
I installed Sunbird in one computer and my calendar has all my infos, events, and task that i would like to see on another computer that i just downloaded Sunbird into. Also, is it possible I can access Sunbird on my iphone?
Thank you in advance,Try the forum here - http://forums.mozillazine.org/viewforum.php?f=46 - for help with Sunbird, this forum is for Firefox support.
-
Hoping for some help with a very frustrating issue!
I have been syncing calendar and contacts on my iPhone 5 and Outlook 2007 using iCloud 2.1.3 (my PC is running Vista). All was well until the events I entered on the phone were showing up in Outlook, but not the other way around. I’ve tried the usual recommended steps: deselecting calendar and contacts in the iCloud control panel and then re-selecting, signing out of the panel and back in, and repairing the Outlook installation in control panel. I even uninstalled iCloud on the PC and downloaded it again (same version).
The furthest I’ve gotten is step 2 (and once, step 3) of 7 while performing “Outlook Setup For iCloud.” At that point I get, “Your setup couldn’t be started because of an unexpected error.” After the first attempt at all this, all my calendar events disappeared from Outlook, although they are still in iCloud calendar and on my phone.
Sound familiar? Any ideas on how to solve this iCloud/Outlook issue? Thanks much in advance!Hoping for some help with a very frustrating issue!
I have been syncing calendar and contacts on my iPhone 5 and Outlook 2007 using iCloud 2.1.3 (my PC is running Vista). All was well until the events I entered on the phone were showing up in Outlook, but not the other way around. I’ve tried the usual recommended steps: deselecting calendar and contacts in the iCloud control panel and then re-selecting, signing out of the panel and back in, and repairing the Outlook installation in control panel. I even uninstalled iCloud on the PC and downloaded it again (same version).
The furthest I’ve gotten is step 2 (and once, step 3) of 7 while performing “Outlook Setup For iCloud.” At that point I get, “Your setup couldn’t be started because of an unexpected error.” After the first attempt at all this, all my calendar events disappeared from Outlook, although they are still in iCloud calendar and on my phone.
Sound familiar? Any ideas on how to solve this iCloud/Outlook issue? Thanks much in advance! -
Help with HP Laser Printer 1200se
HP Support Line,
Really need your assistance. I have tried both contacting HP by phone (told they no longer support our printer via phone help), the tech told me that I needed to contact HP by e-mail for assistance. I then sent an e-mail for assistance and got that reply today, the reply is as follows "Randall, unfortunately, HP does not offer support via e-mail for your product. However many resources are available on the HP web site that may provide the answer to your inquiry. Support is also available via telephone. A list of technical support numbers can be round at the following URL........." The phone numbers listed are the ones I called and the ones that told me I needed to contact the e-mail support for help.
So here I am looking for your help with my issue.
We just bought a new HP Pavillion Slimline Desk Top PC (as our 6 year old HP Pavillion PC died on us). We have 2 HP printers, one (an all-in-one type printer, used maily for copying and printing color, when needed) is connected and it is working fine with the exception of the scanning option (not supported by Windows 7). However we use our Laser Printer for all of our regular prining needs. This is the HP LaserPrinter 1200se, which is about 6 years old but works really well. For this printer we currently only have a parallel connection type cord and there is not a parallel port on the Slimline HP PC. The printer also has the option to connedt a USB cable (we do not currently have this type of cable).
We posed the following two questions:
1. Is the Laser Jet 1200se compatible with Windows 7?
and if this is the case
2. Can we purchase either a) a USC connection cord (generic or do we need a printer specific cord)? or b) is there there a printer cable converter adapater to attach to our parallel cable to convert to a USB connection?
We do not want to purchase the USB cable if Windows 7 will not accept the connection, or if doing this will harm the PC.
We really would appreciate any assitance that you might give us.
Thank you,
Randy and Leslie GibsonSorry, both cannot be enabled by design. That said, devices on a network do not care how others are connected. You can print from a wireless connection to a wired (Ethernet) printer and v/v.
Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
I am employed by HP -
Going to Australia and need help with Power converters
Facts:
US uses 110v on 60hz
Australia 220v on 50hz
Making sure I understood that correctly. Devices I plan on bringing that will use power are PS3 Slim, MacBook Pro 2008 model, and WD 1TB External HDD. My DS, and Cell are charging via USB to save trouble of other cables.
Ideas I've had or thought of:
1. Get a power converter for a US Powerstrip, and then plug in my US items into the strip and then the strip into an AUS Converter into Australian outlet. Not sure if this fixes the voltage/frequency change.
2. Get power converters for all my devices. But, not sure if my devices needs ways of lowering the voltage/increasing frequency or something to help with the adjustment.
3. Buy a universal powerstrip, which is extremely costly and I wouldn't be able to have here in time (I leave Thursday). Unless Best Buy carrys one.godzillafan868 wrote:
Facts:
US uses 110v on 60hz
Australia 220v on 50hz
Making sure I understood that correctly. Devices I plan on bringing that will use power are PS3 Slim, MacBook Pro 2008 model, and WD 1TB External HDD. My DS, and Cell are charging via USB to save trouble of other cables.
Ideas I've had or thought of:
1. Get a power converter for a US Powerstrip, and then plug in my US items into the strip and then the strip into an AUS Converter into Australian outlet. Not sure if this fixes the voltage/frequency change.
2. Get power converters for all my devices. But, not sure if my devices needs ways of lowering the voltage/increasing frequency or something to help with the adjustment.
3. Buy a universal powerstrip, which is extremely costly and I wouldn't be able to have here in time (I leave Thursday). Unless Best Buy carrys one.
Check the specs on input voltage/frequency of your power supplies.
Many laptop power supplies are "universal/global" and are specced something like 80-265 volts AC 50/60 Hz, but not all. These will just need a connector adapter.
Unsure about the PS3 Slim - if it isn't universal it could be difficult as you'll need a 110/220 transformer, one big enough (power-handling wise) for the PS3 will be very bulky.
For the external WD HDD, if it doesn't have a universal supply, you're probably best off just finding a new wallwart for it that is capable of running on 220/50.
*disclaimer* I am not now, nor have I ever been, an employee of Best Buy, Geek Squad, nor of any of their affiliate, parent, or subsidiary companies. -
Creation of context sensitive help with pure FM 12 usage doesn't work
Hi,
I hope somebody is able to help me with a good hint or tip.
I am trying to create a context-sensitive Microsoft Help with FM12 only using the abilities of FM (no RoboHelp). For some reasons, my assigned ID's are not used in the generated chm file and therefore the help does not work context-sensitively.
What did I do?
- I created my FM files and assigned topic aliases to the headers. I did this two ways: a) using the "Special" menue and assigning a CSH marker and/or b) setting a new marker of type "Topic Alias" and typing the ID. I used only numeric IDs like "2000" or "4200",
- I created a .h file (projectname.h) - based on the format of the file projectname_!Generated!.h (I read this in some instructions). So the .h file (text file) looks like this:
#define 2000 2000 /* 4 Anwendungsoberfläche */
#define 2022 2022 /* 4.1.1 Menü Datei */
#define 2030 2030 /* 4.1.3 Menü Parametersatz */
#define 2180 2180 /* 6.6.7 Objektdialog Q-Regler */
#define 2354 2354 /* 6.9.2 Objektdialog Extran Parameter */
#define 2560 2560 /* 6.9.5 Objektdialog Extran2D Parametersatz */
- I published the Microsoft HTML Help. A projectname_!Generated!.h has been created. My IDs were not used in this file:
#define 2000 1
#define 2022 2
#define 2030 3
#define 2180 4
#define 2354 5
#define 2560 6
- When I open the .chm file and look in the source code, the ID even is totally different. It is not the one, I assigned in FM, it is not the one which I assigned in the projectname.h file and it even is not the one, which was put in the projectname_!Generated!.h file. It is a generated name starting with CSH_1 ...n in a consecutive way numbered.
Example:
<p class="FM_Heading1"><a name="XREF_72066_13_Glossar"></a>Gloss<a name="CSH_1"></a>ar</p>
What goes wrong? Why does FM not take my assigned IDs? I need to use these IDs since our programmers are using those already - I had to re-create the whole online help but the programs stay untouched.
Please help!
Many thanks
MohiHi Jeff,
thanks for your note!
The text in my marker is just a number like "2000" or "4200". As said, I created manually a my.h file and used this marker there. E.g.
#define 2000 2000.
Whereby the first 2000 (in my opinion) is the marker text and the second 2000 is the context ID which the programmers are using for the context sensitive call of the help. My definitions in the my.h file were translated to #define 2000 1 (in the my_!Generated!.h file). The source code "translates" the context ID into CSH_8.
I am still confused :-/
Thanks
Mohi -
Need help with Boot Camp and Win 7
I have iMac 27" (iMac11,1) 2.8 GHz, quad core, 8MB of L3, 8GB of Memory, Boot ROM Version IM111.0034.B02 and SMC Version 1.54f36 and can't get this machine to run Windows 7 using Boot Camp. I have successfully loaded Win 7 but when it claims to be starting I only get a black screen after initial start up.
I have checked and rechecked my software updates and have read and reread the instructions, however, I can't update my Boot Camp to 3.1 (my machine says i'm running 3.0.4) and I need 3.1 but can't load 3.1 because it is an exe file that has to be loaded into Windows after I load Windows but can't open Windows because I can't load Boot Camp 3.1. That's my excuse anyway, so I'm missing something I just can't figure out what it is....this is where you come in!
Thanks.
MikeMike,
I'm not going to be much help with Boot Camp however I can direct you to the Boot Camp forum where there are more people that know how to troubleshoot it and Windoze 7. You can find it at:
https://discussions.apple.com/community/windows_software/boot_camp
Roger
Maybe you are looking for
-
Unable to Change Main Report Page Orientation in Crystal 10
Hi, My report has 8 sub reports and every sub report is placed in a report footer section. When I change the page orientation from portrait to landscape, no change in main report. but It does change the sub report paper orientation. Is it because of
-
Hi, The below code is in sql server Can some one plzzzzz....help me do the same in ORACLE BEGIN IF @str_UG_Flag = 'I' BEGIN IF NOT EXISTS (SELECT 'X' FROM EMA_SCM_GEN_UOM_Group WHERE EMA_SCM_GEN_UG_Code = @int_UG_CODE) BEGIN INSERT INTO EMA_SCM_GEN_U
-
DBMS_OUTPUT.PUT_LINE not working in Stored Functions
Hi All, I have one doubt, why is dbms_output.put_line not supported in Stored Functions? create or replace function func_in_sql(var number) return varchar2 is begin If var is not null then return to_char(dbms_output.put_line(var)); else return to_cha
-
Wifi and bluetooth seem as if they are disabled
Ive tried resetting phone. should i try connecting it to a computer?
-
Hi I want to know, 1. System requirement for VM based Sharepoint 2013 development environment for minimum 3 user's 2. SharePoint Topologies based on system architecture,system requirements 3. General SharePoint Development env