SQL Exception: General Error - Help Needed

Hi,
I am getting an error at QuerySales.executeUpdate() statement in the following code.
I never had this kind of problem with other examples using executeUpdate statement. I even checked with "addBatch" but got the same error. Please help me if you know anything.
Thanks,
Ravi
PreparedStatement QuerySales;
insertString= "insert into TestNoName values (?, ?)";
String query2 = "SELECT Number, Name FROM TestNoName";
Statement stmt;
try {
con = DriverManager.getConnection(url,"","");
System.out.println("Successfully Connected to Database");
stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
QuerySales = con.prepareStatement(insertString, ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
ResultSet rs2 = stmt.executeQuery(query2);
for (int i=0; i<=10; i++)
rs2.last();
int count = rs2.getRow();
System.out.println(count);
if (count == 0)
lNumber = 1;
else {
lNumber = rs2.getInt("Number");
lNumber++;
QuerySales.setInt(1,lNumber);
QuerySales.setString(2,"Ravi");
QuerySales.executeUpdate();
System.out.println("Hi");
System.out.println("Exececuted SQL Statement- Inserted One Record");
System.out.println("Fields of TestNoName");
int count1=0;
ResultSet rs3 = stmt.executeQuery(query2);
//rs2.beforeFirst();
while (rs3.next()) {
count1++;
int n = rs3.getInt("Number");
String Name1 = rs3.getString("Name");
System.out.println(n + " " + Name1);
System.out.println(count1);
stmt.close();
con.close();
} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
}

I found the reason for error. I declared the result set object within the for loop. Now it is working fine.
Ravi

Similar Messages

  • Sql Exception :general error

    Dear friends,
    Here I have mysterious problem connection and operating with Oracle thru bridge drivers.
    That is , I have class JDBCManager which takes care of executing Sql statements like selection , insertion and updating. Another class named Server which contains JDBCManager as static member so that any class can all the member function. The Actual problem is that after executing certain number of queries I need to face "SQLException as General error". So please tell how to get rid of this error.
    JDBCManager establishes new Statement for every query body of one method is defined as follows
    public ResultSet niceQuery(String query)
    ResultSet result;
    try
    //Enumeration keys=connections.keys();
    System.out.println(query);
    Statement stmt=connection.createStatement();
    result=stmt.executeQuery(query);
    //stmt.close();
    return(result);
    catch(SQLException se)
    System.out.println("Sorry i can not");
    System.out.println(se);
    return(null);
    null

    You can try with 3rd type drivers. Which i have used in connecting my code to My SQL. as below:
    jdbc:mysql://192.9.200.20:3306/dbname","username","password"
    Try to find informix's third party drivers if available. Happy coding :)

  • Java.sql.SQLException: General error

    Hi i got this error message:
    java.sql.SQLException: General error
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(Unknown Source)
    at PersonFrame.actionPerformed(PersonFrame.java:1155)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknow
    n Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour
    ce)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    my code is:
    while (rs.next())
    String recnumber = rs.getString("Person_ Record_ Number");
    int reccc=Integer.parseInt(recnumber);
    if (Integer.parseInt(FamilyTree.rowselected)==reccc && AddPersonn!=0)
    System.out.println ("record in table "+reccc);
    System.out.println ("record selected "+FamilyTree.rowselected);
    str.executeUpdate("INSERT INTO Person " +
    "VALUES ('"+nameofperson.getText()+"','"+SurnameOfPersonTxt.getText()+"','"+Bday+"','EMPTY','"+DateOfDeathTogether+"','EMPTY','EMPTY','"+phone+"','"+genre+"','"+Country+"','"+FamilyTree.rowselected+"','"+Nicknametxt.getText()+"','"+Filename+"','"+BioFile+"','"+city+"','"+postal+"','EMPTY','empty','"+TimeOfBirth+"','EMPTY')");
    setVisible(false);
    System.out.println(Filename);
    LINE 1155 that the error message says is line :str.executeUpdate("INSERT INTO Person " +
    <<<PersonFrame.actionPerformed(PersonFrame.java:1155)>>>>>
    also note that i didn't include a try statement here (int reccc=Integer.parseInt(recnumber) because recnumber since is created holds the value 5000 so there is no need
    Also the output.. of
    System.out.println("INSERT INTO Person " + "VALUES ('"+nameofperson.getText()+"','"+SurnameOfPersonTxt.getText()+"','"+Bday+"','EMPTY','"+DateOfDeathTogether+"','"+PlaceOfDeath+"','"+address+"','"+phone+"','"+genre+"','"+Country+"','"+FamilyTree.rowselected+"','"+Nicknametxt.getText()+"','"+Filename+"','"+BioFile+"','"+city+"','"+postal+"','"+Causeofdeath+"','"+PlaceBurried+"','"+TimeOfBirth+"','EMPTY')");
    is:
    INSERT INTO Person VALUES ('fgfgff','dfdgfd','2/1/1988','EMPTY','Person Is Alive','null','EMPTY','EMPTY','Male','EMPTY','0560','dasfds','EMPTY','EMPTY','EMPTY','EMPTY','null','null','EMPTY','EMPTY')
    and my table gets only text values...
    Any Help Will Be Greately Appreciated
    Thanks
    Nick .s

    You cannot do two thing at the same time with the same statement (while your ResultSet is open you are making an insert), try using a separate Statement that the one you used for the query for the insert. If that doesn't work, make a new connection, that will do it.
    If you were using a separate statement then I'm sorry, I couldn't tell from your code. I'd had a similar problem and that's the way I solved it.

  • I am getting Error! java.sql.SQLException:General error

    hi every body,
    I struck with this error , can any one suggest in solving this.
    I had a table in oracledatabase ,i have successfully created a table and inserted clob column with an attachment like xxx.txt.
    table format----> id and text columns
    Now my question is to retrieve that data and store it in local disk i am getting this error
    import java.io.*;
    import java.sql.*;
    //import java.sql.SQLException;
    public class Cread {
    public static void main(String[] args) throws ClassNotFoundException,IOException,SQLException {
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection cn=DriverManager.getConnection("jdbc:odbc:sivadsn","scott","tiger");
    Statement s = cn.createStatement();
    ResultSet rs=s.executeQuery("Select text from ram where id=10");
    if(rs.next()){
    FileOutputStream file=new FileOutputStream("c:/store.txt");
    InputStream fin=rs.getBinaryStream(1);
    int c;
    while((c=fin.read())!=-1){
    file.write(c);
    fin.close();
    s.close();
    rs.close();
    catch(IOException e){
    e.printStackTrace();
    System.out.println("Err:"+e);
    I am getting the error as
    java.sql.SQLException: General error
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(Unknown Source)Error! java.sql.SQLException: General error
    at attach.Clobread.main(Clobread.java:30)

    That usually means something is wrong with the syntax of your sql.
    As a guess 'text' is probably a keyword and shouldn't be used as a field name. It is possible that the same is true for 'id'

  • Statement Exception: General Error

    Hi everybody
    I have a program which interacts with Access database,
    I get this error:
    Statement Exception: General Error
    when I try to execute this part of code,, it used to be working,,
    but I dont know whats going wrong
    any idea???
    String addRec="INSERT INTO Election(Elect_Id, Title, Survay, Start_Time,"+
    "Start_Date, End_Time, End_Date, Owner)VALUES"+ +"("+id+", '"+title+"' , '"+question+"', '"+startTime+"', '"+
    startDate+"', '"+endTime+"', '"+endDate+"', '"+owner+"');";
    stmnt=con.createStatement();
    stmnt.executeUpdate(addRec);

    Are your date/time formats right? I always execute a query with an example of the code I use if it doesn't work out in java. Most of the time it's some stupid type error you looked over.

  • Chapter end action triggers General Error - Help please!

    Hi, I am working on a project and have come to a big problem in the last hurdle, classic! Really need your help, experts!
    I have 2 Timelines, each one with 6 audio tracks and 2 subtitle tracks
    One of the timelines is longer than the other one because it has two different films in it.
    Everything was working fine until I realised I had forgotten to set the end action to the last chapter of the first video in the timeline, I need it to either stop or return to main menu or last menu, otherwise it will go on to play the second film and i don't want this to happen.
    When I set the end action to the chapter 10, it looks fine, I check and no problems.
    But when it starts transcoding... after a bit, when it has transcoded all the languages it goes to prepare to build and I get GENERAL ERROR and it freezes.
    Please please please if somebody can help me it would be very much appreciated.
    Mariana
    ps I have no overrides or anything like that in the whole project

    Please list the Assets on each of the two Timelines with full detail. A screen-cap of each would probably be very useful and save you some typing.
    Some things to also think about is are there any spots where your Audio is longer (even very slightly) than the accompanying Video? Are there any gaps on any of the Timelines? When you added that "End Action," exactly how/where did you add it? Also, if you have any Chapter Playlists, or Playlists, please give details on those.
    Note: to attach the screen-caps, us the little "camera" icon on the editing screen:
    Good luck,
    Hunt

  • PL/SQL error - help needed.

    I have a item which gives me an error message when tring to open a page.
    When field is null (back end) there is no problem but when I input any value I get this error.
    ORA-06550: line 1, column 48: PLS-00201: identifier 'P9_CANC_BY' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored
    Any idea?
    Thanks

    I am using oracle back-end but not build-in apex therefore creating application in apex.oracle.com won't work (I guess, correct me if I am wrong).
    Going back to the error message.
    I have various items like that on form and this is the first one giving me this error. I even deleted it and recreated with different name. Another thing that I would like to point out is that my page contains more than 100 items. Is there a limit of how many items you can create on the page?
    Regards
    Robert

  • Error: ORA-12560 TNS : Protocol Error help need urgently

    HI
    i m working on win 2k adv server
    i installed orcale 8i
    and then i started sql plus
    and entered us id and pass : scott / tiger
    and also tried :system / manager
    but i m having this error
    plz tellme how can i solve it
    Error: ORA-12560 TNS : Protocol Error
    plz do it soon
    Nurali
    03002199037

    You're attempting to go across SQL*Net. I'm a unix guy so I can't help very much except to point this out.
    On Unix I'd either undefine the TWO_TASK environmental variable. Probably a reg entry on 2k.
    Or configure Sql*Net.
    Ken

  • UploadedFile component - af:inputFile to upload blob Errors - help needed

    Hi,
    I am working with JDev, Toplink, and ADF Faces. I am using the af:inputFile component to read in a pdf file which I want to save as a blob into my oracle DB.
    This is the code on the jspx page:
    <af:inputFile label="Label 1"
    binding="#{backing_app_ATBlobs1.inputFile1}"
    valueChangeListener="#{backing_app_ATBlobs1.fileUploaded}"
    id="inputFile1" columns="40"/>
    <af:commandButton text="commandButton 1"
    binding="#{backing_app_ATBlobs1.commandButton1}"
    id="commandButton1"/>
    The following is my code in the backing bean:
    public void fileUploaded(ValueChangeEvent event) {
    UploadedFile file = (UploadedFile)event.getNewValue();
    if (file != null && file.getLength() > 0) {
    FacesContext context = FacesContext.getCurrentInstance();
    FacesMessage message =
    new FacesMessage(JSFUtils.getStringFromBundle("srmain.srfileupload.success") +
    " " + file.getFilename() + " (" +
    file.getLength() + " bytes)");
    context.addMessage(event.getComponent().getClientId(context),
    message);
    FileInputStream fis;
    fis = null;
    try {
    fis = new FileInputStream((File)file);
    catch (FileNotFoundException ex)
    System.out.println("f2: Oops, FileNotFoundException caught");
    finally
    System.out.println("f2: finally block");
    PreparedStatement pstmt =
    cm.getCon().prepareStatement("INSERT INTO BLOBS (BLOB_ID, PROCUR_ID, PF_NUM, DOCUMEN, FILENAME_TXT) " +
    "VALUES ('" + BLOB_SEQUENCE.NEXTVAL + ",1, 2, ?, " + file.getFilename() + ")");
    pstmt.setBinaryStream(1, fis, (int)file.length());
    pstmt.executeUpdate();
    Following are the errors:
    Name cm Not Found
    Method getCon Not Found
    Method prepareStatement Not Found
    Method length() Not Found
    Name BLOB_SEQUENCE.NEXTVAL Not Found, BLOB_ID is sequentially generated.
    Exception Not handled: java.sql.SQLException for these lines:
    pstmt.setBinaryStream(1, fis, (int)file.length());
    pstmt.executeUpdate();
    I am not very sure about coding the values for the insert statement. Any help would be appreciated. Thanks!
    Lin

    Hi,
    I got some of the errors taken care of, but I have some questions.
    Below is my code:
    public void fileUploaded(ValueChangeEvent event) {
    // Add event code here...
    UploadedFile file = (UploadedFile) event.getNewValue();
    if (file != null)
    FacesContext context = FacesContext.getCurrentInstance();
    FacesMessage message = new FacesMessage( "Successfully uploaded file " + file.getFilename() + " (" + file.getLength() + " bytes)");
    context.addMessage(event.getComponent().getClientId(context), message);
    // Here's where we could call file.getInputStream()
    InputStream fis;
    fis = null;
    try {
    fis = file.getInputStream();
    catch (FileNotFoundException ex)
    System.out.println("FileNotFoundException caught");
    } catch (IOException e) {
    // TODO
    System.out.println("IOException caught");
    finally
    System.out.println("finally block");
    try{
    Class.forName("oracle.jdbc.driver.OracleDriver");
    catch (ClassNotFoundException ex) {     
    System.out.println("ClassNotFoundException caught");
    // DriverManager.registerDriver(new OracleDriver());
    try {
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@oradev2.tceq.state.tx.us:1521:sand3", "kding", "kd5469");
    PreparedStatement pstmt =
    conn.prepareStatement("INSERT INTO BLOBS (BLOB_ID, PROCUR_ID, PF_NUM, DOCUMEN, FILENAME_TXT) " +
    "VALUES (?,?,?,?,?)");
    int blob_id;
    blob_id = BLOB_SEQUENCE.NEXTVAL;
    String filename = file.getFilename();
    pstmt.setInt(1, blob_id);
    pstmt.setString(2, "1");
    pstmt.setString(3, "2");
    pstmt.setBinaryStream(4, fis, (int)file.getLength());
    pstmt.setString(5, filename);
    pstmt.executeUpdate();
    catch (SQLException e) {
    // TODO
    System.out.println("SQLException caught");
    I am unable to get the value for the blob_id which is sequentially generated. The error is in this line:
    blob_id = BLOB_SEQUENCE.NEXTVAL;
    Another question:
    Can someone tell me how to display variable in JDeveloper. I tried System.out.println - but I think this is for command line printing?
    Thanks for the assistance.
    Lin

  • AE CS4 Error Help Needed!!

    Hey  I get 3 errors everytime Ii run AE.
    1- failed to create process default activation context
    2- Microsoft C++ Runtime Library Runtime Error!! Error Code R6034 - An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team fow more information.
    3- Microsoft C++ Runtime Library Runtime Error!! Error Code R6030 - CRT not initialized. 
    Please Need Help!!

    83 :: xx are all resource errors, many times related to fonts as listed on my site. The logical conclusion therefore is that you have changed something outside AE, that is added a rubbish font or updated an external component like Quicktime. Still, as the others said, it's miraculous AE runs/ ran at al lon your system and you were actually able to use it.
    Mylenium

  • PHP error help needed

    I've worked through the Adobe tutorial, "Developing a web
    application with
    Dreamweaver"
    http://www.adobe.com/devnet/dreamweaver/articles/develop_web_application.html).
    Everything works fine until I get to the final step of
    testing the Record
    Insert form be submitting data. When I click the Insert
    record button
    instead of going to the View page I get these errors for each
    form field:
    Warning: mysql_real_escape_string()
    [function.mysql-real-escape-string]:
    Access denied for user 'ODBC'@'localhost' (using password:
    NO) in
    F:\Webs\cafe_php\TMPh4f4n13a5b.php on line 8
    Warning: mysql_real_escape_string()
    [function.mysql-real-escape-string]: A
    link to the server could not be established in
    F:\Webs\cafe_php\TMPh4f4n13a5b.php on line 8
    The warnings appear on the form page above the page itself.
    When I connected the database to the site the test worked.
    Here are the first 8 lines of code:
    <?php require_once('Connections/connTownsend.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType,
    $theDefinedValue = "",
    $theNotDefinedValue = "")
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue)
    : $theValue;
    $theValue = function_exists("mysql_real_escape_string") ?
    mysql_real_escape_string($theValue) :
    mysql_escape_string($theValue);
    Any suggestions?
    Walt

    First, thanks for helping.
    2nd, sorry to be so thick, this is all still Greek to me, but
    I have no idea
    where to insert
    with a die($rsInsert_query):
    Here is all the PHP code above the DOCTYPE:
    <?php require_once('Connections/connTownsend.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType,
    $theDefinedValue = "",
    $theNotDefinedValue = "")
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue)
    : $theValue;
    $theValue = function_exists("mysql_real_escape_string") ?
    mysql_real_escape_string($theValue) :
    mysql_escape_string($theValue);
    switch ($theType) {
    case "text":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    break;
    case "long":
    case "int":
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
    break;
    case "double":
    $theValue = ($theValue != "") ? "'" . doubleval($theValue) .
    "NULL";
    break;
    case "date":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    break;
    case "defined":
    $theValue = ($theValue != "") ? $theDefinedValue :
    $theNotDefinedValue;
    break;
    return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
    $editFormAction .= "?" .
    htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) &&
    ($_POST["MM_insert"] == "form1")) {
    $insertSQL = sprintf("INSERT INTO comments (FIRST_NAME,
    LAST_NAME) VALUES
    (%s, %s)",
    GetSQLValueString($_POST['FIRST_NAME'], "text"),
    GetSQLValueString($_POST['LAST_NAME'], "text"));
    mysql_select_db($database_connTownsend, $connTownsend);
    $Result1 = mysql_query($insertSQL, $connTownsend) or
    die(mysql_error());
    ?>
    Walt
    "Murray *ACE*" <[email protected]> wrote
    in message
    news:[email protected]...
    > Walt - this is a good puzzle.
    >
    > All of your observations suggest that you have adequate
    permissions, yet,
    > this error says you don't -
    >
    >> Warning: mysql_real_escape_string()
    [function.mysql-real-escape-string]:
    >> A link to the server could not be established in
    >> F:\Webs\GoFreeFuel\TMP4r8sq1dpfl.php on line 8
    >
    > Let's take a look at your insert command - can you trap
    the insert process
    > with a die($rsInsert_query) command, right before the
    actually execution?
    >
    > --
    > Murray --- ICQ 71997575
    > Adobe Community Expert
    > (If you *MUST* email me, don't LAUGH when you do so!)
    > ==================
    >
    http://www.dreamweavermx-templates.com
    - Template Triage!
    >
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    > ==================
    >
    >
    > "Walt F. Schaefer" <[email protected]> wrote
    in message
    > news:[email protected]...
    >> Murray,
    >>
    >> Here's an Update/Summary:
    >>
    >> 1. I have a MySQL database (localhost) I can see and
    manipulate via
    >> Navicat
    >> 2. In my site (in DW) I created a connection to that
    database. It tested
    >> successfully.
    >> 3. I created a recordset using that database. It
    tested successfully.
    >> 4. On a new page Insert > Application Objects
    > Insert Record > Record
    >> Insertion Form Wizard.
    >> 5. Save page and preview locally in IE6.
    >> 6. Input info in form and click Insert record.
    >> 7. Record IS added to table but every field is Null.
    >> 8. Errors for each form field:
    >> Warning: mysql_real_escape_string()
    [function.mysql-real-escape-string]:
    >> Access denied for user 'ODBC'@'localhost' (using
    password: NO) in
    >> F:\Webs\GoFreeFuel\TMP4r8sq1dpfl.php on line 8
    >>
    >> Warning: mysql_real_escape_string()
    [function.mysql-real-escape-string]:
    >> A link to the server could not be established in
    >> F:\Webs\GoFreeFuel\TMP4r8sq1dpfl.php on line 8
    >>
    >> As I can read from the database/table and the Insert
    record form DOES ADD
    >> a record it would seem I am connected to the db just
    unable to add data.
    >>
    >> What have I done wrong?
    >>
    >> Thanks.
    >> --
    >>
    >> Walt
    >>
    >>
    >> "Murray *ACE*"
    <[email protected]> wrote in message
    >> news:[email protected]...
    >>> OK - I think we will have to solve your database
    connectivity issues
    >>> first. What does your Connections file look
    like?
    >>>
    >>> --
    >>> Murray --- ICQ 71997575
    >>> Adobe Community Expert
    >>> (If you *MUST* email me, don't LAUGH when you do
    so!)
    >>> ==================
    >>>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >>> ==================
    >>>
    >>>
    >>> "Walt F. Schaefer" <[email protected]>
    wrote in message
    >>> news:[email protected]...
    >>>>> LOL - you are interpreting my code MUCH
    too literally. Change this -
    >>>> It's only because I don't have a clue. Hence
    the need to use this
    >>>> beginner's tutorial.
    >>>>
    >>>> I replaced to code as instructed. No
    improvement. Error messages:
    >>>>
    >>>> Warning: mysql_real_escape_string()
    >>>> [function.mysql-real-escape-string]: Access
    denied for user
    >>>> 'ODBC'@'localhost' (using password: NO) in
    >>>> F:\Webs\cafe_php\TMPgayzl14jqr.php on line 8
    >>>>
    >>>> Warning: mysql_real_escape_string()
    >>>> [function.mysql-real-escape-string]: A link
    to the server could not be
    >>>> established in
    F:\Webs\cafe_php\TMPgayzl14jqr.php on line 8
    >>>>
    >>>> Warning: mysql_real_escape_string()
    >>>> [function.mysql-real-escape-string]: Access
    denied for user
    >>>> 'ODBC'@'localhost' (using password: NO) in
    >>>> F:\Webs\cafe_php\TMPgayzl14jqr.php on line 8
    >>>>
    >>>> Warning: mysql_real_escape_string()
    >>>> [function.mysql-real-escape-string]: A link
    to the server could not be
    >>>> established in
    F:\Webs\cafe_php\TMPgayzl14jqr.php on line 8
    >>>> INSERT INTO comments (FIRST_NAME, LAST_NAME)
    VALUES (NULL, NULL)
    >>>> --
    >>>>
    >>>> Walt
    >>>>
    >>>>
    >>>> "Murray *ACE*"
    <[email protected]> wrote in message
    >>>> news:[email protected]...
    >>>>> LOL - you are interpreting my code MUCH
    too literally. Change this -
    >>>>>
    >>>>> $insertSQL = sprintf("INSERT INTO
    comments (FIRST_NAME, LAST_NAME)
    >>>>> VALUES
    >>>>> (%s, %s)",
    >>>>> GetSQLValueString($_POST['FIRST_NAME'],
    "text"),
    >>>>> GetSQLValueString($_POST['LAST_NAME'],
    "text"));
    >>>>> $insert_rsEmails = sprintf("INSERT INTO
    tblcontactdata SET emailValue
    >>>>> =
    >>>>> %s", GetSQLValueString($filter_rsEmails,
    "text"));
    >>>>> die($insert_rsEmails);
    >>>>> $rsEmails =
    mysql_query($insert_rsEmails, $selectData) or
    >>>>> die(mysql_error()); // insert this email
    into the database
    >>>>>
    >>>>> mysql_select_db($database_connTownsend,
    $connTownsend);
    >>>>>
    >>>>> to this -
    >>>>>
    >>>>> $insertSQL = sprintf("INSERT INTO
    comments (FIRST_NAME, LAST_NAME)
    >>>>> VALUES
    >>>>> (%s, %s)",
    >>>>> GetSQLValueString($_POST['FIRST_NAME'],
    "text"),
    >>>>> GetSQLValueString($_POST['LAST_NAME'],
    "text"));
    >>>>> die($insertSQL);
    >>>>>
    >>>>> mysql_select_db($database_connTownsend,
    $connTownsend);
    >>>>>
    >>>>>
    >>>>> --
    >>>>> Murray --- ICQ 71997575
    >>>>> Adobe Community Expert
    >>>>> (If you *MUST* email me, don't LAUGH
    when you do so!)
    >>>>> ==================
    >>>>>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>>>>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >>>>> ==================
    >>>>>
    >>>>>
    >>>>> "Walt F. Schaefer"
    <[email protected]> wrote in message
    >>>>>
    news:[email protected]...
    >>>>>> Murray,
    >>>>>>
    >>>>>> Here's all the PHP code that
    precedes the DOCTYPE *after* inserting
    >>>>>> the code you provided:
    >>>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>
    >>
    >

  • NotSerializable exception!! help neede

    I am getting the following exception when I am trying to use the function writeObject(). I don't know where I am using sun.java2D.SunGraphics2D
    java.io.NotSerializableException: sun.java2d.SunGraphics2D
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java
    :1330)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:13
    02)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.jav
    a:1245)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1224)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1050)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java
    :1330)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:13
    02)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.jav
    a:1245)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
    at FileListener.actionPerformed(FileListener.java:44)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:17
    64)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
    ctButton.java:1817)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:419)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257
    at javax.swing.AbstractButton.doClick(AbstractButton.java:289)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1
    109)
    at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseRelease
    d(BasicMenuItemUI.java:943)
    at java.awt.Component.processMouseEvent(Component.java:5093)
    at java.awt.Component.processEvent(Component.java:4890)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
    at java.awt.Container.dispatchEventImpl(Container.java:1609)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:197)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

    The problem is in your FileListener class, on line 44. The part of the error message that tells me this is:
    at FileListener.actionPerformed(FileListener.java:44)
    I assume that line attempts to writeObject on an ObjectOutputStream.
    I don't know what object you are writing, so it's difficult to help you beyond what I have written above. The Object you are writing has a field which is an array, and the array has an element which is an object which contains a sun.java2D.SunGraphics2D.
    Can you let me see the source code?
    Yours, Mike H...

  • Log4j Error - Help needed

    Hi All,
    I am getting this following stack trace when i execute a test on an application on the remote server from the client. THe stack trace is as follows. It says error in the java.lang.NoClassDefFoundError: org/apache/log4j/Layout.... Thanks in advance...
    <24-May-2006 11:50:45 o'clock BST> <Info> <WebLogicServer> <BEA-000213> <Adding address: 10.38.86.71 to licensed client list>
    274.593: [GC 274.594: [DefNew: 15999K->448K(16448K), 0.1619128 secs] 95096K->79829K(148280K), 0.1620925 secs]
    [Pool] : Returning bean from the pool: 'null'
    [StatelessSessionPool] : allocate new: 'com.ba.cap.customer.enrolmentmanager.utilization.ULEnrolmentManagerBean_nnzhyo_Impl@48563c'
    Inside the ULEnrolmentManagerBean ********************* enrolBARegisteredCustomer
    com.ba.cap.framework.corebusiness.utilities.Profiling: capprofiling library loaded
    Inside the ULEnrolmentManagerBean --------------- 1
    <24-May-2006 11:50:50 o'clock BST> <Info> <EJB> <BEA-010051> <EJB Exception occurred during invocation from home: com.ba.cap.customer.enrolmentmanager.utilization.ULEnrolmentManagerBean_nnzhyo_HomeImpl@bb120d threw exception: java.lang.NoClassDefFoundError: org/apache/log4j/Layout
    java.lang.NoClassDefFoundError: org/apache/log4j/Layout
    at com.ba.cap.customer.enrolmentmanager.utilization.ULEnrolmentManagerBean.log(ULEnrolmentManagerBean.java:910)
    at com.ba.cap.customer.enrolmentmanager.utilization.ULEnrolmentManagerBean.enrolBARegisteredCustomer(ULEnrolmentManagerBean.java:187)
    at com.ba.cap.customer.enrolmentmanager.utilization.ULEnrolmentManagerBean_nnzhyo_EOImpl.enrolBARegisteredCustomer(ULEnrolmentManagerBean_nnzhyo_EOImpl.java:424)
    at com.ba.cap.customer.enrolmentmanager.utilization.ULEnrolmentManagerBean_nnzhyo_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:492)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:435)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:430)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    >
    [StatelessSessionPool] : Destroying a bean in: 'weblogic.ejb20.pool.StatelessSessionPool@1924ee5 - ejb name: 'com.ba.cap.customer.enrolmentmanager.utilization.ULEnrolmentManagerHome''

    Hi Murali,
    Sorry for the delay!
    Based on the error message, I found this Microsoft KB article which is talking about the similar problem. It has also given some resolution in it. I think you could try it first.
    http://support.microsoft.com/kb/269495
    By the way, this forum is for Excel development questions. If you run into some problems when you manually manipulate the Excel workbook without code,
    Office IT Pro forum is a better place for you.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Eclipse error | Help needed badly

    Hi,
    My Eclipse was working properly a couple of days back but suddenly It's stopped working and gives me an error : "workspace does not contain a main type,Do you have a public void run method"
    Now,I think the problem Is some how the jar's that I'm trying to upload aren't getting uploaded.
    I say this because a strange problem has arised and I think this might have to do with Eclipse giving the above error.
    This Is what I do to create a new java project
    -Open eclipse
    -save files to workspace
    -click on new > java project
    -Then,give the project a name and then click finish
    -after that I create a new class by right clicking on the project folder > new > class >give the class a name and then click finish.
    -after that I open workspace(thats on my desktop) click on the project folder make a new folder name It "lib" and upload the jar that I need for the project.
    -after this I go back Into eclipse and right click on the project folder and hit refresh,now I see the folder"lib" containing the jar Inside It.
    -I right click on the jar file and select "add to build path",and now theres the Issue comes In.
    I want the jar to Into the reference librarys,because the last time I got the jar In the reference library It worked.
    But this time I can't even manage to find where the reference library Is.
    so when I click on add to build path the jar Instead of appearing in the reference library (which Isn't there) just dissapears.
    I really need to fix this,because I cant test and write code until Its fixed.
    heres a snapshot of how my eclipse framework looks : [http://www.flickr.com/photos/38561743@N03/4122304046/sizes/o/]
    I tried to solve this on my own for hours and hours but It just Isn't working.
    please guys help,I need to solve this.
    Thanks,
    Edited by: Parastar on Nov 21, 2009 7:26 AM
    Edited by: Parastar on Nov 21, 2009 7:27 AM

    Parastar wrote:
    okay guys,I'v tried the eclipse forums for about 24 hours now.
    but no response,those guys are really really slow.
    please,some one here help me out.Quit begging. You've already been told this is not the place for this question. You're complaining about not getting an answer there, and begging people here to answer, as if that vindicates your decision to post here in the first place. But you haven't gotten your solution here either. Which is worse--no answer there, or a bunch of answers that don't help you here?

  • OGG error, help needed

    Hi I am trying to check the conflict resolution on my active-active bi-directional OGG, when i am trying to set the parameters in replicat file i am getting this error:
    2011-08-17 18:09:59 GGS ERROR 182 OCI Error describe for query lookup (bad syntax) (status = 911-ORA-00911: invalid character), SQL<select count(*) conflict from TEST where t_id = ? and t_timestamp > ?>.
    My replicate file for that table:
    MAP TEST_MODEL.TEST, TARGET TEST_MODEL.TEST, &
    REPERROR (21000, DISCARD), &
    SQLEXEC (ID lookup, ON UPDATE, &
    QUERY "select count(*) conflict from TEST where t_id = ? and &
    t_timestamp > ?", &
    PARAMS (p1 = t_id, p2 = t_timestamp), BEFOREFILTER, ERROR REPORT, &
    TRACE ALL),&
    FILTER (lookup.conflict = 0, ON UPDATE, RAISEERROR 21000);
    MAP TEST_MODEL.TEST #exception_handler()
    Gurus can anybody tell me what could be the error? I have used it according to the documentation;
    Oracle admin guide, Page 97
    Thanks in advance

    Yes it is working fine steven, thanks
    But my question is, if you remember or not, i want to use same strategy for conflict resolution in active-active bi-directional OGG setup which are on two different time zone
    Datacenter(DC) 1 on PST & DC2 on EST, is there any ways i can change this query to match the records? i mean
    DC1(PST) ----> "using this in replicat parameter from target to source, i mean data coming from EST to PST"
    MAP resolved (entry ISAAC_MODEL_BEA2.ECODBPARAM):
    MAP ISAAC_MODEL_BEA2.ECODBPARAM, TARGET ISAAC_MODEL_BEA2.ECODBPARAM, REPERROR (21000, DISCARD), SQLEXEC (ID lookup, ON UPDA
    TE, QUERY "select count(*) conflict from ISAAC_MODEL_BEA2.ECODBPARAM where id = :p1 and lastmodifieddate-180/1440 > :p2", PAR
    AMS (p1 = id, p2 = lastmodifieddate), BEFOREFILTER, ERROR REPORT, TRACE ALL),FILTER (lookup.conflict = 0, ON UPDATE, RAISEERR
    OR 21000)
    DC2(EST) ----> "using this in replicat parameter from source to target, i mean data coming from PST to EST"
    MAP resolved (entry ISAAC_MODEL_BEA2.ECODBPARAM):
    MAP ISAAC_MODEL_BEA2.ECODBPARAM, TARGET ISAAC_MODEL_BEA2.ECODBPARAM, REPERROR (21000, DISCARD), SQLEXEC (ID lookup, ON UPDA
    TE, QUERY "select count(*) conflict from ISAAC_MODEL_BEA2.ECODBPARAM where id = :p1 and lastmodifieddate+180/1440 > :p2", PAR
    AMS (p1 = id, p2 = lastmodifieddate), BEFOREFILTER, ERROR REPORT, TRACE ALL),FILTER (lookup.conflict = 0, ON UPDATE, RAISEERR
    OR 21000);
    by adding 3hr's to the comparision function and do the conflict resolve?
    Please do comment on this. Thanks a lot for your help.

Maybe you are looking for