Показать сообщение отдельно
  #11  
Старый 03.09.2008, 12:55
AlexSku AlexSku вне форума
Специалист
 
Регистрация: 07.05.2007
Адрес: Москва
Сообщения: 884
Репутация: 21699
По умолчанию

Начало utit'а:
Код:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DB, DBTables, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Query1: TQuery;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
Свойства Query1 и Params[0]:
Код:
object Form1: TForm1
  Left = 263
  Top = 103
  Width = 507
  Height = 395
  Caption = 'Form1'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object Button1: TButton
    Left = 40
    Top = 112
    Width = 75
    Height = 25
    Caption = 'Button1'
    TabOrder = 0
    OnClick = Button1Click
  end
  object Query1: TQuery
    DatabaseName = 'DBDEMOS'
    SQL.Strings = (

        'SELECT * FROM numbers WHERE firstname = :SearchString OR lastnam' +
        'e = :SearchString')
    Left = 40
    Top = 24
    ParamData = <
      item
        DataType = ftString
        Name = 'SearchString'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'SearchString'
        ParamType = ptInput
      end>
  end
end
Params[1], видимо, заполнился сам, так как это тот же самый параметр.
Ответить с цитированием