Enviando email: apheadlabel.zip

2 views
Skip to first unread message

Julio Cesar

unread,
Jun 17, 2005, 2:25:27 PM6/17/05
to Tool_De...@googlegroups.com
Boa Tarde a Todos,

Essa é para quem manja........

Estou precisando instalar este componente no d2005 e não estou conseguindo... acho que tem algo a ver com a herança das classes do mesmo.... na verdade o componente chega a ser instalado normalmente e quando tento coloca-lo no form da um erro.


OBS: win32


Agradeço desde já,

Júlio César Ferdinando
Qualy System Informática
www.qualysystem.com.br
julio...@qualysystem.com.br
(16) 3967-9131
apheadlabel.zip

Ton - Tool

unread,
Jun 17, 2005, 2:32:54 PM6/17/05
to Tool_De...@googlegroups.com

   Se for algo com Herança, vc vai precisar instalar os componentes ou acertar o Patch das classes que o contêm.

 

Heverton Carneiro

Tool Engenharia e Comércio de Sistemas Ltda.

Borland Learning e Solution Partner

Telefone: (15) 3224-2091

www.tool.com.br
www.borland.com.br

 

 



--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.7.6/19 - Release Date: 16/6/2005


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.7.6/19 - Release Date: 16/6/2005

Julio Cesar

unread,
Jun 17, 2005, 2:39:51 PM6/17/05
to Tool_De...@googlegroups.com
Ok Ton valeu pela resposta,

Só que tem um detalhe pois o mesmo contem classes nativas do delphi pelo
que eu pude perceber...


Julio


Julio Cesar escreveu:

> Boa Tarde a Todos,
>
> Essa é para quem manja........
>
> Estou precisando instalar este componente no d2005 e não estou
> conseguindo... acho que tem algo a ver com a herança das classes do
> mesmo.... na verdade o componente chega a ser instalado normalmente e
> quando tento coloca-lo no form da um erro.
>
>
> OBS: win32
>
>
> Agradeço desde já,
>
> Júlio César Ferdinando
> /*Qualy System Informática*/
> www.qualysystem.com.br
> julio...@qualysystem.com.br
> (16) 3967-9131
>
>------------------------------------------------------------------------
>
>No virus found in this incoming message.
>Checked by AVG Anti-Virus.
>Version: 7.0.323 / Virus Database: 267.7.8/22 - Release Date: 17/06/2005
>
>

Ton - Tool

unread,
Jun 17, 2005, 4:49:50 PM6/17/05
to Tool_De...@googlegroups.com
Pode haver algum erro de implementação no componente, o draw é um exemplo
de evento que dispara erros logo quando adicionado ao form se implementado
incorretamente.

Heverton Carneiro
Tool Engenharia e Comércio de Sistemas Ltda.
Borland Learning e Solution Partner
Telefone: (15) 3224-2091
www.tool.com.br
www.borland.com.br
-----Mensagem original-----
De: Tool_De...@googlegroups.com
[mailto:Tool_De...@googlegroups.com] Em nome de Julio Cesar
Enviada em: sexta-feira, 17 de junho de 2005 15:40
Para: Tool_De...@googlegroups.com
Assunto: [Tool_Delphi2005] Re: Enviando email: apheadlabel.zip
Version: 7.0.323 / Virus Database: 267.7.6/19 - Release Date: 16/6/2005


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.

Alexandre Trevizoli

unread,
Jun 19, 2005, 8:36:45 PM6/19/05
to Tool_De...@googlegroups.com
Pessoal estou com um problema, estou fazendo um ASP.NET usando ACCESS (usando BDP) qdo coloco a tabela o delphi cria o dataadapter e o connection ai configuro e crio o dataset, ai coloco DBWEBGRID o DBWEBNAVIGATOR e tudo funciona 100%, ai com asp rodando no cassini vou lá e deleto ou insiro uns dados, até ai tudo OK, mas quando fecho e inicio de novo tudo volta como antes, ou seja, os dados estão sendo modificados no DATASET, mas não estão indo pra tabela. Abaixo está o código, se alguém puder me dar um HELP agradeço. Cheguei até a comprar aquele DELPHI .NET DEVELOPERS GUIDE, mas o capitulo que fala de BDP tem umas 5 ou 6 paginas e mais nada. Se alguém tiver material sobre BDP por favor envie ai pro grupo ou pro meu e-mail pessoal. Estou apanhando tanto que pareço até estar aprendendo delphi pela primeira vez.
 
-----------------
 
 

unit noticias;
 
interface
 
uses
  System.Collections, System.ComponentModel,
  System.Data, System.Drawing, System.Web, System.Web.SessionState,
  System.Web.UI, System.Web.UI.WebControls, System.Web.UI.HtmlControls,
  System.Data.Common, Borland.Data.Provider, Borland.Data.Common,
  System.Globalization, Borland.Data.Web, System.Configuration;
 
type
  TWebNoticias = class(System.Web.UI.Page)
  {$REGION 'Designer Managed Code'}
  strict private
    procedure InitializeComponent;
    procedure DBWebGrid1_SelectedIndexChanged(sender: System.Object; e: System.EventArgs);
    procedure DBWebDataSource1_OnApplyChangesRequest(sender: System.Object; e: Borland.Data.Web.WebControlEventArgs);
    procedure DBWebCheckBox1_CheckedChanged(sender: System.Object; e: System.EventArgs);
    procedure Button1_Click(sender: System.Object; e: System.EventArgs);
    procedure Button2_Click(sender: System.Object; e: System.EventArgs);
    procedure DBWebNavigator1_Click(sender: System.Object; e: Borland.Data.Web.DBWebButtonClickArgs);
  {$ENDREGION}
  strict private
    procedure Page_Load(sender: System.Object; e: System.EventArgs);
  strict protected
    BdpDataAdapter1: Borland.Data.Provider.BdpDataAdapter;
    bdpSelectCommand1: Borland.Data.Provider.BdpCommand;
    bdpInsertCommand1: Borland.Data.Provider.BdpCommand;
    bdpUpdateCommand1: Borland.Data.Provider.BdpCommand;
    bdpDeleteCommand1: Borland.Data.Provider.BdpCommand;
    bdpConnection1: Borland.Data.Provider.BdpConnection;
    dsNoticias: System.Data.DataSet;
    DataTable1: System.Data.DataTable;
    DataColumn1: System.Data.DataColumn;
    DataColumn2: System.Data.DataColumn;
    DataColumn3: System.Data.DataColumn;
    DataColumn4: System.Data.DataColumn;
    DataColumn5: System.Data.DataColumn;
    DataColumn6: System.Data.DataColumn;
    DataColumn7: System.Data.DataColumn;
    DataColumn8: System.Data.DataColumn;
    DataColumn9: System.Data.DataColumn;
    DataColumn10: System.Data.DataColumn;
    DataColumn11: System.Data.DataColumn;
    DBWebDataSource1: Borland.Data.Web.DBWebDataSource;
    DBWebGrid1: Borland.Data.Web.DBWebGrid;
    DBWebNavigator1: Borland.Data.Web.DBWebNavigator;
    DBWebMemo2: Borland.Data.Web.DBWebMemo;
    Button1: System.Web.UI.WebControls.Button;
    Button2: System.Web.UI.WebControls.Button;
    DBWebTextBox1: Borland.Data.Web.DBWebTextBox;
    DBWebTextBox3: Borland.Data.Web.DBWebTextBox;
    DBWebTextBox2: Borland.Data.Web.DBWebTextBox;
    DBWebMemo1: Borland.Data.Web.DBWebMemo;
    DBWebMemo3: Borland.Data.Web.DBWebMemo;
    DBWebMemo4: Borland.Data.Web.DBWebMemo;
    DBWebCheckBox1: Borland.Data.Web.DBWebCheckBox;
    procedure OnInit(e: EventArgs); override;
  private
    { Private Declarations }
  public
    { Public Declarations }
  end;
 
implementation
 
uses menu, Global;
 
{$REGION 'Designer Managed Code'}
/// <summary>
/// Required method for Designer support -- do not modify
/// the contents of this method with the code editor.
/// </summary>
procedure TWebNoticias.InitializeComponent;
type
  TArrayOfSystem_Data_Common_DataTableMapping = array of System.Data.Common.DataTableMapping;
  TArrayOfSystem_Data_Common_DataColumnMapping = array of System.Data.Common.DataColumnMapping;
  TArrayOfSystem_Data_DataTable = array of System.Data.DataTable;
  TArrayOfSystem_Data_DataColumn = array of System.Data.DataColumn;
  TArrayOfSystem_Data_Constraint = array of System.Data.Constraint;
  TArrayOfString = array of string;
  TArrayOfWideChar = array of WideChar;
  TArrayOfByte = array of Byte;
var
  configurationAppSettings: System.Configuration.AppSettingsReader;
begin
  configurationAppSettings := System.Configuration.AppSettingsReader.Create;
  Self.BdpDataAdapter1 := Borland.Data.Provider.BdpDataAdapter.Create;
  Self.dsNoticias := System.Data.DataSet.Create;
  Self.DataTable1 := System.Data.DataTable.Create;
  Self.DataColumn1 := System.Data.DataColumn.Create;
  Self.DataColumn2 := System.Data.DataColumn.Create;
  Self.DataColumn3 := System.Data.DataColumn.Create;
  Self.DataColumn4 := System.Data.DataColumn.Create;
  Self.DataColumn5 := System.Data.DataColumn.Create;
  Self.DataColumn6 := System.Data.DataColumn.Create;
  Self.DataColumn7 := System.Data.DataColumn.Create;
  Self.DataColumn8 := System.Data.DataColumn.Create;
  Self.DataColumn9 := System.Data.DataColumn.Create;
  Self.DataColumn10 := System.Data.DataColumn.Create;
  Self.DataColumn11 := System.Data.DataColumn.Create;
  Self.bdpDeleteCommand1 := Borland.Data.Provider.BdpCommand.Create;
  Self.bdpConnection1 := Borland.Data.Provider.BdpConnection.Create;
  Self.bdpInsertCommand1 := Borland.Data.Provider.BdpCommand.Create;
  Self.bdpSelectCommand1 := Borland.Data.Provider.BdpCommand.Create;
  Self.bdpUpdateCommand1 := Borland.Data.Provider.BdpCommand.Create;
  Self.DBWebDataSource1 := Borland.Data.Web.DBWebDataSource.Create;
  (System.ComponentModel.ISupportInitialize(Self.BdpDataAdapter1)).BeginInit;
  (System.ComponentModel.ISupportInitialize(Self.dsNoticias)).BeginInit;
  (System.ComponentModel.ISupportInitialize(Self.DataTable1)).BeginInit;
  (System.ComponentModel.ISupportInitialize(Self.DBWebDataSource1)).BeginInit;
  Include(Self.DBWebGrid1.SelectedIndexChanged, Self.DBWebGrid1_SelectedIndexChanged);
  Include(Self.DBWebNavigator1.Click, Self.DBWebNavigator1_Click);
  Include(Self.Button1.Click, Self.Button1_Click);
  Include(Self.Button2.Click, Self.Button2_Click);
  //
  // BdpDataAdapter1
  //
  Self.BdpDataAdapter1.Active := False;
  Self.BdpDataAdapter1.DataSet := Self.dsNoticias;
  Self.BdpDataAdapter1.DataTable := Self.DataTable1;
  Self.BdpDataAdapter1.DeleteCommand := Self.bdpDeleteCommand1;
  Self.BdpDataAdapter1.InsertCommand := Self.bdpInsertCommand1;
  Self.BdpDataAdapter1.MaxRecords := 0;
  Self.BdpDataAdapter1.MissingMappingAction := System.Data.MissingMappingAction.Error;
  Self.BdpDataAdapter1.MissingSchemaAction := System.Data.MissingSchemaAction.Error;
  Self.BdpDataAdapter1.SelectCommand := Self.bdpSelectCommand1;
  Self.BdpDataAdapter1.StartRecord := 0;
  Self.BdpDataAdapter1.TableMappings.AddRange(TArrayOfSystem_Data_Common_DataTableMapping.Create(System.Data.Common.DataTableMapping.Create('T' +
          'able', 'noticias', TArrayOfSystem_Data_Common_DataColumnMapping.Create(System.Data.Common.DataColumnMapping.Create('i' +
                'd', 'id'), System.Data.Common.DataColumnMapping.Create('tit' +
                'ulo_br', 'titulo_br'), System.Data.Common.DataColumnMapping.Create('t' +
                'itulo_ing', 'titulo_ing'), System.Data.Common.DataColumnMapping.Create('t' +
                'itulo_esp', 'titulo_esp'), System.Data.Common.DataColumnMapping.Create('n' +
                'oticia_br', 'noticia_br'), System.Data.Common.DataColumnMapping.Create('n' +
                'oticia_ing', 'noticia_ing'), System.Data.Common.DataColumnMapping.Create('n' +
                'oticia_esp', 'noticia_esp'), System.Data.Common.DataColumnMapping.Create('i' +
                'magem', 'imagem'), System.Data.Common.DataColumnMapping.Create('d' +
                'ata_entrada', 'data_entrada'), System.Data.Common.DataColumnMapping.Create('d' +
                'ata_saida', 'data_saida'), System.Data.Common.DataColumnMapping.Create('h' +
                'tml', 'html')))));
  Self.BdpDataAdapter1.UpdateCommand := Self.bdpUpdateCommand1;
  //
  // dsNoticias
  //
  Self.dsNoticias.DataSetName := 'NewDataSet';
  Self.dsNoticias.Locale := System.Globalization.CultureInfo.Create('pt-BR');
  Self.dsNoticias.Tables.AddRange(TArrayOfSystem_Data_DataTable.Create(Self.DataTable1));
  //
  // DataTable1
  //
  Self.DataTable1.Columns.AddRange(TArrayOfSystem_Data_DataColumn.Create(Self.DataColumn1,
          Self.DataColumn2, Self.DataColumn3, Self.DataColumn4, Self.DataColumn5,
          Self.DataColumn6, Self.DataColumn7, Self.DataColumn8, Self.DataColumn9,
          Self.DataColumn10, Self.DataColumn11));
  Self.DataTable1.Constraints.AddRange(TArrayOfSystem_Data_Constraint.Create(System.Data.UniqueConstraint.Create('C' +
          'onstraint1', TArrayOfString.Create('id'), True)));
  Self.DataTable1.PrimaryKey := TArrayOfSystem_Data_DataColumn.Create(Self.DataColumn1);
  Self.DataTable1.TableName := 'noticias';
  //
  // DataColumn1
  //
  Self.DataColumn1.AllowDBNull := False;
  Self.DataColumn1.ColumnName := 'id';
  Self.DataColumn1.DataType := TypeOf(Integer);
  //
  // DataColumn2
  //
  Self.DataColumn2.AllowDBNull := False;
  Self.DataColumn2.ColumnName := 'titulo_br';
  Self.DataColumn2.MaxLength := 200;
  //
  // DataColumn3
  //
  Self.DataColumn3.AllowDBNull := False;
  Self.DataColumn3.ColumnName := 'titulo_ing';
  Self.DataColumn3.MaxLength := 200;
  //
  // DataColumn4
  //
  Self.DataColumn4.AllowDBNull := False;
  Self.DataColumn4.ColumnName := 'titulo_esp';
  Self.DataColumn4.MaxLength := 50;
  //
  // DataColumn5
  //
  Self.DataColumn5.AllowDBNull := False;
  Self.DataColumn5.ColumnName := 'noticia_br';
  Self.DataColumn5.DataType := TypeOf(TArrayOfWideChar);
  //
  // DataColumn6
  //
  Self.DataColumn6.AllowDBNull := False;
  Self.DataColumn6.ColumnName := 'noticia_ing';
  Self.DataColumn6.DataType := TypeOf(TArrayOfWideChar);
  //
  // DataColumn7
  //
  Self.DataColumn7.AllowDBNull := False;
  Self.DataColumn7.ColumnName := 'noticia_esp';
  Self.DataColumn7.DataType := TypeOf(TArrayOfWideChar);
  //
  // DataColumn8
  //
  Self.DataColumn8.ColumnName := 'imagem';
  Self.DataColumn8.DataType := TypeOf(TArrayOfByte);
  //
  // DataColumn9
  //
  Self.DataColumn9.AllowDBNull := False;
  Self.DataColumn9.ColumnName := 'data_entrada';
  Self.DataColumn9.DataType := TypeOf(System.DateTime);
  //
  // DataColumn10
  //
  Self.DataColumn10.AllowDBNull := False;
  Self.DataColumn10.ColumnName := 'data_saida';
  Self.DataColumn10.DataType := TypeOf(System.DateTime);
  //
  // DataColumn11
  //
  Self.DataColumn11.AllowDBNull := False;
  Self.DataColumn11.ColumnName := 'html';
  Self.DataColumn11.MaxLength := 1;
  //
  // bdpDeleteCommand1
  //
  Self.bdpDeleteCommand1.CommandOptions := nil;
  Self.bdpDeleteCommand1.CommandText := 'DELETE FROM noticias WHERE id = ?';
  Self.bdpDeleteCommand1.CommandType := System.Data.CommandType.Text;
  Self.bdpDeleteCommand1.Connection := Self.bdpConnection1;
  Self.bdpDeleteCommand1.ParameterCount := (SmallInt(1));
  Self.bdpDeleteCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('i' +
      'dOriginal', Borland.Data.Common.BdpType.Int32, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
        0, 'id', System.Data.DataRowVersion.Original, nil));
  Self.bdpDeleteCommand1.SchemaName := nil;
  Self.bdpDeleteCommand1.Transaction := nil;
  Self.bdpDeleteCommand1.UpdatedRowSource := System.Data.UpdateRowSource.Both;
  //
  // bdpConnection1
  //
  Self.bdpConnection1.ConnectionOptions := (string(configurationAppSettings.GetValue('b' +
    'dpConnection1.ConnectionOptions', TypeOf(string))));
  Self.bdpConnection1.ConnectionString := (string(configurationAppSettings.GetValue('b' +
    'dpConnection1.ConnectionString', TypeOf(string))));
  //
  // bdpInsertCommand1
  //
  Self.bdpInsertCommand1.CommandOptions := nil;
  Self.bdpInsertCommand1.CommandText := 'INSERT INTO noticias (id, titulo_br' +
  ', titulo_ing, titulo_esp, noticia_br, noticia_ing, noticia_esp, imagem, d' +
  'ata_entrada, data_saida, html ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
  Self.bdpInsertCommand1.CommandType := System.Data.CommandType.Text;
  Self.bdpInsertCommand1.Connection := Self.bdpConnection1;
  Self.bdpInsertCommand1.ParameterCount := (SmallInt(11));
  Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('i' +
      'd', Borland.Data.Common.BdpType.Int32, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
        0, 'id', System.Data.DataRowVersion.Current, nil));
  Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('t' +
      'itulo_br', Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(200)), (Byte(0)),
        200, 'titulo_br', System.Data.DataRowVersion.Current, nil));
  Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('t' +
      'itulo_ing', Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(200)), (Byte(0)),
        200, 'titulo_ing', System.Data.DataRowVersion.Current, nil));
  Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('t' +
      'itulo_esp', Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(50)), (Byte(0)),
        50, 'titulo_esp', System.Data.DataRowVersion.Current, nil));
  Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('n' +
      'oticia_br', Borland.Data.Common.BdpType.Blob, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
        0, 'noticia_br', System.Data.DataRowVersion.Current, nil));
  Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('n' +
      'oticia_ing', Borland.Data.Common.BdpType.Blob, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
        0, 'noticia_ing', System.Data.DataRowVersion.Current, nil));
  Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('n' +
      'oticia_esp', Borland.Data.Common.BdpType.Blob, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
        0, 'noticia_esp', System.Data.DataRowVersion.Current, nil));
  Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('i' +
      'magem', Borland.Data.Common.BdpType.Blob, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
        0, 'imagem', System.Data.DataRowVersion.Current, nil));
  Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('d' +
      'ata_entrada', Borland.Data.Common.BdpType.DateTime, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
        0, 'data_entrada', System.Data.DataRowVersion.Current, nil));
  Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('d' +
      'ata_saida', Borland.Data.Common.BdpType.DateTime, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
        0, 'data_saida', System.Data.DataRowVersion.Current, nil));
  Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('h' +
      'tml', Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(1)), (Byte(0)),
        1, 'html', System.Data.DataRowVersion.Current, nil));
  Self.bdpInsertCommand1.SchemaName := nil;
  Self.bdpInsertCommand1.Transaction := nil;
  Self.bdpInsertCommand1.UpdatedRowSource := System.Data.UpdateRowSource.None;
  //
  // bdpSelectCommand1
  //
  Self.bdpSelectCommand1.CommandOptions := nil;
  Self.bdpSelectCommand1.CommandText := 'SELECT id, titulo_br, titulo_ing, t' +
  'itulo_esp, noticia_br, noticia_ing, noticia_esp, imagem, data_entrada, da' +
  'ta_saida, html FROM noticias';
  Self.bdpSelectCommand1.CommandType := System.Data.CommandType.Text;
  Self.bdpSelectCommand1.Connection := Self.bdpConnection1;
  Self.bdpSelectCommand1.ParameterCount := (SmallInt(0));
  Self.bdpSelectCommand1.SchemaName := nil;
  Self.bdpSelectCommand1.Transaction := nil;
  Self.bdpSelectCommand1.UpdatedRowSource := System.Data.UpdateRowSource.None;
  //
  // bdpUpdateCommand1
  //
  Self.bdpUpdateCommand1.CommandOptions := nil;
  Self.bdpUpdateCommand1.CommandText := 'UPDATE noticias SET titulo_br = ?, ' +
  'titulo_ing = ?, titulo_esp = ?, noticia_br = ?, noticia_ing = ?, noticia_' +
  'esp = ?, imagem = ?, html = ? WHERE id = ?';
  Self.bdpUpdateCommand1.CommandType := System.Data.CommandType.Text;
  Self.bdpUpdateCommand1.Connection := Self.bdpConnection1;
  Self.bdpUpdateCommand1.ParameterCount := (SmallInt(9));
  Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('t' +
      'itulo_br', Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(200)), (Byte(0)),
        200, 'titulo_br', System.Data.DataRowVersion.Current, nil));
  Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('t' +
      'itulo_ing', Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(200)), (Byte(0)),
        200, 'titulo_ing', System.Data.DataRowVersion.Current, nil));
  Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('t' +
      'itulo_esp', Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(50)), (Byte(0)),
        50, 'titulo_esp', System.Data.DataRowVersion.Current, nil));
  Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('n' +
      'oticia_br', Borland.Data.Common.BdpType.Blob, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
        0, 'noticia_br', System.Data.DataRowVersion.Current, nil));
  Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('n' +
      'oticia_ing', Borland.Data.Common.BdpType.Blob, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
        0, 'noticia_ing', System.Data.DataRowVersion.Current, nil));
  Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('n' +
      'oticia_esp', Borland.Data.Common.BdpType.Blob, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
        0, 'noticia_esp', System.Data.DataRowVersion.Current, nil));
  Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('i' +
      'magem', Borland.Data.Common.BdpType.Blob, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
        0, 'imagem', System.Data.DataRowVersion.Current, nil));
  Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('h' +
      'tml', Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(1)), (Byte(0)),
        1, 'html', System.Data.DataRowVersion.Current, nil));
  Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('i' +
      'dOriginal', Borland.Data.Common.BdpType.Int32, Borland.Data.Common.BdpType.Unknown,
        0, System.Data.ParameterDirection.Input, False, (Byte(0)), (Byte(0)),
        0, 'id', System.Data.DataRowVersion.Original, nil));
  Self.bdpUpdateCommand1.SchemaName := nil;
  Self.bdpUpdateCommand1.Transaction := nil;
  Self.bdpUpdateCommand1.UpdatedRowSource := System.Data.UpdateRowSource.None;
  //
  // DBWebDataSource1
  //
  Self.DBWebDataSource1.AutoRefresh := True;
  Self.DBWebDataSource1.AutoUpdateCache := True;
  Self.DBWebDataSource1.DataSource := Self.DataTable1;
  Self.DBWebDataSource1.ErrorDlgBackColor := System.Drawing.Color.Azure;
  Self.DBWebDataSource1.ErrorDlgBorderColor := System.Drawing.Color.Red;
  Self.DBWebDataSource1.ErrorDlgForeColor := System.Drawing.Color.Black;
  Include(Self.DBWebDataSource1.OnApplyChangesRequest, Self.DBWebDataSource1_OnApplyChangesRequest);
  Include(Self.Load, Self.Page_Load);
  (System.ComponentModel.ISupportInitialize(Self.BdpDataAdapter1)).EndInit;
  (System.ComponentModel.ISupportInitialize(Self.dsNoticias)).EndInit;
  (System.ComponentModel.ISupportInitialize(Self.DataTable1)).EndInit;
  (System.ComponentModel.ISupportInitialize(Self.DBWebDataSource1)).EndInit;
end;
{$ENDREGION}
 
procedure TWebNoticias.Page_Load(sender: System.Object; e: System.EventArgs);
begin
  // TODO: Put user code to initialize the page here
//  if not IsPostBack then
    DataBind;
 
end;
 
procedure TWebNoticias.OnInit(e: EventArgs);
begin
  //
  // Required for Designer support
  //
  InitializeComponent;
  inherited OnInit(e);
  BdpDataAdapter1.Active:=true;
end;
 
procedure TWebNoticias.DBWebNavigator1_Click(sender: System.Object; e: Borland.Data.Web.DBWebButtonClickArgs);
begin
  if dsNoticias.HasChanges then
    BdpDataAdapter1.AutoUpdate;
 
end;
 
procedure TWebNoticias.Button2_Click(sender: System.Object; e: System.EventArgs);
begin
  if dsNoticias.HasChanges then dsNoticias.RejectChanges;
end;
 
procedure TWebNoticias.Button1_Click(sender: System.Object; e: System.EventArgs);
begin
  if dsNoticias.HasChanges then
    BdpDataAdapter1.AutoUpdate;
end;
 
procedure TWebNoticias.DBWebCheckBox1_CheckedChanged(sender: System.Object; e: System.EventArgs);
begin

end;
 
procedure TWebNoticias.DBWebDataSource1_OnApplyChangesRequest(sender: System.Object;
  e: Borland.Data.Web.WebControlEventArgs);
begin
  BdpDataAdapter1.update(dsNoticias);
end;
 
 
end.
 
----------------
 
 
Alexandre Trevizoli
ale.tr...@wcainternet.com.br
WCA INTERNET & SYSTEMS
(16) 3916-3469
(16) 8134-7268
Reply all
Reply to author
Forward
0 new messages