none
une requête qui conclue : Les données de chaîne ou binaires seront tronquées. L'instruction a été arrêtée. RRS feed

Réponses

Toutes les réponses

  • bonjour

    J'ai une requête qui se conclue par "Les données de chaîne ou binaires seront tronquées.
    L'instruction a été arrêtée."

    Je ne trouve pas d'explications. Je vous donne le code et la valeur des données

    			if( dwNbResultFound == 0)
    			{//                                                                       1             2                3       4          5            6     7      8     9         10    11    12     13             14       15        16             17           18      19           20          21     22                   1    2    3    4    5    6    7   8    9    10   11   12   13   14   14   16   17   18      19   20   21    22        23
    				wsValue = L"";
    				wsName = L"";
    				wsDeclencheur = L"";
    				wsIdentifier = L"";
    				wsSujet = L"";
    				wsVerb = L"";
    				wsComplement = L"";
    				int idDocument =  CInterbaseManagerM::GetIdentifier(  L"T_PRECONDITION", L"" , L"" );
    			    idDocument++;
    				SqlCommand^ cmdDatabase = gcnew SqlCommand(L"INSERT INTO T_PRECONDITION ( nuIdPrecondition, TypeProposition, indice, Occurence, iEnumerated, iPOS, iPers, iNbr, TypeData, imin, imax, itype, idParagraph, nuIdDoc, ListParagraph, wsName, Declencheur, Identifier, Sujet, Verb, Complement, Comment) VALUES (@ID, @TP, @IN, @OC, @EN, @PO, @PE, @NB, @TD, @MI, @MA, @TY, @UP, @IDD, @LP, @UN,  @DE, @IDENT, @SU, @VE, @COM, @COMMENT);", CInterbaseManagerM::myConnexion);
    				cmdDatabase->Parameters->Add(L"@ID", SqlDbType::Int); // 1
    				cmdDatabase->Parameters["@ID"]->Value = idDocument;
    				cmdDatabase->Parameters->Add(L"@TP", SqlDbType::Int);
    				cmdDatabase->Parameters["@TP"]->Value = pPrecondition->TypeProposition;
    				cmdDatabase->Parameters->Add(L"@IN", SqlDbType::Int);
    				cmdDatabase->Parameters["@IN"]->Value = pPrecondition->indice;
    				cmdDatabase->Parameters->Add(L"@OC", SqlDbType::Int);
    				cmdDatabase->Parameters["@OC"]->Value = pPrecondition->Occurence;
    				// @ID, @TP, @IN, @OC, @EN, @PO, @PE, @NB, @TD, @MI, @MA, @TY, @ENU, @ST, @VW, @LP, @UN, @UP, @DE, @IDENT, @SU, @VE, @COM, @COMMENT, @IDD
    				cmdDatabase->Parameters->Add(L"@EN", SqlDbType::Int);
    				cmdDatabase->Parameters["@EN"]->Value = pPrecondition->iEnumerated;
    				cmdDatabase->Parameters->Add(L"@PO", SqlDbType::Int);
    				cmdDatabase->Parameters["@PO"]->Value = pPrecondition->iPOS;
    				cmdDatabase->Parameters->Add(L"@PE", SqlDbType::Int);
    				cmdDatabase->Parameters["@PE"]->Value = pPrecondition->iPers;
    				cmdDatabase->Parameters->Add(L"@NB", SqlDbType::Int);
    				cmdDatabase->Parameters["@NB"]->Value = pPrecondition->iNbr;
    				//cmdDatabase->Parameters->Add(L"@VA", SqlDbType::Int);
    				//cmdDatabase->Parameters["@VA"]->Value = pPrecondition->Values;
    				cmdDatabase->Parameters->Add(L"@TD", SqlDbType::Int); // 09
    				cmdDatabase->Parameters["@TD"]->Value = pPrecondition->TypeData;
    				//  @EN, @PO, @PE, @NB, @TD, @MI, @MA, @TY, @ENU, 
    				cmdDatabase->Parameters->Add(L"@MI", SqlDbType::Int); // 10
    				cmdDatabase->Parameters["@MI"]->Value = pPrecondition->min;
    				cmdDatabase->Parameters->Add(L"@MA", SqlDbType::Int);
    				cmdDatabase->Parameters["@MA"]->Value = pPrecondition->max;
    				cmdDatabase->Parameters->Add(L"@TY", SqlDbType::Int);
    				cmdDatabase->Parameters["@TY"]->Value =pPrecondition->type;
    				cmdDatabase->Parameters->Add(L"@UP", SqlDbType::Int);
    				cmdDatabase->Parameters["@UP"]->Value = pPrecondition->pUnivers->idParagraph;
    				cmdDatabase->Parameters->Add(L"@IDD", SqlDbType::Int);//27
    				cmdDatabase->Parameters["@IDD"]->Value = iIdDoc;
    				wsValue = L"'" +  pPrecondition->ListParagraph + L"'";
    				wsName = pPrecondition->pUnivers->wsName;
    				wsDeclencheur = L"'" + pPrecondition->Declencheur + L"'";
    				wsIdentifier = L"'" + pPrecondition->Identifier + L"'";
    				wsSujet = L"'" + pPrecondition->Sujet + L"'";
    				wsVerb = L"'" + pPrecondition->Verb + L"'";
    				wsComplement = L"'" + pPrecondition->Complement + L"'";
    				cmdDatabase->Parameters->Add(L"@LP", SqlDbType::VarChar);
    				cmdDatabase->Parameters["@LP"]->Value = wsValue;
    				cmdDatabase->Parameters->Add(L"@UN", SqlDbType::VarChar);
    				cmdDatabase->Parameters["@UN"]->Value = wsName;
    				cmdDatabase->Parameters->Add(L"@DE", SqlDbType::VarChar); // 20
    				cmdDatabase->Parameters["@DE"]->Value = wsDeclencheur;
    				cmdDatabase->Parameters->Add(L"@IDENT", SqlDbType::VarChar);
    				cmdDatabase->Parameters["@IDENT"]->Value = wsIdentifier;
    				// @SU, @VE, @COM, @COMMENT, @IDD
    				cmdDatabase->Parameters->Add(L"@SU", SqlDbType::VarChar);
    				cmdDatabase->Parameters["@SU"]->Value = wsSujet;
    				cmdDatabase->Parameters->Add(L"@VE", SqlDbType::VarChar);
    				cmdDatabase->Parameters["@VE"]->Value = wsVerb;
    				cmdDatabase->Parameters->Add(L"@COM", SqlDbType::VarChar);
    				cmdDatabase->Parameters["@COM"]->Value = wsComplement;
    				cmdDatabase->Parameters->Add(L"@COMMENT", SqlDbType::VarChar);
    				cmdDatabase->Parameters["@COMMENT"]->Value = pPrecondition->Comment;
    				//@ST, @VW, @LP, @UN, @UP, @DE, @CO, @IDENT, @SU, @VE, COM, @FR, @KV , @OP, @IDD
    				CInterbaseManagerM::ExecuteRequest( cmdDatabase, &dwNbResultFound);
    				CInterbaseManagerM::CloseInsertion( L"T_PRECONDITION");

    Les données de chaines sont dessous:

    ListParagraph vaut "12"

    wsName vaut "Mini lift gate"

    wsDeclencheur vaut "if "

    wsIdentifier vaut "12"

    wsSujet vaut "The mini lift gate release"

    wsVerb vaut "is pressed within T_EnableBootLidRelease seconds after The remote control mini lift gate release button was pressed once "

    wsComplement vaut ""

    //                     "1          10          20          30            40

    comment vaut "if the mini lift gate release is pressed within T_EnableBootLidRelease seconds after the remote control mini lift gate release button was pressed once"

    la chaine en cause est Comment...?

     Observation les chaines vides  passent bien dans d'autre cas.


    Jean Noël Martin



    lundi 25 août 2014 18:50
  • Il faut revoir la définition de la Database pour que le champ comment puisse être de 512 charactères

    Jean Noël Martin

    • Marqué comme réponse JeanNoel53 mardi 26 août 2014 15:57
    mardi 26 août 2014 15:57