Board index » delphi » Delphi 5 - ADO - MS SQL Server 2000

Delphi 5 - ADO - MS SQL Server 2000

Hi
There is a ADO patch to fix this problem. Please download it from borland
website.
http://info.borland.com/devsupport/delphi/mdac26.html

Sunjaya

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

news:3df8aa40$1@newsgroups.borland.com...
Quote
> Hi,

> I'm trying to connect to MS SQL with ADO within Delphi 5.

> The procedure ends up with following error:

> "Clas Exception EOleException. Message: Either EOF or BOF is true or
current
> record has been deleted. ... needs a current record"

> (This is a translation, because I am using a German Version of Delphi 5)

> This is the procedure:
> ----------------------

> procedure TForm1.Button3Click(Sender: TObject);

> var
>   ADOConnect : TADOConnection;
>   ADODataSet : TADODataSet;

> begin
>   ADOConnect := TADOConnection.Create (self);

>   ADOConnect.LoginPrompt := false;
>   ADOConnect.ConnectionString := 'Provider=SQLOLEDB.1;'
>     + 'Password=hidden;'
>     + 'Persist Security Info=True;'
>     + 'User ID=sa;'
>     + 'Initial Catalog=INTSYS;'
>     + 'Data Source=GO;'
>     + 'Use Procedure for Prepare=1;'
>     + 'Auto Translate=True;'
>     + 'Packet Size=4096;'
>     + 'Workstation ID=GO;'
>     + 'Use Encryption for Data=False;'
>     + 'Tag with column collation when possible=False';

>   ADOConnect.Open ('sa','hidden');

>   ADOConnect.CursorLocation := clUseClient; // oder: clUseServer

>   ADODataSet := TADODataSet.Create (self);
>   ADODataSet.Connection := ADOConnect;

>   ADODataSet.CommandType := cmdText;
>   ADODataSet.CommandText := 'SELECT * FROM [INTADMIN].[SYS010]';

>  ADODataSet.Open;

>   if ADODataSet.Eof then
>      ShowMessage ('No records!');

>   while not ADODataSet.eof do
>   begin
>     ShowMessage (ADODataSet.FieldByName('NAME').AsString);
>     ADODataSet.Next;
>   end; // while

>   ADODataSet.Close;
>   ADODataSet.Free;

>   ADOConnect.close;
>   ADOConnect.Free;

> end;

 

Re:Delphi 5 - ADO - MS SQL Server 2000


Ich glaube dir fehlt einfach ein adotable.first

I think, you are just missing an adotable.first

Regards max Odendahl

Re:Delphi 5 - ADO - MS SQL Server 2000


Hallo Max,

danke fr Deinen Tip, aber es lag wohl doch ein Bug im ADO von Delphi vor.
Der Patch hats behoben.

Klaus

"Max Odendahl" <max.odend...@t-online.de> schrieb im Newsbeitrag
news:atf3p1$vjd$00$1@news.t-online.com...

Quote
> Ich glaube dir fehlt einfach ein adotable.first

> I think, you are just missing an adotable.first

> Regards max Odendahl

Other Threads