Board index » delphi » ADO Append Method doesnt work :-( D5 MSSQL2000

ADO Append Method doesnt work :-( D5 MSSQL2000

Hello,

I am using Delphi 5 with ADO and I need to append Records to a table.

This is what I defined, but when I call Append I receive error, that the
dataset is "closed" (German translation). Does somebody know what is wrong
with my dataset?

Thanks in advance

Klaus

    ADOConnectOpenView.ConnectionString :=
        'Provider=MS SQL Server;'
      + 'Password=' + OVSAP + ';'
      + 'Persist Security Info=True;'
      + 'User ID=' + OVSAU + ';'
      + 'Initial Catalog='OpenView';'
      + 'Data Source='GO;'
      + 'Use Procedure for Prepare=1;'
      + 'Auto Translate=True;'
      + 'Packet Size=4096;'
      + 'Use Encryption for Data=False;'
      + 'Tag with column collation when possible=False';

  ADODataSetCommitment := TADODataSet.Create (self);
  ADODataSetCommitment.Connection := ADOConnectOpenView;
  ADODataSetCommitment.CursorType := ctDynamic;
  ADODataSetCommitment.LockType := ltPessimistic;

  ADODataSetCommitment.CommandType := cmdTable;
  ADODataSetCommitment.CommandText := 'COMM01';

    try
      ADODataSetCommitment.Append;

 

Re:ADO Append Method doesnt work :-( D5 MSSQL2000


It is closed. ADODataSetCommitment.Open before ADODataSetCommitment.Append.

Quote
"Klaus Gollin" <xkgol...@t-online.de> wrote in message

news:3e5c9664@newsgroups.borland.com...
Quote
> Hello,

> I am using Delphi 5 with ADO and I need to append Records to a table.

> This is what I defined, but when I call Append I receive error, that the
> dataset is "closed" (German translation). Does somebody know what is wrong
> with my dataset?

> Thanks in advance

> Klaus

>     ADOConnectOpenView.ConnectionString :=
>         'Provider=MS SQL Server;'
>       + 'Password=' + OVSAP + ';'
>       + 'Persist Security Info=True;'
>       + 'User ID=' + OVSAU + ';'
>       + 'Initial Catalog='OpenView';'
>       + 'Data Source='GO;'
>       + 'Use Procedure for Prepare=1;'
>       + 'Auto Translate=True;'
>       + 'Packet Size=4096;'
>       + 'Use Encryption for Data=False;'
>       + 'Tag with column collation when possible=False';

>   ADODataSetCommitment := TADODataSet.Create (self);
>   ADODataSetCommitment.Connection := ADOConnectOpenView;
>   ADODataSetCommitment.CursorType := ctDynamic;
>   ADODataSetCommitment.LockType := ltPessimistic;

>   ADODataSetCommitment.CommandType := cmdTable;
>   ADODataSetCommitment.CommandText := 'COMM01';

>     try
>       ADODataSetCommitment.Append;

Other Threads