Strange Error: Junk value getting inserted into StringBuffer

Hello everyone,
I have a method trying to send mails using SMTP server. This method calls the class 'EMail". In the constructor call, out of the many parameters, subject (StringBuffer) is one of them. If in the constructor call, if I pass the subject say like the one mentioned below:
StringBuffer subject=new StringBuffer("Vijay is a gud boy");
EMail email=new EMail(..,..,..,subject,...);
System.out.println("subject="+subject.toString());
email.send();
The subject gets printed very finely through the Sysout statement .
But when I get the mail, the subject of that mail is seen to be distorted.
For e.g: in the case of this particular subject: Vijayis a gud boy
If subject=" DUE OUT OF REVIEW" , it comes as "DUE OUT OF REVIEW".
Any idea, why this distortion?
Please pour in your suggestions.
Thanks in advance,
Ranjith

Hello,
PFB the code for EMail class:
import java.util.*;
import javax.mail.*;
import javax.mail.internet.MimeMessage;
public class EMail
    private String _smtpHost;
    private StringBuffer _subject;
    private StringBuffer _body;
    private Collection _recipients;
    private String _fromAddress ;
    private String _fromName ;
     *Construct an email access object
    public EMail()
        _recipients = new ArrayList(20);
     *Construct an email access object
     *@param host The smtp host
    public EMail( String host )
         this();
         System.out.println("in constructor");
        setSMTPHost( host ) ;
        System.out.println("host is set");
     *Construct an email access object
     *@param host The smtp host.
     *param recipients A list of recipients.
     *@param subject The subject of the email.
     *@param body The message body.
    public EMail( String host, Collection recipients, StringBuffer subject, StringBuffer body )
        setSMTPHost( host ) ;
        setSubject( subject ) ;
        setBody( body ) ;
        setRecipients( recipients ) ;
     *Construct an email access object
     *@param host The smtp host.
     *param recipients A list of recipients.
     *@param subject The subject of the email.
     *@param body The message body.
    public EMail( String host, Collection recipients, StringBuffer subject, StringBuffer body, String fromAddr, String fromName )
         //System.out.println("inside email constructor");
        setSMTPHost( host ) ;
        //System.out.println("host is set");
        setSubject( subject ) ;
        //System.out.println("subject is set");
        setBody(  body ) ;
        //System.out.println("body is set");
        setRecipients( recipients ) ;
        setFrom( fromAddr, fromName );
        //System.out.println("from address set");
     * Set the email smtp host.
     *@param host the SMTP server.
    public void setSMTPHost( String host )
        _smtpHost = host ;
     * Set the email subject.
     *@param subject The email subject.
    public void setSubject( StringBuffer subject )
        _subject = subject ;
     * Set the email message body.
     *@param body The email body.
    public void setBody( StringBuffer body )
        _body = body ;
     * Set the email from info.
     *@param body The email body.
    public void setFrom( String addr, String name )
        _fromAddress = addr ;
        _fromName = name ;
     * Add an emil recipient.
     *@param recipient The recipient to add.
    public void setRecipient( String recipient )
        _recipients.clear();
        try
            _recipients.add( new javax.mail.internet.InternetAddress( recipient ) );
        catch ( javax.mail.internet.AddressException AE )
     * Set the email recipient list.
     *@param recipients The email recipients list.
    public void setRecipients( Collection recipients )
        if( _recipients == null )
            _recipients = new ArrayList( recipients.size() );
        else
            _recipients.clear();
        Iterator it = recipients.iterator();
        try
            while( it.hasNext() )
                _recipients.add( new javax.mail.internet.InternetAddress( (String)it.next() ) );
        catch (javax.mail.internet.AddressException AE)
     *Send the current email.
    public void send()
        log ("EMail::send()" );
        try
            // set the smtp properties file
            Properties sysProps = System.getProperties();
            sysProps.put( "mail.smtp.host", _smtpHost );
            javax.mail.Session session = javax.mail.Session.getInstance( sysProps, null );
            javax.mail.internet.MimeMessage mm = new javax.mail.internet.MimeMessage( session );
            // set the from
            mm.setFrom( new javax.mail.internet.InternetAddress( _fromAddress, _fromName ) );
            //CLog.debug( "EMail::send() Num of recipients["+ _recipients.size()+"]" );
            if ( _recipients.size() > 0 )
                Iterator it = _recipients.iterator();
                while ( it.hasNext() )
                    javax.mail.internet.InternetAddress ia = (javax.mail.internet.InternetAddress) it.next() ;
                    mm.addRecipient( Message.RecipientType.TO, (ia) ) ;
                    ////CLog.debug( "EMail::send() Recipient["+ia.getAddress() + "]" );
                String sub1=_subject.toString();
                mm.setSubject( sub1 );
                mm.setContent( _body.toString(), "text/html" );
                javax.mail.Transport transport = session.getTransport( "smtp" );
                transport.send( mm );
        catch (javax.mail.internet.AddressException AE)
            ////CLog.error("EMail::send()",AE);
            log(" Error: " + AE.getMessage() );
        catch (javax.mail.NoSuchProviderException NSPE)
            ////CLog.error("EMail::send()",NSPE);
        catch (javax.mail.MessagingException ME)
            //CLog.error("EMail::send()",ME);
            log(" Error: " + ME.getMessage() );
        catch (Exception EX)
            //CLog.error("EMail::send()",EX);
            log(" Error: " + EX.getMessage() );
    }Hope this helps.
Thanks in advance,
Ranjith

Similar Messages

  • NULL values are inserted into interface table for read only columns

    Hi, I developed a custom Integrator where some of the columns has to be displayed as read only in the layout. I am using SQL content to populate the data. When I upload the data NULL values are inserted into table interface? Is there any work around for this?
    Thanks
    Edited by: user593879 on Jan 12, 2010 7:21 PM

    Doesn't WebADI drive you insane at times?
    I must say, when it's all working it looks great and it is very user friendly (end-user that is, NOT for developers!) but before you get to that stage… please please Oracle invest some time making Web ADI a bit more logical an coherent, get the obvious bugs out, please let us not have to update BNE tables anymore to get things done.
    Anyway, I sorted this one out by setting the Width to zero (0) in the Layout. HTH.

  • ORA-00604 error when trying to insert into a XMLTYPE stored as BINARY

    Hi. Here's the scenario.
    Here's my Oracle version:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    The database is encoded as AL32UTF8.
    First I create the table...
    create table binary_table (the_field XMLTYPE) XMLTYPE COLUMN the_field STORE AS BINARY XML;
    Now I try and do an insert like this...
    insert into binary_table values (xmltype('<?xml version="1.0" encoding="AL32UTF8"?>' || chr(10) || '&lt;a&gt;b&lt;/a&gt;' || chr(10)));
    and I get this error:
    SQLState: 60000
    ErrorCode: 604
    Position: 122
    Error: ORA-00604: error occurred at recursive SQL level 1
    ORA-00942: table or view does not exist
    If I create the table with a CLOB storage option for the XMLTYPE, the insert works fine. If I repeat these steps in another database instance, same Oracle version, that's encoded as WE8ISO8859P1, it also works fine. It behaves the same in several clients. I also tried it with several different values for NLS_LANG and that didn't help.
    I do want to say that this database instance has just been set up especially for me so I can do some R&D on AL32UTF8 and XMLTYPE to see if it fits our needs. So it might be a problem with the database instance.
    Thanks for taking a look at this.
    Ralph
    Edited by: stryder100 on Jul 24, 2009 12:11 PM

    Hi,
    Use this
    Load data
    append Into TABLE HS_HRMIG_EMP_PER_20MAR07 fields terminated by "," optionally enclosed by '"'
    TRAILING NULLCOLS.
    Here optional enclosed by is for doubles quotes which should needs to place in single quotes.
    like '"'.
    try with this.
    --Basava.S                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Using default values in INSERT INTO..SELECT..

    Hi,
    I like to do following insert in Oracle 10g
    INSERT
    INTO tab1
    x1,
    x2
    SELECT
    NVL(y1,DEFAULT),
    y2
    FROM tab2
    but oracle throws missing expression error. I don't want to substitute default values as it involves code change for any default value change. I suppose Oracle changes context to tab2 while SELECT, but is there any way to accomplishing the above INSERT?
    Edited by: ponn_raj on Jan 14, 2009 4:52 AM

    Hi,
    Welcome to the forum!
    DECLARE
      var number;
    BEGIN
        INSERT INTO test
            (col1,
             col2)
        VALUES
            (1,
             NVL(var, 0));
        COMMIT;
    END;
    /Also you can create the table and assign default values to the columns that you want. See [CREATE TABLE|http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm#i2095331].
    From the link above:
    DEFAULT
    The DEFAULT clause lets you specify a value to be assigned to the column if a subsequent INSERT statement omits a value for the column. The datatype of the expression must match the datatype of the column. The column must also be long enough to hold this expression.
    The DEFAULT expression can include any SQL function as long as the function does not return a literal argument, a column reference, or a nested function invocation.
    Regards,
    Edited by: Walter Fernández on Jan 14, 2009 10:44 AM

  • Split one column  value and insert into multiple columns

    hi
    am new to plsql .
    i want to split a characters from one column and insert into multiple columns
    i tried used substr function the symbol ',' vary his place dynamically ,so i can't apply substr function.
    for eg:  before split
    col1 :
    col2 :
    col3 :
    col4 :
    colu5: adsdf,fgrty,erfth,oiunth,okujt
    after split
    col1 :adsd
    col2 :fgrty
    col3 :erfth
    col4 :oiunth
    col5 : adsdf,fgrty,erfth,oiunth,okujt
    can anyone help me
    thanks
    Edited by: 800324 on Dec 23, 2010 8:28 AM
    Edited by: 800324 on Dec 23, 2010 8:36 AM

    How about:
    SQL> create table t
      2  (col1 varchar2(30)
      3  ,col2 varchar2(30)
      4  ,col3 varchar2(30)
      5  ,col4 varchar2(30)
      6  ,col5 varchar2(30)
      7  );
    Table created.
    SQL> insert into t (col5) values ('adsdf,fgrty,erfth,oiunth,okujt');
    1 row created.
    SQL> insert into t (col5) values ('x,y');
    1 row created.
    SQL> insert into t (col5) values ('a,b,c,d');
    1 row created.
    SQL> select * from t;
    COL1                           COL2                           COL3                           COL4                           COL5
                                                                                                                                adsdf,fgrty,erfth,oiunth,okujt
                                                                                                                                x,y
                                                                                                                                a,b,c,d
    3 rows selected.
    SQL>
    SQL> merge into t a
      2  using ( with t1 as ( select col5||',' col5
      3                       from   t
      4                     )
      5          select substr(col5, 1, instr(col5, ',', 1, 1)-1) col1
      6          ,      substr(col5, instr(col5, ',', 1, 1)+1, instr(col5, ',', 1, 2)- instr(col5, ',', 1, 1)-1) col2
      7          ,      substr(col5, instr(col5, ',', 1, 2)+1, instr(col5, ',', 1, 3)- instr(col5, ',', 1, 2)-1) col3
      8          ,      substr(col5, instr(col5, ',', 1, 3)+1, instr(col5, ',', 1, 4)- instr(col5, ',', 1, 3)-1) col4
      9          ,      rtrim(col5, ',') col5
    10          from   t1
    11        ) b
    12  on ( a.col5 = b.col5 )
    13  when matched then update set a.col1 = b.col1
    14                             , a.col2 = b.col2
    15                             , a.col3 = b.col3
    16                             , a.col4 = b.col4
    17  when not matched then insert (a.col1) values (null);
    3 rows merged.
    SQL> select * from t;
    COL1                           COL2                           COL3                           COL4                           COL5
    adsdf                          fgrty                          erfth                          oiunth                         adsdf,fgrty,erfth,oiunth,okujt
    x                              y                                                                                            x,y
    a                              b                              c                              d                              a,b,c,d
    3 rows selected.
    SQL> Assuming you're on 9i...

  • Data not getting inserted into table Hxt_Add_Assign_Info_F

    Hi,
    Can any one tell me as to when data is inserted into the table Hxt_Add_Assign_Info_F.
    Lately this table has not been getting updated.
    Thanks
    Zicky

    Hi Sharath,
    Thanks alot for the info, it seems that data had not been entered for certain employees in that form and hence the problem.
    Even then, I guess it will be a day or 2 before they will be able to see their in/out timings.
    Regards
    Zicky

  • Garbage values getting inserted using Database Adapter

    Hi,
    I am facing a particular problem for an interface in the prod env. The problem is like this...
    The interface pulls record set from database and some records in the set is in "French". But in the output variable of the invoke activity , the payload shows some junk values for those values (e.g Name) in French.
    If anybody has ever encountered such problem, please let me know the solution.
    Waiting for a reply asap...
    Thanks a lot
    P.S

    HI
    Please provide me below details.
    1) had u found junk characters in log file or destination application?
    2) Is integration is between Two database applications? if yes, please check whether NLS_LANG parameters are set properly for the language.
    3) As this was found in production,I guess this issue was not encoutntered while testing.So,please compare the settings/setup done in testing instance and Production instance.
    4) if still cannot fix,please update this thread with type of integration (DB to DB or Db to File or any otheer) and adapter properties.
    Thanks

  • How to insert the Formatted date value and insert into the database

    Hi All,
    I am having requirement of inserting the date value in to the datbase. I'm already getting the value from file as MM-DD-YYYY. Getting exception while transforming the values through the transform activity. I'm using format fate function but it is inserting null value in to the database.
    Any help from anyone would bve appreciated.
    Thanks,
    CH

    Hi,
    your input date format is fixed right? So, in the transform you can split each your date, which is in 'MM-DD-YYYY' format ... extract day, month, year.
    After that ... just put these values in order acording to the format of 'xsd:date' data type which is '[-]CCYY-MM-DDZ'.
    XPath function 'xp20:format-dateTime()' works only with 'xsd:dateTime' data type, which has format '[-]CCYY-MM-DDThh:mm:ssZ'.
    So, in your case it could be:
    <xsl:variable name="day" select="substring($inputDate,4,2)"/>
    <xsl:variable name="month" select="substring($inputDate,1,2)"/>
    <xsl:variable name="day" select="substring($inputDate,7,4)"/>
    <xsl:variable name="outputDate">
    <xsl:value-of select="$year"/>
    <xsl:text>-</xsl:text>
    <xsl:value-of select="$month"/>
    <xsl:text>-</xsl:text>
    <xsl:value-of select="$day"/>
    </xsl:variable>
    Regards,
    Martin.

  • Incorrect data value when insert into oracle table

    Would like to ask expert here, how could I insert data into oracle table where the value is 03 ? The case is like that,  the column was defined as varchar2(50) data type, and I have a csv file where the value is 03 but when load into oracle table the value become 3 instead of 03.

    user11432758 wrote:
    Would like to ask expert here, how could I insert data into oracle table where the value is 03 ? The case is like that,  the column was defined as varchar2(50) data type, and I have a csv file where the value is 03 but when load into oracle table the value become 3 instead of 03.
    implicit datatype conversion to NUMBER can result in leading zero to be eliminated.
    How do I ask a question on the forums?
    https://forums.oracle.com/message/9362002#9362002

  • Record not getting inserted into R/3 table.

    Hi Experts,
    I am trying to save some information in R/3 using BAPI. I have written codes like as shown below:
    Code in View
    public void onActionInsertRecord(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionInsertRecord(ServerEvent)
        try {          wdThis.wdGetTimesheetCompController().executeBapi_Catimesheetmgr_Insert_Input();
                   wdThis.wdGetTimesheetCompController().executeBapi_Transaction_Commit_Input();
        } catch (Exception ex)
        {wdComponentAPI.getMessageManager().reportException(ex.getMessage(), false);
        //@@end
    Code in Component Controller
    public void executeBapi_Catimesheetmgr_Insert_Input( )
        //@@begin executeBapi_Catimesheetmgr_Insert_Input()
        IWDMessageManager manager = wdComponentAPI.getMessageManager();
        try
        {   Bapicats1 xx = new Bapicats1();
           xx.setWbs_Element(wdContext.currentWorklistElement().getRec_Wbs());
           xx.setEmployeenumber(wdContext.currentZbapi_Cat_Stech00_Getdetail_InputElement().getEmployeenumber());
           xx.setCatshours(new BigDecimal ("1"));
           xx.setWorkdate(wdContext.currentOutputElement().getDate_From());
           wdContext.currentBapi_Catimesheetmgr_Insert_InputElement().setProfile(wdContext.currentZbapi_Cat_Stech00_Getdetail_InputElement().getProfile());
              wdContext.currentBapi_Catimesheetmgr_Insert_InputElement().modelObject().execute();
              wdContext.nodeOutputnew().invalidate();
        catch(WDDynamicRFCExecuteException e)
          manager.reportException(e.getMessage(), false);
        //@@end
    My records are  not getting saved in R/3 tables. Can you please let me know what is going wrong here. The BAPI input parameters values are correctly getting populated in Component Controller.
    I have also created error message table in View. This error message table is mapped to output of Bapi_Catimesheetmgr_Insert. This table is not getting populated.
    Due to this reason, I believe that the values of input parameters of BAPI are not getting passed to R/3. However, I am not sure where the problem lies. Can you please help me in resolving the issue?
    Regards,
    Brian

    Hi Sumit,
    I am not getting any exception. Using SE37, I can save the transaction. Can you please let me know what is going wrong here.
    Regards,
    Sumit

  • Strange Error when checking a project into repository!

    Hello,
    I have a project that I checked out of repository, and when I try to check it back in I get an error that I have never seen before. It happened when it is going through the files to list for a check in. I get an error msg box that says, " An unexpected error has occurred. Click details for information that may be useful when diagnosing the problem"
    At that pint if I hit cancel it will keep popping up and I have to kill jdev in my task manager. Here are the details in of the error msg:
    Please help =-)
    Brette
    java.lang.NullPointerException
         boolean oracle.jbo.dt.jdevx.deploy.JbdProfileNode.load()
         java.util.Iterator oracle.jbo.dt.jdevx.deploy.JbdProfileNode.getChildren()
         void oracle.ideimpl.scm.impl.ActionController.addSelection(oracle.ide.model.Element, java.util.List, boolean)
         void oracle.ideimpl.scm.impl.ActionController.addSelection(oracle.ide.model.Element, java.util.List, boolean)
         java.util.List oracle.ideimpl.scm.impl.ActionController.buildSelection(oracle.ide.model.Element[], boolean)
         void oracle.ideimpl.scm.impl.ActionController.handleEventImpl(oracle.ide.scm.SCMOperation, oracle.ide.IdeAction, oracle.ide.addin.Context)
         void oracle.ideimpl.scm.impl.ActionController.access$2000071(oracle.ideimpl.scm.impl.ActionController, oracle.ide.scm.SCMOperation, oracle.ide.IdeAction, oracle.ide.addin.Context)
         void oracle.ideimpl.scm.impl.ActionController$1.run()
         void oracle.ideimpl.scm.impl.OperationThread$ThreadRunnable.run()
         void oracle.ideimpl.scm.impl.OperationThread$ThreadRunnable.access$2000071(oracle.ideimpl.scm.impl.OperationThread$ThreadRunnable)
         void oracle.ideimpl.scm.impl.OperationThread.run()

    Hi Brette-
    There appears to be some sort of problem with the deployment profile in your project. If you select the deployment profile and
    right click on it to get the context menu, can you edit the settings on it? Can you use it to deploy? If the deployment profie has been
    corrupted, one possibility would be that you might try is to delete the deployment profile and recreate it and see if you can check
    that file in ok.
    Ray

  • Wrong value getting updated into konv table.

    Hi,
    i have created 1 sales order through VA01 transaction.
    when i checked this sales order value into VA02 It shows 14,700, but when i check into KONV table this value shows 147.00 .
    please suggest a solution .
    thanks
    Abhay

    Hello Abhay,
    KONV is a table that deals with Condition types.
    It's not a wrong value but only a different way used by SAP to store the value.
    This rule is valid for all table where an amount, a percentage or unit dimension is stored.
    Please find below two links for your reference.
    For Eg - SAP will store 14.7 as 147 internally in SAP table.
    http://scn.sap.com/thread/55183
    http://scn.sap.com/thread/1208210
    Regards,
    Vikas

  • Data not getting inserted into oracle with theAutoCommitEnabled not checked

    Hello Experts
    I have a proxy to JDBC scenario.I have 3 SQL statements and the Format is
    <DeleteStatement>
    <InsertStatement>
    <CallStoredProcStatement>.
    While excecuting with the AutoCommitEnabled box checked, the insert statement is excecuting and the data is getting updated in the oracle database..But the CallStoredProcStatement is not excecuting.
    If the AutoCommitEnabled box not checked,the data is not getting updated in the database .but in RWB log all the SQL statements are getting executed successfully.
    Are there any other configurations still to be made in the JDBC adapter.

    Hi,
    Why you not using single SP to handle all the queries?
    BTW, have you used the parameter "logSQLStatement = true" in JDBC receiver channel? It will show in audit log what query is being executed.
    Regards,
    Neetesh

  • Complex MySQL Query, Grouping By Invoice Number and Adding Multiple Values To Insert Into Database

    I have a table that looks like the above. I need to be able to update values in a database based on an ioID (the invoice number)
    The value I need to add is the hours times the uSalary, however as you will notice above the hours can and well have been added on an ongoing basis. For example:
    smarotti has added 4.5 (0.5 + 4.0) hours for the ioID 14190 (last 2 rows) for a total cost of $143.55
    So what I need is to have the value $143.55 update the record 14190 (ioID) on a new column (userCost)
    So:
    the userID - ddevries did 1 hour worth of work at the rate of $23.20 that needs to be update on the record 8026
    the userID - kmurtha did 20 (.5 + .25 + 6.5 + .25 + 6.5 + 6) hours worth of work $696 (20 * 34.80) that needs to be update on the record 9462
    make sense? anyone have any thoughts on how to go about doing this?
    Thanks
    Vern

    Okay
    assuming you add the column to your table the query would look like the below:
    UPDATE workers
                    INNER JOIN (SELECT
                                                    round(SUM(hours*uSalary),1) AS cost,
                                                    ioID,
                                                    userid
                                            FROM
                                                    workers
                                            GROUP BY ioID, userid ) b
                    ON workers.ioID = b.ioID
            SET workers.userCost=b.cost
    WHERE workers.ioid = b.ioID
    AND     workers.userID = b.userID
    Or if you would just like to query the data:
    SELECT  round(SUM(hours*uSalary),1) AS usercost,ioID,userid
    FROM workers
    GROUP BY ioID, userid

  • Errors when trying to INSERT Dreamweaver CS3 ASP scripts into MySql

    Greetings everyone,
    I am hoping that someone can shed some light on an issue I have not been able to solve in the last few days. I have a website that I had built using Ultradev, then MX then CS3, using the default ASP scripts in dreamweaver and an odbc connection to an Access Database. Everything had been working fine for the last couple of years until recently where more people were visiting my site which resulted in the slowness because i was using access. I decided to move to a MySql database and that is when I ran into issues. I was able to solve most everything accept for one issue I am having. I was hoping it would be an easy transition by changing the ODBC connections but it has not been that easy. Any page I have with an INSERT command using the default Dreamweaver CS3 ASP script results in an error. Now I can query and delete and search with no problem...it is just the INSERT that is giving me issues. Here is just a general insertion script that CS3 does by default....
    <%
    If (CStr(Request("MM_insert")) = "form1")Then
    If (Not MM_abortEdit) Then
    ' execute the insert
    Dim MM_editCmd
    Set MM_editCmd = Server.CreateObject ("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_adsdata_STRING
    MM_editCmd.CommandText = "INSERT INTO commenthot (yeshot, userhot) VALUES (?, ?)"
    MM_editCmd.Prepared = true
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 2, 3, Request.Form("yeshotf")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 3, 30, Request.Form("useridf")) ' adVarWChar
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close
    End If
    End If
    %>
    When I click to submit...the error i run into is...
    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
    [MySQL][ODBC 3.51 Driver][mysqld-5.0.67-community-nt-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' mel)' at line 1
    /fr/members/sexyoupasvote.asp, line 28
    ....Line 28 is the MM_editCmd.Execute. I notice if I put a single quotes around the ? next the the VALUE like this ('?', '?')...it does go through and the ? shows up in both fields as the data.
    ....If i put a single back quote around the column names like this (`yeshot`, `userhot`) VALUES (?, ?) I get this error and nothing gets inserted into the MySql.
    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
    [MySQL][ODBC 3.51 Driver][mysqld-5.0.67-community-nt-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' mel)' at line 1
    /fr/members/sexyoupasvote.asp, line 28
    ...by seeing 'mel)' show up, I know it is at least passing the data to that field.
    ....when I do (`yeshot`, `userhot`) VALUES ('?', '?')...
    it goes through and inserts ? ...instead of the real data I want to use...in this case ...the number 1 and Mel.
    ...if I do (yeshot, userhot) VALUES (?, '?')...
    I get this error...
    Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
    Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
    /fr/members/sexyoupasvote.asp, line 28
    ....any idea what to modify to make it insert the corect data? Has anyone experienced this? If I can get this fixed with just this page I can probablly fix the other pages that have teh same issue.  Is there a special setting on the MySql that I should know about to allow data to be inserted? Any help would GREATLY appreciated!
    Thank you!

    Thanks for your reply!
    When it was in Access...the datatype was Text. I used a 3rd party software to convert Assess directly to my hosting MySql server. When I logged in to see the table in MySql, it is set to Varchar(3) for yeshot and Varchar(30) for userhot. There is also an extra field I used for the KEY called commentID which is set to int(11) and it is autonumbered. Under the Collation i have utf8_general_ci set on the yeshot and userhot field. Null is No on both and the Default is set to None and all 3 fields.
    I have a form I am collecting that data from which is:
    <% If (langname.Fields.Item("langname").Value)="FR" Then
             response.write("OUI!")
             else
             response.write("YES!")
             End if %>
    <input name="yeshotf" type="radio" id="yeshotf" value="1" checked>                           
                                <span class="style10">
                                <input name="submit" type="submit" id="submit" value="VOTE!">
                                </span> -
    <input name="yeshotf" type="radio" id="yeshotf" value="2">
                                <% If (langname.Fields.Item("langname").Value)="FR" Then
             response.write("NON!")
             else
             response.write("NO!")
             End if %>
                                <input name="useridf" type="hidden" id="useridf" value="<%=(hotornot.Fields.Item("membername").Value)%>">
                                <input type="hidden" name="MM_insert" value="form1">
                              <input type="hidden" name="hdwfail" id="hdwfail" value="sexyoupasvote.asp?langname=<%=(langname.Fields.Item("langname").Value)%>&membernam e=<%=(hotornot.Fields.Item("membername").Value)%>&hdwmsg=invalid">
    </form>
    ....the form has 2 radio button and 1 hidden field where I collect the username. The radio value should either be a 1 or a 2 depending on the selection by the user. I also have a captha on the form but that does not seem the cause any problem since I am not collecting any data from it. Does this help? I left the yeshot field as Text but I can change that to Numeric data... again thanks for your assistance in helping me try to figure this out.
    ...The message I am getting now is:
    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
    [MySQL][ODBC 3.51 Driver][mysqld-5.0.67-community-nt-log]Unknown column 'Babe1' in 'field list'
    /fr/members/sexyoupasvote.asp, line 28
    ....with this setting:
    <%
    If (CStr(Request("MM_insert")) = "form1") Then
      If (Not MM_abortEdit) Then
        ' execute the insert
        Dim MM_editCmd
        Set MM_editCmd = Server.CreateObject ("ADODB.Command")
        MM_editCmd.ActiveConnection = MM_adsdata_STRING
        MM_editCmd.CommandText = "INSERT INTO dsnrenms.commenthot (yeshot, userhot) VALUES (?, ?)"
        MM_editCmd.Prepared = true
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 3, Request.Form("yeshotf")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 30, Request.Form("useridf")) ' adVarWChar
        MM_editCmd.Execute
        MM_editCmd.ActiveConnection.Close
      End If
    End If
    %>

Maybe you are looking for

  • Not receiving correct product

    I have recently started caring for an elderly lady and she mentioned to me how she is unable to afford the BT bills. Having looked at her paper bills (she doesn't have an online account) she is being charged for bt infinity option 1 but she DOES NOT

  • Error in sap crm - List  Price not found

    Hi all, I am creating an order for free of charge products that has an item category " free premium item" but when i am trying to create these orders, I get the msg " List Price not found ". however when i create a standard order that has the same it

  • Got new computer, can someone tell me how to transfer itunes library from old computer to new computer.  Please go step by step, i am new at this.

    got a new computer, need help transferring itunes library from old computer to new computer.  i am very new at this please give instructions step by step.

  • Problem print n-up in iPhoto 07

    I scanned six pages into my system and put them in iPhoto because I wanted to print them 4-up (they are 8.5x11"). When I went to print them, the print preview panel showed the first page as it should be with four of the six pages arranged two over tw

  • I recently had a repair...

    Hello everyone, Today I got my iBook G4 back from an AppleCare repair and I had a problem. The system ran perfectly until I came across a problem. When I had my laptop repaired, the problems were: * No power * Disc stuck in drive And I put a DVD in m