Problem inserting String into postgresql.

Hello,
I have this code in postgresql:
select merge_db(3, 1, '1901-1-1', '1901-1-1', '1901-1-1', 1, 1, 1, 1, 1, 1 , 1, 'hola', 1);
That calls the function merge_db and inserts data, but it wont work in my java program:
String queryPostgresql = "select merge_db("+ oid +", "+ uid +", to_timestamp("+ etime +"), to_timestamp("+ pstime +"), to_timestamp("+ rstime +"), "+ elapsed +", "+ espera +", "+ numcpu +", "+ numcpu +", "+ memory +", "+ error +", "+ memory +", "+ etiqueta +", "+ finalizado +")";
The main problem is in the field "etiqueta" which is varchar in sql and String in java. It throws "ERROR: the column (content of the variable) does not exist"
Also I'm not completely confident about the timestamp fields, I think they are causing problems too.
This is the merge_db function:
create function merge_db(key int, data1 int, data2 timestamp with time zone , data3 timestamp with time zone, data4 timestamp with time zone, data5 int, data6 int, data7 int, data8 int, data9 int, data10 int, data11 int, data12 text, data13 int) returns void as
$$
begin
loop
update trabajos set time_elapsed = data5 where oid = key;
if found then
return;
end if;
begin insert into trabajos(oid,uid,fecha_fin,fecha_acept,fecha_exec,time_elapsed,espera,ncpu,rec_ncpu,rec_memoria,error,memoria,etiqueta,finalizado) values (key, data1, data2, data3, data4, data5, data6, data7, data8, data9, data10, data11, data12, data13);
return;
exception when unique_violation then
end;
end loop;
end;
$$
language plpgsql;
Thank you!

Here is my code then:
Connection connPostgresql = DriverManager.getConnection(myUrlPostgresql, "database", "pass");
Statement StmtPostgresql = connPostgresql.createStatement();
String queryPostgresql = "select merge_db("+ oid +", "+ uid +", to_timestamp("+ etime +"), to_timestamp("+ pstime +"), to_timestamp("+ rstime +"),
"+ elapsed +", "+ espera +", "+ numcpu +", "+ numcpu +", "+ memory +", "+ error +", "+ memory +", "+ etiqueta +", "+ finalizado +")";
StmtPostgresql.executeUpdate(queryPostgresql);The function in postgresql is this one:
create function merge_db(key int, data1 int, data2 timestamp with time zone , data3 timestamp with time zone,
data4 timestamp with time zone, data5 int, data6 int, data7 int, data8 int, data9 int, data10 int, data11 int, data12 text, data13 int)
returns void as
$$
begin
loop
update trabajos set time_elapsed = data5 where oid = key;
if found then
return;
end if;
begin
insert into trabajos(oid,uid,fecha_fin,fecha_acept,fecha_exec,time_elapsed,espera,ncpu,rec_ncpu,rec_memoria,error,memoria,etiqueta,finalizado)
values (key, data1, data2, data3, data4, data5, data6, data7, data8, data9, data10, data11, data12, data13);
return;
exception when unique_violation then
end;
end loop;
end;
$$
language plpgsql;The problem is when i try to use preparedstatement i won't work and throw that exception.
And another question (I'm a pain in the ass): Java is throwing an exception regarding postgresql that says "org.postgresql.util.PSQLException: A result was returned when none was expected"
Thank you very much.
Edited by: 850264 on 13/04/2011 08:31

Similar Messages

  • Servlet inserting record into postgresql through hibernate

    Hi
    I have developed a servlet. This servlet is inserting record into postgres sql through hibernate using eclispe ide. When I run my code then I find the following exception
    exception
    java.lang.NullPointerException
         hibernate.example.FirstExample.doGet(FirstExample.java:54)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    I have developed the following code
    package hibernate.example;
    public class Contact {
         private String firstName;
         private String lastName;
         private String email;
         private long id;
         public String getEmail() {
         return email;
         public String getFirstName() {
         return firstName;
         public String getLastName() {
         return lastName;
         public void setEmail(String string) {
         email = string;
         public void setFirstName(String string) {
         firstName = string;
         public void setLastName(String string) {
         lastName = string;
         public long getId() {
         return id;
         public void setId(long l) {
         id = l;
    **Now the servlet is**
    package hibernate.example;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.hibernate.Session;
    import org.hibernate.SessionFactory;
    import org.hibernate.cfg.Configuration;
    public class FirstExample extends HttpServlet     {
         Session session = null;
         public String getServletInfo() {
              return "Servlet connects to PostgreSQL database and displays result of a SELECT";
         public void doGet(HttpServletRequest request, HttpServletResponse response)
         throws IOException, ServletException {
              try{
                   response.setContentType("text/html");
                   PrintWriter out = response.getWriter();
                   Configuration cfg = new Configuration().configure();
                   SessionFactory factory = cfg.buildSessionFactory();
                   session = factory.openSession();
                   out.println("Inserting Record");
                   Contact contact = new Contact();
                   contact.setId(6);
                   contact.setFirstName("Deepak");
                   contact.setLastName("Kumar");
                   contact.setEmail("[email protected]");
                   session.save(contact);
                   out.println("Done");
              catch(Exception e){
                   System.err.println(e.getMessage());
              finally{
                   session.flush();
                   session.close();
    **web.xml is**
    <web-app>
              <database>
                   <driver>
                   <type>org.postgresql.Driver</type>
              <url>jdbc:postgresql://127.0.0.1:5432/ali</url>
              <user>ali</user>
              <password>ali</password>
                   </driver>
              </database>
              <servlet>
              <servlet-name>FirstExample</servlet-name>
              <servlet-class>hibernate.example.FirstExample</servlet-class>
              </servlet>
              <servlet-mapping>
              <servlet-name>FirstExample</servlet-name>
              <url-pattern>/hb</url-pattern>
              </servlet-mapping>
    </web-app>
    **And contact.hbm.xml is**
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping>
    <class name="hibernate.example.Contact" table="CONTACT">
    <id name="id" type="long" column="ID" >
    <generator class="assigned"/>
    </id>
    <property name="firstName">
    <column name="FIRSTNAME" />
    </property>
    <property name="lastName">
    <column name="LASTNAME"/>
    </property>
    <property name="email">
    <column name="EMAIL"/>
    </property>
    </class>
    </hibernate-mapping>
    **And hibernate.cfg.xml is**
    <?xml version='1.0' encoding='utf-8'?>
    <!DOCTYPE hibernate-configuration PUBLIC
    "-//Hibernate/Hibernate Configuration DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
    <session-factory>
    <property name="hibernate.connection.driver_class">com.postgressql.jdbc.Driver</property>
    <property name="hibernate.connection.url">jdbc:postgresql://127.0.0.1:5432/ali</property>
    <property name="hibernate.connection.username">ali</property>
    <property name="hibernate.connection.password">ali</property>
    <property name="hibernate.connection.pool_size">10</property>
    <property name="show_sql">true</property>
    <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
    <property name="hibernate.hbm2ddl.auto">update</property>
    <!-- Mapping files -->
    <mapping resource="contact.hbm.xml"/>
    </session-factory>
    </hibernate-configuration>
    Pleas tell me that where I have done the mistake and how can I resolove the error.

    ahmadgee wrote:
    Thank u very much.
    First I tried with out the servlet. I took a simple class. But it was displaying the null pointer exception.
    then you still have the problem. do you understand the root cause?
    After then I made a servlet. how was that going to help your null pointer exception?
    Now it is displaying error hibernate.cfg.xml not found.that's part of the problem. where is the servlet reading that file and initializing the session factory? how is it finding that file?
    i don't know where you have that .cfg.xml file, or where the recommended place is where hibernate expects to see it, but i'd bet it needs to be in the CLASSPATH, which means WEB-INF/classes.
    figure out why you get that NPE first, though. the servlet is only making things worse.
    %

  • Problem inserting data into database (increment problem)

    I have a servlet page that gets various data from a bean and executes multiple SQL statements to store this data. Beacuase i want to insert data into a number of tables that are related with a one to many relationship I am not using the auto increment function in mySQL. Instead i have created a counter bean that increments each time the servlet is involked. I am using this counter to set the primary key ID in the quesiton table that i insert data into and I am alos inserting it into another table as a foreign key which relates a number or records in the outcomes table to one record in the question table. I am havin a few problems getting it to work.
    Firstly the bean counter works but when the tomcat server is shutdown the counter is reset which will cause conflicts in the database no doubt and secondly even though i have not shut my server down i seem to be getting the following error saying there is a duplicate key even though there is no data in the database.
    Here is the exception.
    javax.servlet.ServletException: Duplicate entry '4' for key 1     org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)     org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
    org.apache.jsp.authoring.question_005fmanager.process_005fquestion_jsp._jspService(process_005fquestion_jsp.java:469)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.sql.SQLException: Duplicate entry '4' for key 1
    com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2851)
    com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)     com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1366)     com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:952)     com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1974)     com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1897)     com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1758)     org.apache.jsp.authoring.question_005fmanager.process_005fquestion_jsp._jspService(process_005fquestion_jsp.java:140)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    My code is here
    // gets the feedback string parameters
         if(request.getParameterValues("feedbackBox") != null)
                   String[] feedbackList = request.getParameterValues("feedbackBox");
                   questionData.feedback = feedbackList;
         //gets the session username variable
         String insertQuestion1__username = null;
         if(session.getValue("MM_Username") != null){ insertQuestion1__username = (String)session.getValue("MM_Username");}
         //Creates a new mySQL date
         java.sql.Date currentDate = new java.sql.Date((new java.util.Date()).getTime());
         //goes thorugh each element of the scores array and calculates maxScore 
         questionData.maxScore = 0;
         for (int i = 0; i < questionData.scores.length; i++) {
                   questionData.maxScore = questionData.maxScore + questionData.scores;
         //increments count;
         synchronized(page) {
    appCounter.increaseCount();
         int counter = appCounter.count;
         Driver DriverinsertQuestion = (Driver)Class.forName(MM_connQuestion_DRIVER).newInstance();
         Connection ConninsertQuestion1 = DriverManager.getConnection(MM_connQuestion_STRING,MM_connQuestion_USERNAME,MM_connQuestion_PASSWORD);
         questionData.numOutcomes = questionData.choices.length;
         while (counter != 0)
              int questionID = counter;
              PreparedStatement insertQuestion1 = ConninsertQuestion1.prepareStatement("INSERT INTO Question.question (Question_ID, Topic_ID, Description, Image, Author, Created_Date, Max_Score, Question_Type) VALUES (" + questionID + ", '" + questionData.topicID + "', '" + questionData.questionText + "', '" + questionData.questionImage + "', '" insertQuestion1__username "', '" + currentDate + "', " + questionData.maxScore + ", '" + questionData.questionType + "') ");
              insertQuestion1.executeUpdate();          
         Driver DriverinsertQuestion2 = (Driver)Class.forName(MM_connAnswer_DRIVER).newInstance();
         Connection ConninsertQuestion2 = DriverManager.getConnection(MM_connAnswer_STRING,MM_connAnswer_USERNAME,MM_connAnswer_PASSWORD);
         PreparedStatement insertQuestion2 = ConninsertQuestion2.prepareStatement("INSERT INTO Answer.question (Question_ID, Question_Description, Question_Type, Topic, Number_Outcomes, Question_Wording) VALUES ('" counter "', '" questionData.questionLabel "', '" questionData.questionType "', '" questionData.questionType "', '" questionData.topicID "', '" questionData.numOutcomes "', '" questionData.questionText "' ) ");
         insertQuestion2.executeUpdate();
         Driver DriverinsertOutcomes = (Driver)Class.forName(MM_connAnswer_DRIVER).newInstance();
         Connection ConninsertOutcomes = DriverManager.getConnection(MM_connAnswer_STRING,MM_connAnswer_USERNAME,MM_connAnswer_PASSWORD);
         for (int i=0; i < questionData.numOutcomes; i ++)
         PreparedStatement insertOutcomes = ConninsertOutcomes.prepareStatement("INSERT INTO Answer.outcome (Question_ID, Outcome_Number, Outcome_Text, Score, Feedback) VALUES ( '" counter "', '" i "', '" +questionData.choices[i]+ "', '" +questionData.scores[i]+ "', '" +questionData.feedback[i]+ "' ) ");
         insertOutcomes.executeUpdate();
    Does anyone know where i am going wrong or how to fix this problem. I would like to know wheter i am doing this the right way. Is thjis the most practical way to use a counter bean or is there a better safer way to do it.
    Suggestions would be mcuh appreciated
    Thanks

    hi Narendran,
        i declared itab as follows
    DATA:      tb_final TYPE STANDARD TABLE OF ztable,
                       wa_final TYPE ztable.    "work area
    i am populating tb_final as follows:
                 wa_final-vkorg = wa_ycostctr_kunwe-vkorg.
                  wa_final-vtweg = wa_ycostctr_kunwe-vtweg.
                  wa_final-spart = wa_ycostctr_kunwe-spart.
                  wa_final-kunwe = wa_ycostctr_kunwe-kunwe.
                  wa_final-kondm = wa_ycostctr_kunwe-kondm.
                  wa_final-kschl = wa_ycostctr_2-kschl.
                  wa_final-hkont = wa_ycostctr_2-saknr.
                  wa_final-kostl = wa_ycostctr_kunwe-kostl.
            APPEND wa_final TO tb_final.
                  CLEAR wa_final.
    here i am not populating Mandt field.
    finally in tb_final am not getting the proper data .
    kindly help me.
    Thanks,
    Praveena

  • Insert string into date column

    I'm writing a bash script that is supposed to insert a series of strings into a table. Problem is I may not know which column the date is in, so I don't want to hard code a to_date function in there.
    For instance this row may come in to be inserted:
    "06-APR-10 08:51:12","data","data","data","data","data","data","data","data"
    Assuming the data is in the proper order, I'm just going to sub out the "," for ',' which will let me insert everything just fine, except obviously it borks on the date.
    How do I insert the date this way as a string using the default internal call to to_date?? I know I can do it with '06-APR-10' and it works, but I need to get a little more specific with hour minute and second.

    user12947249 wrote:
    I'm writing a bash script that is supposed to insert a series of strings into a table. Problem is I may not know which column the date is in, so I don't want to hard code a to_date function in there.If you don't know which string maps to which column, how do you expect to have any data reliability? Even if you manage to load the data without error, how can an application make any sense of it?
    I'm curious because if you have a method to map the columns, that could be used to help you (maybe) and if you don't have a method ... then i don't see this post as being your number one problem :)

  • Problem inserting date into MS SQL Server

    I am trying insert date into MS SQL Server database. First I used Statement and when I insert the date only date used to be inserted properly and the time used to be always 12:00:00 AM. I tried PreparedStatement and when I insert I get an error message:
    SQL Error: [Microsoft][ODBC SQL Server Driver]Optional feature not implemented
    I have attached the code.
    GregorianCalendar cal = new GregorianCalendar();
    java.util.Date dtm = (java.util.Date)cal.getTime();
    SimpleDateFormat formatOb = new SimpleDateFormat("dd/MM/yy hh:mm:ss");
    String date= (String)formatOb.format(dtm);
    dateCreated = new java.sql.Date(formatOb.parse(date).getTime());
    PreparedStatement psmt = con.prepareStatement("INSERT INTO Resume (ResumeName, Summary, Skills, OtherInformation, Interests, Memberships, Languages, Category, DateCreated, SupervisorName) VALUES(?,?,?,?,?,?,?,?,?,?)");
    psmt.setString(1, name);
    psmt.setString(2, summary);
    psmt.setString(3, skills);
    psmt.setString(4, info);
    psmt.setString(5, interest);
    psmt.setString(6, member);
    psmt.setString(7, language);
    psmt.setString(8, category);
    psmt.setDate(9, dateCreated);
    psmt.setString(10, loginName);
    psmt.executeUpdate();
    Any suggestions will be really helpful.

    Thanks,
    I changed the field in the database of DateCreated to timestamp, but when I insert the some binary data is inserted into the database. something like 0000000000000017D.
    I installed jtds-0.8.1 driver from source forge. but when try to connect to the database I get an error as:
    Connection refused: connect
    Error: Connection refused: connect
    I have attached the code for setting the driver and url also.
    private String driver = "net.sourceforge.jtds.jdbc.Driver";
    private String url = "jdbc:jtds:sqlserver://TEKKATTE:1433/placement;TDS=7.0";

  • Problem - Inserting Records into Hashed Tables

    Help for an ABAP Newbie...
    How do I insert records into a hashed table?
    I am trying the following, but get the error message,
    *You cannot use explicit or implicit index operations with types "HASHED TABLE" or "ANY TABLE".  "LT_UNIQUE_NAME_KEYS" has the type "HASHED TABLE".
    TYPES: BEGIN OF idline,
        id TYPE i,
        END OF idline.
      DATA: lt_unique_name_keys TYPE HASHED TABLE OF idline WITH UNIQUE KEY id,
            ls_unique_name_key LIKE LINE OF lt_unique_name_keys.
    " Create a record and attempt to insert it into the internal table.
    " Why does this cause a compilation error message?
    ls_unique_name_key-id = 1.
      INSERT ls_unique_name_key INTO lt_unique_name_keys.
    Thanks,
    Walter

    INSERT ls_unique_name_key INTO TABLE lt_unique_name_keys.

  • Some problems about insert String into JTextPane

    here is the colde:
    HTMLEditorKit kit = new HTMLEditorKit();
    HTMLDocument doc =(HTMLDocument)kit.createDefaultDocument();
    String str="hello world";
    SimpleAttributeSet attr =new MutableAttributeSet();
    StyleConstants.setFontFamily(attr, "Times New Roman");
    StyleConstants.setFontSize(attr, 12);
    StyleConstants.setBold(attr, true);
    StyleConstants.setBackground(attr, UIManager.getColor("control"));
    doc.insertString(1,str,attr);
    JTextPanel panel =new JTextPanel();
    panel.setEditorKit(kit);
    panel.setDocument(doc);
    text "hello word" of document can be show correctly,i save it as a .html file then open it a strange problem occured,i can't see the word "hello world" in panel,i can't find the word "hello word" in html source code except some tags of html,who can tell me what's wrong?thanks in advanced!

    hello user457523
    I have found the reason to that error.It's because there's a trigger and ext_src_file_nm is populated by the trigger from another column ext_src_file_loc when inserting and I didn't give any value to ext_src_file_loc so ext_src_file_nm is null.
    I have disabled that trigger and now I get new errors.When I traced to a line of Jave code I got missing source file warning,and the source file is also oracle.sql.CharacterSet.java.I can not trace into the source file and then I skipped that code and then I got new errors.I want to know how to trace into the jave code and find what's the matter.
    Thank you very much.

  • BareCode reader and insert String into actual selected JTextField

    Hi everyone,
    I can't invent anything appropriate about my concept. I would like to write a program for BareCode reading. I have working code witch gets a text string from reader which is connected over RS232. But I have to send this String to actual selected JTextField in other java program. I think to use clipboard to overcome this problem but I'm not sure if it's a good solution. Copy this String to clipboard and auto Paste... Any ideas ?
    Please help me!
    Many thanks for any advices :)

    Hmm... I missed that bit about having to poke it into
    another Java program. In that case I would
    look into modifying the other Java program instead of
    trying to write a separate program to deal with it.
    Otherwise you run into management issues like making
    sure the other program is running, and not minimized,
    and located at the right place on the screen, and has
    the JTextField in question in focus, and so on.In most cases, I would agree. But if his java program is header-less and just responds to the serial events and calls Robot.keyPress() and Robot.keyRelease() he will just be imitating the keyboard, which is exactly what most barcode readers can already do. And this would work in any program that can get keyboard input, no matter what the language was written in.
    We are currently doing this with a web-based application. The web page just has a text field and when they scan the barcode it submits the page. Of course the barcode reader we are using just imitates the keyboard, no mucking around converting serial data into keyboard events.
    I bet if the OP looks around he could find software that will already convert the barcode RS232 data into keyboard events.

  • Problem inserting video into a page

    Hi, I have a page created using a custom page layout that I created.  
    I tried using the Video page field but when I configure the video, with youtube url it doesn't work.  here is the url I used, 
    https://www.youtube.com/watch?v=v6yvW66-ThI&feature=player_embedded and https://www.youtube.com/watch?v=v6yvW66-ThI both won't work  It gives message at the bottom saying loading of video failed.
                                    <!--CS: Start Page Field: Promo-Video Snippet-->
                                    <!--SPM:<%@Register Tagprefix="PageFieldMediaFieldControl" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing,
    Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
    I then tried inserting into a Page Content section.  I clicked on the Insert tab, click "Video and Audio" then "Embed".  I then paste the following code into the dialog.  The video loads and I click the Insert button.  In
    Edit mode I can see and play the video.  I click to save the page and the video disappear.  I click to edit the page again and the video snippet code I pasted earlier is gone.  <iframe width="510" height="340" src="//www.youtube.com/embed/v6yvW66-ThI?feature=player_detailpage"
    frameborder="0" allowfullscreen></iframe>
                                    <!--CS: Start Page Field: Course-Finder Snippet-->
                                    <!--SPM:<%@Register Tagprefix="PageFieldRichHtmlField" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing,
    Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
                                    <!--MS:<PageFieldRichHtmlField:RichHtmlField FieldName="7028b9a8-236b-42a4-a74d-50c8459ec679" runat="server">-->
                                        <!--PS: Start of READ-ONLY PREVIEW (do not modify)--><div id="ctl02_label" style="display:none">Course-Finder</div><div
    id="ctl02__ControlWrapper_RichHtmlField" class="ms-rtestate-field" style="display:inline" aria-labelledby="ctl02_label"><div align="left" class="ms-formfieldcontainer"><div class="ms-formfieldlabelcontainer"
    nowrap="nowrap"><span class="ms-formfieldlabel" nowrap="nowrap">Course-Finder</span></div><div class="ms-formfieldvaluecontainer"><div class="ms-rtestate-field">Course-Finder
    field value. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
    irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div></div></div></div><!--PE:
    End of READ-ONLY PREVIEW-->
                                    <!--ME:</PageFieldRichHtmlField:RichHtmlField>-->
                                    <!--CE: End Page Field: Course-Finder Snippet-->
    Thank you.

    Thank you for the link.  I read it over a couple of times but it says youtube doesn't work.  I checked the Site Setting ->HTML Field Security and youtube.com is in the allowed iframes list.  Below is from the link
    Using the "Embed Code" dialog
    When editing a HTML field, there is now a new button available on the ribbon called "Embed Code" in the "Insert" tab. As the <iframe> code is inserted, the dialog tells you that the content will be inserted in a web part. YouTube didn’t work because they
    prevent display in an iframe due to security reasons but Bing did.
    One thing is that we're Intranet site so it has to be https but in the snippet editor of embedded code the video is loaded and plays.  It just disappear after I save the page.  
    Anyway to get youbute iframe to work using either embedded code or in Edit Html source in a SP publishing site page?
    Thank you.

  • Problem inserting XML into object view

    Hi all,
    My environment is :
    Windows NT 4.0
    Oracle 8i 8.1.5
    (NLS_CHARACTERSET = EL8MSWIN1253)
    Apache 1.3.11 Web Server
    Apache JServ 1.1
    XSQL v 0.9.9.1 and XML parser for Java v2,
    XMLSQL that come with it
    I've created an object view as following :
    create table schedules (
    schedule_id varchar2(20),
    description varchar2(100),
    constraint pk_schedule_id primary key (schedule_id)
    create table schedule_details (
    schedule_id varchar2(20),
    starting_time date,
    duration number,
    constraint pk_schedule_dtls primary key (schedule_id, starting_time),
    constraint fk_schedule_id foreign key (schedule_id) references schedules (schedule_id)
    create or replace type schedule_detail_t as object (
    starting_time varchar2(20),
    duration number
    create or replace type schedule_detail_list as table of schedule_detail_t;
    create or replace type schedule_details_t as object (
    schedule_id varchar2(20),
    description varchar2(100),
    details schedule_detail_list
    create or replace view schedule_details_view of schedule_details_t
    with object OID (schedule_id)
    as select schedule_id, description,
    cast(multiset(select schedule_detail_t (to_char(starting_time, 'hh24:mi'), duration) as Detail
    from schedule_details
    where schedule_details.schedule_id = schedules.schedule_id
    ) as schedule_detail_list )
    from schedules;
    And I'm trying to insert using putXML this
    <?xml version = "1.0" encoding = "ISO-8859-1"?>
    <ROWSET>
    <ROW>
    <SCHEDULE_ID>S1112</SCHEDULE_ID>
    <DESCRIPTION>Working 08:00 to 20:00</DESCRIPTION>
    <DETAILS>
    <DETAILS_ITEM>
    <STARTING_TIME>08:00</STARTING_TIME>
    <DURATION>12</DURATION>
    </DETAILS_ITEM>
    </DETAILS>
    </ROW>
    </ROWSET>
    The error I get is
    oracle.xml.sql.OracleSQLXMLException:
    non supported oracle-character-set-174
    Note: no rows have been inserted
    at oracle.xml.sql.dml.OracleXMLSave.insertXML
    When I'm posting using XSQL the XML doesn't get inserted with no error message.
    But when I try this for a change
    <?xml version = "1.0" encoding = "ISO-8859-1"?>
    <ROWSET>
    <ROW>
    <SCHEDULE_ID>S1111</SCHEDULE_ID>
    <DESCRIPTION>Working 08:00 to 20:00</DESCRIPTION>
    </ROW>
    </ROWSET>
    Trying to insert into table (this time) "schedules" using putXML it works ...
    It works on tables and it doesn't work on object views.
    Any piece of advice will be highly appreciated.
    Nick

    No known limitations. Please post the sample DDL to create your object types and object view, along with an example of the example XML document you're trying to insert.

  • Problem inserting FLV into template based page DW8

    Error when inserting an FLV into a template based page.
    The error is: "Making this change would require changing code
    that is locked by a template or translator. The change will be
    discarded."
    I thought perhaps something was wrong with my code so I
    created a new page in DW8, with one word of text. Saved the new
    page as a template with the one word of text made into an editable
    region. Created a page based on that template and attempted to
    insert a FLV file into the editable region (using Insert > Media
    > Flash Video). I still get the error message. I've attached the
    code for this page.
    I also get the error message when I go through the tutorial
    Presenting
    Video with the Flash Video Component in Dreamweaver 8. Using
    the files provided in the tutorial.
    Is the only workaround for this the one I found here?:
    http://med.stanford.edu/irt/web/references/flash_video_installation.html.
    Steps are under heading "Workaround for Locked Code insert error"
    near bottom of page.
    Any help is appreciated.
    Jen

    > Is the only workaround for this the one I found here?:
    >
    http://med.stanford.edu/irt/web/references/flash_video_installation.html.
    > Steps
    > are under heading "Workaround for Locked Code insert
    error" near bottom
    > of
    > page.
    This workaround *will* work....
    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
    ==================
    "kilmeny21" <[email protected]> wrote in
    message
    news:[email protected]...
    > Error when inserting an FLV into a template based page.
    >
    > The error is: "Making this change would require changing
    code that is
    > locked
    > by a template or translator. The change will be
    discarded."
    >
    > I thought perhaps something was wrong with my code so I
    created a new page
    > in
    > DW8, with one word of text. Saved the new page as a
    template with the one
    > word
    > of text made into an editable region. Created a page
    based on that
    > template and
    > attempted to insert a FLV file into the editable region
    (using Insert >
    > Media >
    > Flash Video). I still get the error message. I've
    attached the code for
    > this
    > page.
    >
    > I also get the error message when I go through the
    tutorial
    >
    http://www.adobe.com/devnet/flash/articles/flv_tutorial.html.
    Using the
    > files
    > provided in the tutorial.
    >
    > Is the only workaround for this the one I found here?:
    >
    http://med.stanford.edu/irt/web/references/flash_video_installation.html.
    > Steps
    > are under heading "Workaround for Locked Code insert
    error" near bottom
    > of
    > page.
    >
    > Any help is appreciated.
    > Jen
    >
    >
    >
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml"><!--
    InstanceBegin
    > template="/Templates/index.dwt"
    codeOutsideHTMLIsLocked="false" -->
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    > <!-- InstanceBeginEditable name="doctitle" -->
    > <title>Untitled Document</title>
    > <!-- InstanceEndEditable -->
    > <!-- InstanceBeginEditable name="head" --><!--
    InstanceEndEditable -->
    > </head>
    >
    > <body>
    > <!-- InstanceBeginEditable name="temp"
    -->Text<!-- InstanceEndEditable -->
    > </body>
    > <!-- InstanceEnd --></html>
    >

  • Problem inserting date into db

    I have my date set with the date format
    #dateformat(form.dateofgame,"mm/dd/yyyy")#
    in the insert query
    However, its adding 00:00:00 after it in the db. I cannot run
    a query of select * where dateneeded=#todaydate# beause of this.
    Any suggestions?

    Your date field is actually a date-time field, which is fine.
    There are a couple of ways to accomplish your goal. Here is one.
    today = createdate(year(now()), month(now()), day(now()));
    tomorrow = dateadd("d", 1, today);
    Both those variables have 0's for the time portion of a
    date-time object. Then your sql becomes
    where dateneeded >= #today#
    and dateneeded < #tomorrow#
    You should also use cfqueryparam, but I was too lazy to type
    it.

  • Problem Inserting CD into side slot

    Trying to load Rosetta Stone CD in to iMac side slot.  I've got shiny side of CD facing me, with label side facing away.  Is this right?  because either way I insert it, it spits out the CD.  Any suggestions?

    Only the Rosetta Stone.  I just input an investing CD i have, and it works great. I posted the issue on rosetta stone website and am waiting for reply.  Wondering if i should not have upgraded to Lion   but liked the iCloud stuff it offered.

  • Problem inserting discs into iMac

    I removed an audio CD from my iMac and now it will not let me insert anything. Its seems locked?
    Any suggestions?

    Open "Disk Utility" and see if it recognizes the Superdrive. Try restarting the iMac while holding the mouse button during restart (causes eject action). Reset PRAM:
    PRAM RESET
    Shut down the computer.
    Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.

  • Problem inserting photos in Imovie project

    i have what seems an unusual problem inserting photos into one of my projects. some photos insert fine however others that are dragged into the project dont appear when the video is played. the bar does however appear above the video clip showing that the photo has been inserted and the duration can be toggled.
    i then tried inserting the same photo into another short project and it worked fine?!
    has anyone come across this? would really appreciate your help as trying to put together a video clip for a wedding which is taking place in a few days!!
    many thanks

    I have also tried deleting the com.apple.imovie.plist ... I don't have one to delete ??  And, I tried repairing disk permissions with disk utility ... no change. I have also tried changing the title of the project.  These same pictures can be added into any other project ... I'm going CRAZY!

Maybe you are looking for