39 messaggi dal 18 luglio 2014
ecco la insert per un'altra tabella che funziona
using System;
using System.Data;
using System.Data.OleDb;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class learning_extjs_19_1_7_CREATE_WNE : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected String Give_me_connection_wne()
    {
        String str_output_my, str_output_my_2;
        String textField1_ID_txt_v, textField2_Titolo_txt_v, textField3_Date_txt_v, textField4_Link_txt_v, textField5_State_txt_v, textField6_Photo_txt_v, my_html_editor_Preface_txt_v, my_html_editor_Abstract_txt_v, my_html_editor_List_txt_v;
        String my_html_editor_2_Abstract2_txt_v, my_html_editor_List2_txt_v, my_html_editor_Conclusion_txt_v;
        String textField1_ID_txt_v_uk, textField2_Titolo_txt_v_uk, textField3_Date_txt_v_uk, textField4_Link_txt_v_uk, textField5_State_txt_v_uk, textField6_Photo_txt_v_uk, my_html_editor_Preface_txt_v_uk, my_html_editor_Abstract_txt_v_uk, my_html_editor_List_txt_v_uk;
        String my_html_editor_2_Abstract2_txt_v_uk, my_html_editor_List2_txt_v_uk, my_html_editor_Conclusion_txt_v_uk;
        int i;
        int num_car;
        int articolo_flag;

        textField1_ID_txt_v = Request.Form["textField1_ID_txt_v"];
        textField2_Titolo_txt_v = Request.Form["textField2_Titolo_txt_v"];
        textField3_Date_txt_v = Request.Form["textField3_Date_txt_v"];
        textField4_Link_txt_v = Request.Form["textField4_Link_txt_v"];
        textField5_State_txt_v = Request.Form["textField5_State_txt_v"];
        textField6_Photo_txt_v = Request.Form["textField6_Photo_txt_v"];
        my_html_editor_Preface_txt_v = Request.Form["my_html_editor_Preface_txt_v"];
        my_html_editor_Abstract_txt_v = Request.Form["my_html_editor_Abstract_txt_v"];
        my_html_editor_List_txt_v = Request.Form["my_html_editor_List_txt_v"];
        my_html_editor_2_Abstract2_txt_v = Request.Form["my_html_editor_2_Abstract2_txt_v"];
        my_html_editor_List2_txt_v = Request.Form["my_html_editor_List2_txt_v"];
        my_html_editor_Conclusion_txt_v = Request.Form["my_html_editor_Conclusion_txt_v"];

        textField2_Titolo_txt_v_uk = Request.Form["textField2_Titolo_txt_v_uk"];
        textField3_Date_txt_v_uk = Request.Form["textField3_Date_txt_v_uk"];
        textField4_Link_txt_v_uk = Request.Form["textField4_Link_txt_v_uk"];
        textField5_State_txt_v_uk = Request.Form["textField5_State_txt_v_uk"];
        textField6_Photo_txt_v_uk = Request.Form["textField6_Photo_txt_v_uk"];
        my_html_editor_Preface_txt_v_uk = Request.Form["my_html_editor_Preface_txt_v_uk"];
        my_html_editor_Abstract_txt_v_uk = Request.Form["my_html_editor_Abstract_txt_v_uk"];
        my_html_editor_List_txt_v_uk = Request.Form["my_html_editor_List_txt_v_uk"];
        my_html_editor_2_Abstract2_txt_v_uk = Request.Form["my_html_editor_2_Abstract2_txt_v_uk"];
        my_html_editor_List2_txt_v_uk = Request.Form["my_html_editor_List2_txt_v_uk"];
        my_html_editor_Conclusion_txt_v_uk = Request.Form["my_html_editor_Conclusion_txt_v_uk"];


        textField1_ID_txt_v = textField1_ID_txt_v.Trim();
        textField2_Titolo_txt_v = textField2_Titolo_txt_v.Trim();
        textField3_Date_txt_v = textField3_Date_txt_v.Trim();
        textField4_Link_txt_v = textField4_Link_txt_v.Trim();
        textField5_State_txt_v = textField5_State_txt_v.Trim();
        textField6_Photo_txt_v = textField6_Photo_txt_v.Trim();
        my_html_editor_Preface_txt_v = my_html_editor_Preface_txt_v.Trim();
        my_html_editor_Abstract_txt_v = my_html_editor_Abstract_txt_v.Trim();
        my_html_editor_List_txt_v = my_html_editor_List_txt_v.Trim();
        my_html_editor_2_Abstract2_txt_v = my_html_editor_2_Abstract2_txt_v.Trim();
        my_html_editor_List2_txt_v = my_html_editor_List2_txt_v.Trim();
        my_html_editor_Conclusion_txt_v = my_html_editor_Conclusion_txt_v.Trim();

        textField2_Titolo_txt_v_uk = textField2_Titolo_txt_v_uk.Trim();
        textField3_Date_txt_v_uk = textField3_Date_txt_v_uk.Trim();
        textField4_Link_txt_v_uk = textField4_Link_txt_v_uk.Trim();
        textField5_State_txt_v_uk = textField5_State_txt_v_uk.Trim();
        textField6_Photo_txt_v_uk = textField6_Photo_txt_v_uk.Trim();
        my_html_editor_Preface_txt_v_uk = my_html_editor_Preface_txt_v_uk.Trim();
        my_html_editor_Abstract_txt_v_uk = my_html_editor_Abstract_txt_v_uk.Trim();
        my_html_editor_List_txt_v_uk = my_html_editor_List_txt_v_uk.Trim();
        my_html_editor_2_Abstract2_txt_v_uk = my_html_editor_2_Abstract2_txt_v_uk.Trim();
        my_html_editor_List2_txt_v_uk = my_html_editor_List2_txt_v_uk.Trim();
        my_html_editor_Conclusion_txt_v_uk = my_html_editor_Conclusion_txt_v_uk.Trim();

        textField1_ID_txt_v = textField1_ID_txt_v.Replace("'", "''");
        textField2_Titolo_txt_v = textField2_Titolo_txt_v.Replace("'", "''");
        textField3_Date_txt_v = textField3_Date_txt_v.Replace("'", "''");
        textField4_Link_txt_v = textField4_Link_txt_v.Replace("'", "''");
        textField5_State_txt_v = textField5_State_txt_v.Replace("'", "''");
        textField6_Photo_txt_v = textField6_Photo_txt_v.Replace("'", "''");
        my_html_editor_Preface_txt_v = my_html_editor_Preface_txt_v.Replace("'", "''");
        my_html_editor_Abstract_txt_v = my_html_editor_Abstract_txt_v.Replace("'", "''");
        my_html_editor_List_txt_v = my_html_editor_List_txt_v.Replace("'", "''");
        my_html_editor_2_Abstract2_txt_v = my_html_editor_2_Abstract2_txt_v.Replace("'", "''");
        my_html_editor_List2_txt_v = my_html_editor_List2_txt_v.Replace("'", "''");
        my_html_editor_Conclusion_txt_v = my_html_editor_Conclusion_txt_v.Replace("'", "''");

        textField2_Titolo_txt_v_uk = textField2_Titolo_txt_v_uk.Replace("'", "''");
        textField3_Date_txt_v_uk = textField3_Date_txt_v_uk.Replace("'", "''");
        textField4_Link_txt_v_uk = textField4_Link_txt_v_uk.Replace("'", "''");
        textField5_State_txt_v_uk = textField5_State_txt_v_uk.Replace("'", "''");
        textField6_Photo_txt_v_uk = textField6_Photo_txt_v_uk.Replace("'", "''");
        my_html_editor_Preface_txt_v_uk = my_html_editor_Preface_txt_v_uk.Replace("'", "''");
        my_html_editor_Abstract_txt_v_uk = my_html_editor_Abstract_txt_v_uk.Replace("'", "''");
        my_html_editor_List_txt_v_uk = my_html_editor_List_txt_v_uk.Replace("'", "''");
        my_html_editor_2_Abstract2_txt_v_uk = my_html_editor_2_Abstract2_txt_v_uk.Replace("'", "''");
        my_html_editor_List2_txt_v_uk = my_html_editor_List2_txt_v_uk.Replace("'", "''");
        my_html_editor_Conclusion_txt_v_uk = my_html_editor_Conclusion_txt_v_uk.Replace("'", "''");

        articolo_flag = 0;

        if((textField5_State_txt_v == "Aggiornamento Software/Firmware") || (textField5_State_txt_v == "Event - Internal Link") || (textField5_State_txt_v == "News - Internal Link") || (textField5_State_txt_v == "Email - Marketing"))
            articolo_flag = 1;
        // ----- INSERT of a new elemen -----
        
        String ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + HttpContext.Current.Server.MapPath("../../../../../../mdb-database/mpbluca/database/ONCEM_MARKET_DATI_2.mdb");
        OleDbConnection cn = new OleDbConnection(ConnString);
        String sql_str = "INSERT INTO Tab_NewsEvents (Titolo , Data , Stralcio , Link , TipologiaNews , Preambolo_1 , PrimoElenco , Preambolo_2 , SecondoElenco , Conclusioni , LinkFoto , PosizioneFoto , Articolo ) ";
        sql_str = sql_str + " VALUES ('" + textField2_Titolo_txt_v + "','" + textField3_Date_txt_v + "','" + my_html_editor_Preface_txt_v + "','" + textField4_Link_txt_v + "','" + textField5_State_txt_v + "','" + my_html_editor_Abstract_txt_v + "','" + my_html_editor_List_txt_v + "','" + my_html_editor_2_Abstract2_txt_v + "','" + my_html_editor_List2_txt_v + "','" + my_html_editor_Conclusion_txt_v + "','" + textField6_Photo_txt_v + "', 0 ," + articolo_flag + ")";
        OleDbCommand comandoSQL = new OleDbCommand(sql_str, cn);
        cn.Open();
        int records = (int)comandoSQL.ExecuteNonQuery();
        cn.Close();

        // ----- SELECT ID VALUE -----

        DataSet mioDataSet;
        OleDbDataAdapter mioDataAdapter;

        sql_str = "SELECT MAX(ID) FROM Tab_NewsEvents ";
        comandoSQL = new OleDbCommand(sql_str, cn);
        cn.Open();
        mioDataSet = new DataSet();
        mioDataAdapter = new OleDbDataAdapter(comandoSQL);
        mioDataAdapter.Fill(mioDataSet, "Tab_NewsEvents");
        cn.Close();

        int quantiRecord = mioDataSet.Tables["Tab_NewsEvents"].Rows.Count;

        str_output_my = "not set";
        i = 0;
        while (i < quantiRecord)
        {
            str_output_my = (mioDataSet.Tables["Tab_NewsEvents"].Rows[i][0]).ToString();
            i++;
        }

        
        // ----- INSERT BY WEB SERVICE -----
        str_output_my_2 = "";
        com.uk.######.www.Service ws = new com.uk.######b.www.Service();
        str_output_my_2 = ws.GiveMe_Insert_WNE(str_output_my, textField2_Titolo_txt_v_uk, textField3_Date_txt_v_uk, textField4_Link_txt_v_uk, textField5_State_txt_v_uk, textField6_Photo_txt_v_uk, my_html_editor_Preface_txt_v_uk, my_html_editor_Abstract_txt_v_uk, my_html_editor_List_txt_v_uk, my_html_editor_2_Abstract2_txt_v_uk, my_html_editor_List2_txt_v_uk, my_html_editor_Conclusion_txt_v_uk);
        // ---------------------------------

        if (str_output_my_2 != "")
            str_output_my = str_output_my + str_output_my_2;

        return str_output_my;

    }
}


mentre il codice del service.wsdl
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
      <s:element name="HelloWorld">
        <s:complexType />
      </s:element>
      <s:element name="HelloWorldResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_Update">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="ID" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Marca" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Modello" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Software" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Firmware" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Data" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="NoteNew" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="SoftwareVers" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="FirmwareVers" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Visualizza" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_UpdateResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GiveMe_UpdateResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_Update_CALENDAR">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="ID" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="CodiceCorso" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="DescrizioneBreve" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Durata" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Gennaio" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Febbraio" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Marzo" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Aprile" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Maggio" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Giugno" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Luglio" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Agosto" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Settembre" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Ottobre" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Novembre" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Dicembre" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_Update_CALENDARResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GiveMe_Update_CALENDARResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_Update_FAQ">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="ID" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="FAQ_ENG" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_Update_FAQResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GiveMe_Update_FAQResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_Insert">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="ID" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Marca" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Modello" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Software" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Firmware" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Data" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="NoteNew" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="SoftwareVers" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="FirmwareVers" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Visualizza" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_InsertResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GiveMe_InsertResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_Delete">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="ID" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_DeleteResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GiveMe_DeleteResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_Select_FAQ">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="ID" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_Select_FAQResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GiveMe_Select_FAQResult" type="tns:ArrayOfString" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:complexType name="ArrayOfString">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="s:string" />
        </s:sequence>
      </s:complexType>
      <s:element name="GiveMe_Insert_WNE">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="textField1_ID_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="textField2_Titolo_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="textField3_Date_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="textField4_Link_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="textField5_State_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="textField6_Photo_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="my_html_editor_Preface_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="my_html_editor_Abstract_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="my_html_editor_List_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="my_html_editor_2_Abstract2_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="my_html_editor_List2_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="my_html_editor_Conclusion_txt_v_uk" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_Insert_WNEResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GiveMe_Insert_WNEResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_Delete_WNE">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="ID" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_Delete_WNEResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GiveMe_Delete_WNEResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_Update_WNE">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="textField1_ID_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="textField2_Titolo_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="textField3_Date_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="textField4_Link_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="textField5_State_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="textField6_Photo_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="my_html_editor_Preface_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="my_html_editor_Abstract_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="my_html_editor_List_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="my_html_editor_2_Abstract2_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="my_html_editor_List2_txt_v_uk" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="my_html_editor_Conclusion_txt_v_uk" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_Update_WNEResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GiveMe_Update_WNEResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_Update_SPOTLIGHT">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="ID_2" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Code_2" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Spotlight_2" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_Update_SPOTLIGHTResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GiveMe_Update_SPOTLIGHTResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_Delete_SPOTLIGHT">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="ID_2" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GiveMe_Delete_SPOTLIGHTResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GiveMe_Delete_SPOTLIGHTResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="HelloWorldSoapIn">
    <wsdl:part name="parameters" element="tns:HelloWorld" />
  </wsdl:message>
  <wsdl:message name="HelloWorldSoapOut">
    <wsdl:part name="parameters" element="tns:HelloWorldResponse" />
  </wsdl:message>
  <wsdl:message name="GiveMe_UpdateSoapIn">
    <wsdl:part name="parameters" element="tns:GiveMe_Update" />
  </wsdl:message>
  <wsdl:message name="GiveMe_UpdateSoapOut">
    <wsdl:part name="parameters" element="tns:GiveMe_UpdateResponse" />
  </wsdl:message>
  <wsdl:message name="GiveMe_Update_CALENDARSoapIn">
    <wsdl:part name="parameters" element="tns:GiveMe_Update_CALENDAR" />
  </wsdl:message>
  <wsdl:message name="GiveMe_Update_CALENDARSoapOut">
    <wsdl:part name="parameters" element="tns:GiveMe_Update_CALENDARResponse" />
  </wsdl:message>
  <wsdl:message name="GiveMe_Update_FAQSoapIn">
    <wsdl:part name="parameters" element="tns:GiveMe_Update_FAQ" />
  </wsdl:message>
  <wsdl:message name="GiveMe_Update_FAQSoapOut">
    <wsdl:part name="parameters" element="tns:GiveMe_Update_FAQResponse" />
  </wsdl:message>
  <wsdl:message name="GiveMe_InsertSoapIn">
    <wsdl:part name="parameters" element="tns:GiveMe_Insert" />
  </wsdl:message>
  <wsdl:message name="GiveMe_InsertSoapOut">
    <wsdl:part name="parameters" element="tns:GiveMe_InsertResponse" />
  </wsdl:message>
  <wsdl:message name="GiveMe_DeleteSoapIn">
    <wsdl:part name="parameters" element="tns:GiveMe_Delete" />
  </wsdl:message>
  <wsdl:message name="GiveMe_DeleteSoapOut">
    <wsdl:part name="parameters" element="tns:GiveMe_DeleteResponse" />
  </wsdl:message>
  <wsdl:message name="GiveMe_Select_FAQSoapIn">
    <wsdl:part name="parameters" element="tns:GiveMe_Select_FAQ" />
  </wsdl:message>
  <wsdl:message name="GiveMe_Select_FAQSoapOut">
    <wsdl:part name="parameters" element="tns:GiveMe_Select_FAQResponse" />
  </wsdl:message>
  <wsdl:message name="GiveMe_Insert_WNESoapIn">
    <wsdl:part name="parameters" element="tns:GiveMe_Insert_WNE" />
  </wsdl:message>
  <wsdl:message name="GiveMe_Insert_WNESoapOut">
    <wsdl:part name="parameters" element="tns:GiveMe_Insert_WNEResponse" />
  </wsdl:message>
  <wsdl:message name="GiveMe_Delete_WNESoapIn">
    <wsdl:part name="parameters" element="tns:GiveMe_Delete_WNE" />
  </wsdl:message>
  <wsdl:message name="GiveMe_Delete_WNESoapOut">
    <wsdl:part name="parameters" element="tns:GiveMe_Delete_WNEResponse" />
  </wsdl:message>
  <wsdl:message name="GiveMe_Update_WNESoapIn">
    <wsdl:part name="parameters" element="tns:GiveMe_Update_WNE" />
  </wsdl:message>
  <wsdl:message name="GiveMe_Update_WNESoapOut">
    <wsdl:part name="parameters" element="tns:GiveMe_Update_WNEResponse" />
  </wsdl:message>
  <wsdl:message name="GiveMe_Update_SPOTLIGHTSoapIn">
    <wsdl:part name="parameters" element="tns:GiveMe_Update_SPOTLIGHT" />
  </wsdl:message>
  <wsdl:message name="GiveMe_Update_SPOTLIGHTSoapOut">
    <wsdl:part name="parameters" element="tns:GiveMe_Update_SPOTLIGHTResponse" />
  </wsdl:message>
  <wsdl:message name="GiveMe_Delete_SPOTLIGHTSoapIn">
    <wsdl:part name="parameters" element="tns:GiveMe_Delete_SPOTLIGHT" />
  </wsdl:message>
  <wsdl:message name="GiveMe_Delete_SPOTLIGHTSoapOut">
    <wsdl:part name="parameters" element="tns:GiveMe_Delete_SPOTLIGHTResponse" />
  </wsdl:message>
  <wsdl:portType name="ServiceSoap">
    <wsdl:operation name="HelloWorld">
      <wsdl:input message="tns:HelloWorldSoapIn" />
      <wsdl:output message="tns:HelloWorldSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Update">
      <wsdl:input message="tns:GiveMe_UpdateSoapIn" />
      <wsdl:output message="tns:GiveMe_UpdateSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Update_CALENDAR">
      <wsdl:input message="tns:GiveMe_Update_CALENDARSoapIn" />
      <wsdl:output message="tns:GiveMe_Update_CALENDARSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Update_FAQ">
      <wsdl:input message="tns:GiveMe_Update_FAQSoapIn" />
      <wsdl:output message="tns:GiveMe_Update_FAQSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Insert">
      <wsdl:input message="tns:GiveMe_InsertSoapIn" />
      <wsdl:output message="tns:GiveMe_InsertSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Delete">
      <wsdl:input message="tns:GiveMe_DeleteSoapIn" />
      <wsdl:output message="tns:GiveMe_DeleteSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Select_FAQ">
      <wsdl:input message="tns:GiveMe_Select_FAQSoapIn" />
      <wsdl:output message="tns:GiveMe_Select_FAQSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Insert_WNE">
      <wsdl:input message="tns:GiveMe_Insert_WNESoapIn" />
      <wsdl:output message="tns:GiveMe_Insert_WNESoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Delete_WNE">
      <wsdl:input message="tns:GiveMe_Delete_WNESoapIn" />
      <wsdl:output message="tns:GiveMe_Delete_WNESoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Update_WNE">
      <wsdl:input message="tns:GiveMe_Update_WNESoapIn" />
      <wsdl:output message="tns:GiveMe_Update_WNESoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Update_SPOTLIGHT">
      <wsdl:input message="tns:GiveMe_Update_SPOTLIGHTSoapIn" />
      <wsdl:output message="tns:GiveMe_Update_SPOTLIGHTSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Delete_SPOTLIGHT">
      <wsdl:input message="tns:GiveMe_Delete_SPOTLIGHTSoapIn" />
      <wsdl:output message="tns:GiveMe_Delete_SPOTLIGHTSoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="ServiceSoap" type="tns:ServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="HelloWorld">
      <soap:operation soapAction="http://tempuri.org/HelloWorld" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Update">
      <soap:operation soapAction="http://tempuri.org/GiveMe_Update" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Update_CALENDAR">
      <soap:operation soapAction="http://tempuri.org/GiveMe_Update_CALENDAR" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Update_FAQ">
      <soap:operation soapAction="http://tempuri.org/GiveMe_Update_FAQ" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Insert">
      <soap:operation soapAction="http://tempuri.org/GiveMe_Insert" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Delete">
      <soap:operation soapAction="http://tempuri.org/GiveMe_Delete" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Select_FAQ">
      <soap:operation soapAction="http://tempuri.org/GiveMe_Select_FAQ" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Insert_WNE">
      <soap:operation soapAction="http://tempuri.org/GiveMe_Insert_WNE" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Delete_WNE">
      <soap:operation soapAction="http://tempuri.org/GiveMe_Delete_WNE" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Update_WNE">
      <soap:operation soapAction="http://tempuri.org/GiveMe_Update_WNE" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Update_SPOTLIGHT">
      <soap:operation soapAction="http://tempuri.org/GiveMe_Update_SPOTLIGHT" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Delete_SPOTLIGHT">
      <soap:operation soapAction="http://tempuri.org/GiveMe_Delete_SPOTLIGHT" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="HelloWorld">
      <soap12:operation soapAction="http://tempuri.org/HelloWorld" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Update">
      <soap12:operation soapAction="http://tempuri.org/GiveMe_Update" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Update_CALENDAR">
      <soap12:operation soapAction="http://tempuri.org/GiveMe_Update_CALENDAR" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Update_FAQ">
      <soap12:operation soapAction="http://tempuri.org/GiveMe_Update_FAQ" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Insert">
      <soap12:operation soapAction="http://tempuri.org/GiveMe_Insert" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Delete">
      <soap12:operation soapAction="http://tempuri.org/GiveMe_Delete" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Select_FAQ">
      <soap12:operation soapAction="http://tempuri.org/GiveMe_Select_FAQ" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Insert_WNE">
      <soap12:operation soapAction="http://tempuri.org/GiveMe_Insert_WNE" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Delete_WNE">
      <soap12:operation soapAction="http://tempuri.org/GiveMe_Delete_WNE" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Update_WNE">
      <soap12:operation soapAction="http://tempuri.org/GiveMe_Update_WNE" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Update_SPOTLIGHT">
      <soap12:operation soapAction="http://tempuri.org/GiveMe_Update_SPOTLIGHT" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GiveMe_Delete_SPOTLIGHT">
      <soap12:operation soapAction="http://tempuri.org/GiveMe_Delete_SPOTLIGHT" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="Service">
    <wsdl:port name="ServiceSoap" binding="tns:ServiceSoap">
      <soap:address location="http://www.gruppompb.uk.com/service.asmx" />
    </wsdl:port>
    <wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12">
      <soap12:address location="http://www.gruppompb.uk.com/service.asmx" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

mi pare di aver capito che è questo il file che ti serviva giusto? se così non fosse dimmelo che ti mando anche il .disco se vuoi
scusa non sono molto ferrato lo so
grazie mille
Le tabelle per le due lingue sono entrambe in
HttpContext.Current.Server.MapPath("../../../../../../mdb-database/mpbluca/database/ONCEM_MARKET_DATI_2.mdb");
?

Ormai programmano tutti... ma la professionalità appartiene a pochi
Direi di no. Mi sembra che sia il web service ad aggiornare la tabella in inglese tramite la funzione
GiveMe_Insert_WNE

Ormai programmano tutti... ma la professionalità appartiene a pochi
39 messaggi dal 18 luglio 2014
ESATTO LA FUNZIONE GiveMe_Insert_WNE mi aggiunge un record alla tabella newsevent del database oncem_market_dati_2 e funziona bene aggiungo con l'applicativo e mi aggiorna anche il databse inglese. Funzionano anche update e delete.

il problema c'è quando richiamo GiveMe Insert che deve scrivere un record nella tabella firmsoft del databse ONCEM_MARKET_DATI. Il record viene aggiunto su db italiano ma non su quello inglese.
Quando creo il nuovo record e gli dico salva dovrebbe aggiornare entrambi i db ma Mi da errore on insert e l'ID del record che ho cercato di aggiungere e la riga viene salvata solo su db italiano.


[WebMethod]
    public string GiveMe_Insert(String ID, String Marca, String Modello, String Software, String Firmware, String Data, String NoteNew, String SoftwareVers, String FirmwareVers, String Visualizza)
    {
        String str_output_my;
        int i;
        int num_car;

        // ----- INSERT of a new elemen -----
        
        String ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + HttpContext.Current.Server.MapPath("~/mdb-database/mpbluca/database/ONCEM_MARKET_DATI.mdb");
        OleDbConnection cn = new OleDbConnection(ConnString);
        String sql_str;
        OleDbCommand comandoSQL;
      
        try
        {
            str_output_my = "IN";
            sql_str = "INSERT INTO dbo_Articoli_mia_FirmSoft (Marca , Modello , Software , Firmware , Data , NoteNew , SoftwareVers , FirmwareVers , ID_Rel , Visualizza ) " +
            " VALUES ('" + Marca + "','" + Modello + "','" + Software + "','" + Firmware + "','" + Data + "','" + NoteNew + "','" + SoftwareVers + "','" + FirmwareVers + "', " + Int32.Parse(ID) + " ,'" + Visualizza + "' )";
                        
            comandoSQL = new OleDbCommand(sql_str, cn);
            cn.Open();
            int records = (int)comandoSQL.ExecuteNonQuery();
            cn.Close();
        }
        catch (Exception e)
        {
            return "Error on Insert: " + ID;
        }
     

        str_output_my = "Inserted UK";

        return str_output_my;
    }

questo è il codice di GiveMe_Insert e si blocca a catch (Exception e) infatti da errore di inserimento.
39 messaggi dal 18 luglio 2014
hai bisogno di altro codice o altre info?. Forse questa volta mi sono spiegato meglio, la cosa che mi lascia basito è che gli altri insert funzionano, solo quello no. why?
grazie mille
Bene ci avviciniamo. Qual è l'errore? Stampa a video e.ToString() nel catch

Ormai programmano tutti... ma la professionalità appartiene a pochi
39 messaggi dal 18 luglio 2014
non ho capito bene la domanda cos'è il catch?
Io vedo nel mio applicativo una semplice tabella con tutti i record e quando do il comando salva, dopo aver aggiunto un record, nel campo stato compare error on id e il numero della riga come da codice sopra (return "Error on Insert: " + ID;)mentre quando un'operazione va a buon fine, compare la scritta result
catch (Exception e)
        {
            return "Error on Insert: " + ID;
        }


diventa

catch (Exception e)
        {
            return "Error on Insert: " + ID + "; " + e.ToString();
        }

Ormai programmano tutti... ma la professionalità appartiene a pochi

Torna al forum | Feed RSS

ASPItalia.com non è responsabile per il contenuto dei messaggi presenti su questo servizio, non avendo nessun controllo sui messaggi postati nei propri forum, che rappresentano l'espressione del pensiero degli autori.