IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Composants VCL Delphi Discussion :

Erreur de vérification d'étendue


Sujet :

Composants VCL Delphi

  1. #1
    Membre régulier
    Inscrit en
    Avril 2010
    Messages
    138
    Détails du profil
    Informations forums :
    Inscription : Avril 2010
    Messages : 138
    Points : 113
    Points
    113
    Par défaut Erreur de vérification d'étendue
    Bonjour,
    Je développe une application sous delphi7 et firebird en utilisant les composants MDO .
    J'essaye de compiler mon application aujourd'hui puis quand je l’exécute un message d'erreur s'affiche 'Erreur de vérification d'étendue' après l’exécution Pas à pas le problème est arrivé dans cette procédure: qui est la même que IBCustomDataSet
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    procedure TMDOCustomDataSet.FetchCurrentRecordToBuffer(Qry: TMDOSQL; 
            RecordNumber: Integer; Buffer: PChar);
    var
      p: PRecordData;
      pbd: PBlobDataArray;
      i, j: Integer;
      LocalData: Pointer;
      LocalDate, LocalDouble: Double;
      LocalInt: Integer;
      LocalInt64: Int64;
      LocalCurrency: Currency;
      FieldsLoaded: Integer;
    begin
      p := PRecordData(Buffer);
      { Make sure blob cache is empty }
      pbd := PBlobDataArray(Buffer + FBlobCacheOffset);
      if RecordNumber > -1 then
        for i := 0 to BlobFieldCount - 1 do
          pbd^[i] := nil;
      { Get record information }
      p^.rdBookmarkFlag := bfCurrent;
      p^.rdFieldCount := Qry.Current.Count;
      p^.rdRecordNumber := RecordNumber;
      p^.rdUpdateStatus := usUnmodified;
      p^.rdCachedUpdateStatus := cusUnmodified;
      p^.rdSavedOffset := $FFFFFFFF;
      
      { Load up the fields }
      FieldsLoaded := FQSelect.Current.Count;
      j := 1;
      for i := 0 to Qry.Current.Count - 1 do
      begin
        if (Qry = FQSelect) then
          j := i + 1
        else begin
          if FieldsLoaded = 0 then
            break;
          j := FQSelect.FieldIndex[Qry.Current[i].Name] + 1;
          if j < 1 then
            continue
          else
            Dec(FieldsLoaded);
        end;
        with FQSelect.Current[j - 1].Data^ do
          if aliasname = 'MDO_INTERNAL_DBKEY' then {do not localize}
          begin
            if sqllen <= 8 then
              p^.rdDBKey := PFBDBKEY(Qry.Current[i].AsPointer)^;
            continue;
          end;
        if j > 0 then
        with p^ do
        begin
    // il arrête exactement dans cette ligne qui suit
          rdFields[j].fdDataType := Qry.Current[i].Data^.sqltype and (not 1);
          rdFields[j].fdDataScale := Qry.Current[i].Data^.sqlscale;
          rdFields[j].fdNullable := (Qry.Current[i].Data^.sqltype and 1 = 1);
          rdFields[j].fdIsNull := (rdFields[j].fdNullable and (Qry.Current[i].Data^.sqlind^ = -1));
          LocalData := Qry.Current[i].Data^.sqldata;
          case rdFields[j].fdDataType of
            SQL_TIMESTAMP:
            begin
              rdFields[j].fdDataSize := SizeOf(TDateTime);
              if RecordNumber >= 0 then
                LocalDate := TimeStampToMSecs(DateTimeToTimeStamp(Qry.Current[i].AsDateTime));
              LocalData := PChar(@LocalDate);
            end;
            SQL_TYPE_DATE:
            begin
              rdFields[j].fdDataSize := SizeOf(TDateTime);
              if RecordNumber >= 0 then
                LocalInt := DateTimeToTimeStamp(Qry.Current[i].AsDateTime).Date;
              LocalData := PChar(@LocalInt);
            end;
            SQL_TYPE_TIME:
            begin
              rdFields[j].fdDataSize := SizeOf(TDateTime);
              if RecordNumber >= 0 then
                LocalInt := DateTimeToTimeStamp(Qry.Current[i].AsDateTime).Time;
              LocalData := PChar(@LocalInt);
            end;
            SQL_SHORT, SQL_LONG:
            begin
              if (rdFields[j].fdDataScale = 0) then
              begin
                rdFields[j].fdDataSize := SizeOf(Integer);
                if RecordNumber >= 0 then
                  LocalInt := Qry.Current[i].AsLong;
                LocalData := PChar(@LocalInt);
              end
              else if (rdFields[j].fdDataScale >= (-4)) then
                   begin
                     rdFields[j].fdDataSize := SizeOf(Currency);
                     if RecordNumber >= 0 then
                       LocalCurrency := Qry.Current[i].AsCurrency;
                     LocalData := PChar(@LocalCurrency);
                   end
                   else begin
                     rdFields[j].fdDataSize := SizeOf(Double);
                     if RecordNumber >= 0 then
                       LocalDouble := Qry.Current[i].AsDouble;
                    LocalData := PChar(@LocalDouble);
                  end;
            end;
            SQL_INT64:
            begin
              if (rdFields[j].fdDataScale = 0) then
              begin
                rdFields[j].fdDataSize := SizeOf(Int64);
                if RecordNumber >= 0 then
                  LocalInt64 := Qry.Current[i].AsInt64;
                LocalData := PChar(@LocalInt64);
              end
              else if (rdFields[j].fdDataScale >= (-4)) then
                   begin
                     rdFields[j].fdDataSize := SizeOf(Currency);
                     if RecordNumber >= 0 then
                       LocalCurrency := Qry.Current[i].AsCurrency;
                       LocalData := PChar(@LocalCurrency);
                   end
                   else begin
                      rdFields[j].fdDataSize := SizeOf(Double);
                      if RecordNumber >= 0 then
                        LocalDouble := Qry.Current[i].AsDouble;
                      LocalData := PChar(@LocalDouble);
                   end
            end;
            SQL_DOUBLE, SQL_FLOAT, SQL_D_FLOAT:
            begin
              rdFields[j].fdDataSize := SizeOf(Double);
              if RecordNumber >= 0 then
                LocalDouble := Qry.Current[i].AsDouble;
              LocalData := PChar(@LocalDouble);
            end;
            SQL_VARYING:
            begin
              rdFields[j].fdDataSize := Qry.Current[i].Data^.sqllen;
              rdFields[j].fdDataLength := isc_vax_integer(Qry.Current[i].Data^.sqldata, 2);
              if RecordNumber >= 0 then
              begin
                if (rdFields[j].fdDataLength = 0) then
                  LocalData := nil
                else
                  LocalData := @Qry.Current[i].Data^.sqldata[2];
              end;
            end;
            else { SQL_TEXT, SQL_BLOB, SQL_ARRAY, SQL_QUAD }
            begin
              rdFields[j].fdDataSize := Qry.Current[i].Data^.sqllen;
              if (rdFields[j].fdDataType = SQL_TEXT) then
                rdFields[j].fdDataLength := rdFields[j].fdDataSize;
            end;
          end;
          if RecordNumber < 0 then
          begin
            rdFields[j].fdIsNull := True;
            rdFields[j].fdDataOfs := FRecordSize;
            Inc(FRecordSize, rdFields[j].fdDataSize);
          end
          else begin
            if rdFields[j].fdDataType = SQL_VARYING then
            begin
              if LocalData <> nil then
                Move(LocalData^, Buffer[rdFields[j].fdDataOfs], rdFields[j].fdDataLength)
            end
            else
              Move(LocalData^, Buffer[rdFields[j].fdDataOfs], rdFields[j].fdDataSize)
          end;
        end;
      end;
      WriteRecordCache(RecordNumber, PChar(p));
    end;
    Je pense que c'est arrivé à cause du changement d'heure d'été qui a changé aujourd'hui le 25.03.2012

    Grand problème qui ne me permet même pas d’accéder à mon application!

    Merci pour votre aide.

    Mina24

  2. #2
    Rédacteur/Modérateur

    Avatar de SergioMaster
    Homme Profil pro
    Développeur informatique retraité
    Inscrit en
    Janvier 2007
    Messages
    15 092
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 68
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Développeur informatique retraité
    Secteur : Industrie

    Informations forums :
    Inscription : Janvier 2007
    Messages : 15 092
    Points : 41 067
    Points
    41 067
    Billets dans le blog
    62
    Par défaut
    Citation Envoyé par mina24 Voir le message
    Je pense que c'est arrivé à cause du changement d'heure d'été qui a changé aujourd'hui le 25.03.2012
    a mon avis , rien a voir .
    Je serais curieux de connaitre la valeur de la variable i et comme il y a boucle , la valeur de Qry.Current.Count
    MVP Embarcadero
    Delphi installés : D3,D7,D2010,XE4,XE7,D10 (Rio, Sidney), D11 (Alexandria), D12 (Athènes)
    SGBD : Firebird 2.5, 3, SQLite
    générateurs États : FastReport, Rave, QuickReport
    OS : Window Vista, Windows 10, Windows 11, Ubuntu, Androïd

  3. #3
    Membre régulier
    Inscrit en
    Avril 2010
    Messages
    138
    Détails du profil
    Informations forums :
    Inscription : Avril 2010
    Messages : 138
    Points : 113
    Points
    113
    Par défaut
    J'ai réinstaller le composant de MDO et ça marche ,c'était un problème de ce composant je suppose!
    Merci

    Mina24

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Code erreur pour Erreur de verification d'étendue.
    Par sp2308 dans le forum Débuter
    Réponses: 2
    Dernier message: 09/02/2013, 23h07
  2. Erreur de vérification d'étendue
    Par yupa dans le forum Langage
    Réponses: 2
    Dernier message: 17/12/2009, 11h43
  3. vérification des erreurs d'un code C++
    Par nadjib2007 dans le forum C++Builder
    Réponses: 15
    Dernier message: 30/08/2007, 05h29
  4. [VBA-E] vérification des erreurs d'arrière plan
    Par WagaSeb dans le forum Macros et VBA Excel
    Réponses: 2
    Dernier message: 12/02/2007, 13h41
  5. Erreur de vérification étendue
    Par Soulama dans le forum Delphi
    Réponses: 14
    Dernier message: 20/10/2006, 16h21

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo