Template Errors: PAGE_CONTAINER

  1. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 492:
    491: $headerTabHeight_outer = '';
    492: $headerTabHeight_outer .= (XenForo_Template_Helper_Core::styleProperty('headerTabHeight') + XenForo_Template_Helper_Core::styleProperty('navTabs.border-top-width') + XenForo_Template_Helper_Core::styleProperty('navTabs.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('navTabs.padding-top') + XenForo_Template_Helper_Core::styleProperty('navTabs.padding-bottom'));
    493: $__compilerVar509 .= '
    
  2. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 492:
    491: $headerTabHeight_outer = '';
    492: $headerTabHeight_outer .= (XenForo_Template_Helper_Core::styleProperty('headerTabHeight') + XenForo_Template_Helper_Core::styleProperty('navTabs.border-top-width') + XenForo_Template_Helper_Core::styleProperty('navTabs.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('navTabs.padding-top') + XenForo_Template_Helper_Core::styleProperty('navTabs.padding-bottom'));
    493: $__compilerVar509 .= '
    
  3. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 492:
    491: $headerTabHeight_outer = '';
    492: $headerTabHeight_outer .= (XenForo_Template_Helper_Core::styleProperty('headerTabHeight') + XenForo_Template_Helper_Core::styleProperty('navTabs.border-top-width') + XenForo_Template_Helper_Core::styleProperty('navTabs.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('navTabs.padding-top') + XenForo_Template_Helper_Core::styleProperty('navTabs.padding-bottom'));
    493: $__compilerVar509 .= '
    
  4. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 492:
    491: $headerTabHeight_outer = '';
    492: $headerTabHeight_outer .= (XenForo_Template_Helper_Core::styleProperty('headerTabHeight') + XenForo_Template_Helper_Core::styleProperty('navTabs.border-top-width') + XenForo_Template_Helper_Core::styleProperty('navTabs.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('navTabs.padding-top') + XenForo_Template_Helper_Core::styleProperty('navTabs.padding-bottom'));
    493: $__compilerVar509 .= '
    
  5. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 496:
    495: $uix_fixedNavigationHeight_outer = '';
    496: $uix_fixedNavigationHeight_outer .= (XenForo_Template_Helper_Core::styleProperty('uix_fixedNavigationHeight') + XenForo_Template_Helper_Core::styleProperty('uix_fixedNavigation_style.border-top-width') + XenForo_Template_Helper_Core::styleProperty('uix_fixedNavigation_style.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('uix_fixedNavigation_style.padding-top') + XenForo_Template_Helper_Core::styleProperty('uix_fixedNavigation_style.padding-bottom'));
    497: $__compilerVar509 .= '
    
  6. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 496:
    495: $uix_fixedNavigationHeight_outer = '';
    496: $uix_fixedNavigationHeight_outer .= (XenForo_Template_Helper_Core::styleProperty('uix_fixedNavigationHeight') + XenForo_Template_Helper_Core::styleProperty('uix_fixedNavigation_style.border-top-width') + XenForo_Template_Helper_Core::styleProperty('uix_fixedNavigation_style.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('uix_fixedNavigation_style.padding-top') + XenForo_Template_Helper_Core::styleProperty('uix_fixedNavigation_style.padding-bottom'));
    497: $__compilerVar509 .= '
    
  7. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 496:
    495: $uix_fixedNavigationHeight_outer = '';
    496: $uix_fixedNavigationHeight_outer .= (XenForo_Template_Helper_Core::styleProperty('uix_fixedNavigationHeight') + XenForo_Template_Helper_Core::styleProperty('uix_fixedNavigation_style.border-top-width') + XenForo_Template_Helper_Core::styleProperty('uix_fixedNavigation_style.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('uix_fixedNavigation_style.padding-top') + XenForo_Template_Helper_Core::styleProperty('uix_fixedNavigation_style.padding-bottom'));
    497: $__compilerVar509 .= '
    
  8. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 496:
    495: $uix_fixedNavigationHeight_outer = '';
    496: $uix_fixedNavigationHeight_outer .= (XenForo_Template_Helper_Core::styleProperty('uix_fixedNavigationHeight') + XenForo_Template_Helper_Core::styleProperty('uix_fixedNavigation_style.border-top-width') + XenForo_Template_Helper_Core::styleProperty('uix_fixedNavigation_style.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('uix_fixedNavigation_style.padding-top') + XenForo_Template_Helper_Core::styleProperty('uix_fixedNavigation_style.padding-bottom'));
    497: $__compilerVar509 .= '
    
  9. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 501:
    500: $uix_tabLinksHeight_outer = '';
    501: $uix_tabLinksHeight_outer .= (XenForo_Template_Helper_Core::styleProperty('uix_tabLinksHeight') + XenForo_Template_Helper_Core::styleProperty('uix_tabLinks_style.padding-top') + XenForo_Template_Helper_Core::styleProperty('uix_tabLinks_style.padding-bottom') + XenForo_Template_Helper_Core::styleProperty('uix_tabLinks_style.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('uix_tabLinks_style.border-top-width'));
    502: $__compilerVar509 .= '
    
  10. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 501:
    500: $uix_tabLinksHeight_outer = '';
    501: $uix_tabLinksHeight_outer .= (XenForo_Template_Helper_Core::styleProperty('uix_tabLinksHeight') + XenForo_Template_Helper_Core::styleProperty('uix_tabLinks_style.padding-top') + XenForo_Template_Helper_Core::styleProperty('uix_tabLinks_style.padding-bottom') + XenForo_Template_Helper_Core::styleProperty('uix_tabLinks_style.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('uix_tabLinks_style.border-top-width'));
    502: $__compilerVar509 .= '
    
  11. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 505:
    504: $uix_tabLinksHeightSticky_outer = '';
    505: $uix_tabLinksHeightSticky_outer .= (XenForo_Template_Helper_Core::styleProperty('uix_tabLinksHeightSticky') + XenForo_Template_Helper_Core::styleProperty('uix_tabLinksSticky_style.padding-top') + XenForo_Template_Helper_Core::styleProperty('uix_tabLinksSticky_style.padding-bottom') + XenForo_Template_Helper_Core::styleProperty('uix_tabLinksSticky_style.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('uix_tabLinksSticky_style.border-top-width'));
    506: $__compilerVar509 .= '
    
  12. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 505:
    504: $uix_tabLinksHeightSticky_outer = '';
    505: $uix_tabLinksHeightSticky_outer .= (XenForo_Template_Helper_Core::styleProperty('uix_tabLinksHeightSticky') + XenForo_Template_Helper_Core::styleProperty('uix_tabLinksSticky_style.padding-top') + XenForo_Template_Helper_Core::styleProperty('uix_tabLinksSticky_style.padding-bottom') + XenForo_Template_Helper_Core::styleProperty('uix_tabLinksSticky_style.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('uix_tabLinksSticky_style.border-top-width'));
    506: $__compilerVar509 .= '
    
  13. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 505:
    504: $uix_tabLinksHeightSticky_outer = '';
    505: $uix_tabLinksHeightSticky_outer .= (XenForo_Template_Helper_Core::styleProperty('uix_tabLinksHeightSticky') + XenForo_Template_Helper_Core::styleProperty('uix_tabLinksSticky_style.padding-top') + XenForo_Template_Helper_Core::styleProperty('uix_tabLinksSticky_style.padding-bottom') + XenForo_Template_Helper_Core::styleProperty('uix_tabLinksSticky_style.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('uix_tabLinksSticky_style.border-top-width'));
    506: $__compilerVar509 .= '
    
  14. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 510:
    509: $userBar_headerTabHeight_outer = '';
    510: $userBar_headerTabHeight_outer .= (XenForo_Template_Helper_Core::styleProperty('uix_userBarHeight') + XenForo_Template_Helper_Core::styleProperty('uix_userBar_style.border-top-width') + XenForo_Template_Helper_Core::styleProperty('uix_userBar_style.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('uix_userBar_style.padding-top') + XenForo_Template_Helper_Core::styleProperty('uix_userBar_style.padding-bottom'));
    511: $__compilerVar509 .= '
    
  15. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 510:
    509: $userBar_headerTabHeight_outer = '';
    510: $userBar_headerTabHeight_outer .= (XenForo_Template_Helper_Core::styleProperty('uix_userBarHeight') + XenForo_Template_Helper_Core::styleProperty('uix_userBar_style.border-top-width') + XenForo_Template_Helper_Core::styleProperty('uix_userBar_style.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('uix_userBar_style.padding-top') + XenForo_Template_Helper_Core::styleProperty('uix_userBar_style.padding-bottom'));
    511: $__compilerVar509 .= '
    
  16. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 510:
    509: $userBar_headerTabHeight_outer = '';
    510: $userBar_headerTabHeight_outer .= (XenForo_Template_Helper_Core::styleProperty('uix_userBarHeight') + XenForo_Template_Helper_Core::styleProperty('uix_userBar_style.border-top-width') + XenForo_Template_Helper_Core::styleProperty('uix_userBar_style.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('uix_userBar_style.padding-top') + XenForo_Template_Helper_Core::styleProperty('uix_userBar_style.padding-bottom'));
    511: $__compilerVar509 .= '
    
  17. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 510:
    509: $userBar_headerTabHeight_outer = '';
    510: $userBar_headerTabHeight_outer .= (XenForo_Template_Helper_Core::styleProperty('uix_userBarHeight') + XenForo_Template_Helper_Core::styleProperty('uix_userBar_style.border-top-width') + XenForo_Template_Helper_Core::styleProperty('uix_userBar_style.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('uix_userBar_style.padding-top') + XenForo_Template_Helper_Core::styleProperty('uix_userBar_style.padding-bottom'));
    511: $__compilerVar509 .= '
    
  18. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 514:
    513: $userBar_uix_fixedNavigationHeight_outer = '';
    514: $userBar_uix_fixedNavigationHeight_outer .= (XenForo_Template_Helper_Core::styleProperty('uix_fixedUserBarHeight') + XenForo_Template_Helper_Core::styleProperty('uix_fixedUserBar_style.border-top-width') + XenForo_Template_Helper_Core::styleProperty('uix_fixedUserBar_style.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('uix_fixedUserBar_style.padding-top') + XenForo_Template_Helper_Core::styleProperty('uix_fixedUserBar_style.padding-bottom'));
    515: $__compilerVar509 .= '
    
  19. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 514:
    513: $userBar_uix_fixedNavigationHeight_outer = '';
    514: $userBar_uix_fixedNavigationHeight_outer .= (XenForo_Template_Helper_Core::styleProperty('uix_fixedUserBarHeight') + XenForo_Template_Helper_Core::styleProperty('uix_fixedUserBar_style.border-top-width') + XenForo_Template_Helper_Core::styleProperty('uix_fixedUserBar_style.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('uix_fixedUserBar_style.padding-top') + XenForo_Template_Helper_Core::styleProperty('uix_fixedUserBar_style.padding-bottom'));
    515: $__compilerVar509 .= '
    
  20. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 514:
    513: $userBar_uix_fixedNavigationHeight_outer = '';
    514: $userBar_uix_fixedNavigationHeight_outer .= (XenForo_Template_Helper_Core::styleProperty('uix_fixedUserBarHeight') + XenForo_Template_Helper_Core::styleProperty('uix_fixedUserBar_style.border-top-width') + XenForo_Template_Helper_Core::styleProperty('uix_fixedUserBar_style.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('uix_fixedUserBar_style.padding-top') + XenForo_Template_Helper_Core::styleProperty('uix_fixedUserBar_style.padding-bottom'));
    515: $__compilerVar509 .= '
    
  21. A non-numeric value encountered in /home/admin/web/codeby.net/public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 514:
    513: $userBar_uix_fixedNavigationHeight_outer = '';
    514: $userBar_uix_fixedNavigationHeight_outer .= (XenForo_Template_Helper_Core::styleProperty('uix_fixedUserBarHeight') + XenForo_Template_Helper_Core::styleProperty('uix_fixedUserBar_style.border-top-width') + XenForo_Template_Helper_Core::styleProperty('uix_fixedUserBar_style.border-bottom-width') + XenForo_Template_Helper_Core::styleProperty('uix_fixedUserBar_style.padding-top') + XenForo_Template_Helper_Core::styleProperty('uix_fixedUserBar_style.padding-bottom'));
    515: $__compilerVar509 .= '
    

При щелчке на ячейках Dbgrid загружать изображения в Image1 из БД

Тема в разделе "Delphi - FAQ", создана пользователем -, 9 окт 2010.

  1. Гость

    Репутация:
    0
    И снова здравствуйте... :rolleyes:
    У меня клиентское приложение по продаже автомобилей.
    Автомобили, имеющиеся в наличии выводятся в DBGrid (25 разных записей).
    При щелчке на ячейке с названием машины на форме должна возникать фотография этой машины, которая должна загружаться из БД (объект Image1), в БД есть поле Photo (тип-текстовый), где прописан путь к изображению (напр.: L:\Проектир_ИС_лаб\bmw.bmp)
    Вот как я пыталась это сделать:

    Код:
    unit LAB6Unit1;
    
    interface
    
    uses
    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    Dialogs, StdCtrls, ExtCtrls, Buttons, RpRender, RpRenderHTML, RpCon,
    RpConDS, RpDefine, RpRave, DB, ADODB, Grids, DBGrids;
    
    type
    TForm1 = class(TForm)
    DBGrid1: TDBGrid;
    RvProject1: TRvProject;
    RvDataSetConnection1: TRvDataSetConnection;
    RvRenderHTML1: TRvRenderHTML;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    Memo1: TMemo;
    BitBtn3: TBitBtn;
    RvProject2: TRvProject;
    RvDataSetConnection2: TRvDataSetConnection;
    Image1: TImage;
    Label1: TLabel;
    ADOConnection1: TADOConnection;
    ADOQuery1: TADOQuery;
    ADOQuery2: TADOQuery;
    DataSource1: TDataSource;
    DataSource2: TDataSource;
    procedure BitBtn1Click(Sender: TObject);
    procedure DBGrid1CellClick(Column: TColumn);
    private
    { Private declarations }
    public
    { Public declarations }
    end;
    
    var
    Form1: TForm1;
    
    implementation
    
    {$R *.dfm}
    
    procedure TForm1.BitBtn1Click(Sender: TObject); {информация о моделях, имеющихся в наличии}
    begin
    ADOQuery1.Active:=False;
    ADOQuery1.Close;
    ADOQuery1.SQL.Clear;
    ADOQuery1.SQL.Add('SELECT Name, Price, Data, Comments, Photo');
    ADOQuery1.SQL.Add('FROM Table1');
    ADOQuery1.Open;
    ADOQuery1.Active:=True;
    end;
    
    procedure TForm1.DBGrid1CellClick(Column: TColumn);
    var
    FN: string;
    begin
    Label1.Caption:=ADOQuery1.FieldByName('Name').AsString;
    Memo1.Lines.Text:=ADOQuery1.FieldByName('Comments').AsString;
    FN:=ADOQuery1.FieldByName('Photo').AsString;
    if FileExists(FN) then
    Image1.Picture.LoadFromFile(FN);
    end;
    end.
    Но программа вылетает с ошибкой raised exception class Einvalid Graphic with message 'Bitmap image is not valid'
    Также пробовала делать
    Код:
    procedure TForm1.DBGrid1CellClick(Column: TColumn);
    begin
    Label1.Caption:=ADOQuery1.FieldByName('Name').AsString;
    Memo1.Lines.Text:=ADOQuery1.FieldByName('Comments').AsString;
    Image1.Picture.LoadFromFile(Table1.FieldByname('Photo').AsString);
    end;
    Но тут уже ошибка "неизвестная переменная", да это и понятно... <_<
    Подскажите пожалуйста, как сделать чтобы при щелчках на ячейках фотографии машин загружались и отображались нормально! :what?:
     
  2. vital

    vital Больной Компом Детектед

    Репутация:
    0
    Регистрация:
    29 янв 2006
    Сообщения:
    2.431
    Симпатии:
    40
    А разве нету компонента по типу dbimage?

    Добавлено: А и еще. В папке дельфей(ну или там куда вы при утсановке сказали установить common files) есть папка демос. Там есть пример работы со стандартной базой, и там есть картинки.. С рыбками)
     
  3. DarkKnight

    DarkKnight Well-Known Member

    Репутация:
    0
    Регистрация:
    1 авг 2010
    Сообщения:
    653
    Симпатии:
    0
    Вообще смысл и подход верный, можно и так, можно через событие TADOTable (ADOTable1AfterScroll), обязательно проверить сначало на существование файла....
    А вообще хочется увидить работу результат : ShowMessage(Table1.FieldByname('Photo').AsString);

    Хм... а какая там переменная неизвестная????
     
Загрузка...

Поделиться этой страницей