Ignore:
Timestamp:
Mar 11, 2010, 7:21:43 PM (15 years ago)
Author:
george
Message:
  • Opraveno: Správně vylomítkování podřetězce SQL dotazu při volání exportu.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/dbc_export/DBCExport.pas

    r370 r380  
    8181  if HasOption('q', 'sql_query') then begin
    8282    SQLquery := GetOptionValue('q', 'sql_query');
     83    SQLquery := StringReplace(SQLquery, '\ ', ' ', [rfReplaceAll]);
     84    SQLquery := StringReplace(SQLquery, '\`', '`', [rfReplaceAll]);
     85    WriteLn(SQLquery);
    8386  end;
    8487end;
     
    197200          for X := 1 to Length(ColumnTypeDefinition) do begin
    198201            if ColumnTypeDefinition[X] = 's' then begin
    199               Text := DBRows.Data[IndexRowData - 1].Values['text' + IntToStr(I)];
     202              Text := DBRows.Data[IndexRowData - 1].Values['Text' + IntToStr(I)];
    200203              SetString(Y, X - 1, Text);
    201204              I := I + 1;
     
    219222    Count := DBRows.Count;
    220223    for I := 1 to Count do begin
    221       Entry := StrToInt(DBRows.Data[i - 1].Values['entry']);
     224      Entry := StrToInt(DBRows.Data[I - 1].Values['Entry']);
    222225
    223226      if (I = 127) then SetLength(IndexTable, Entry + 1);
     
    238241  try
    239242    for I := 0 to DBRows.Count - 1 do begin
    240       if (StrToInt(DBRows.Data[i].Values['entry']) = Entry) then begin
     243      if (StrToInt(DBRows.Data[i].Values['Entry']) = Entry) then begin
    241244        Result := I;
    242245        Exit;
Note: See TracChangeset for help on using the changeset viewer.