🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.database
Article #72

ADO for SQLServer 2000

#72
From: Ronny Louis
Date: Thu, 08 May 2003 14:09
42 lines
2507 bytes
Hello,

As I'm quite new to the whole Delphi-programming, I'm experiencing a problem
I cannot solve with any newsgroup this far yet. Maybe one of you can tell me
the answer for my problems, because I'm very sure it should be quite easy.

On my application I have a TADOCommand named "ADOCommand1" and a
TADODataSet named ADODataSet1

In the application I also have a TButton, with the following code:

    procedure TForm1.Button2Click(Sender: TObject);
    var nummer, code: integer;
    begin
      with ADOCommand1 do begin
        CommandText := 'SELECT t_ides, t_cuno, t_cdel ' +
        'FROM ttdssc017800 ' +
        'WHERE t_cdel = :parameter';
        CommandType := cmdText;
        val(advicenote.text,nummer,code);
        Parameters.ParamByName('parameter').Value := code;
        ADODataSet1.Recordset := Execute;
      end;
      afleveradres1.Text := adodataset1.recordset.Fields[0].Value;
    end;

When I now run the application, fill out the advicenote.text and click on
the button, I always see the message:

"Project labelprinter.exe raised exception clas EOleException with message
'Either BOF or EOF is True, or the current record has been deleted.
Requested operation requires a current record". Process stopped. Use Step or
Run to continue."

I'm sure the record exists, because I've been looking it up in the database,
but I noticed the type has a 4-byte integer...

Can anybody help me out with this one?

Kind regards,

    Ronny Louis
Technical Details
Message-ID: <b9dog2$kbp$1@reader10.wxs.nl>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.multikabel.nl!newsfeed.wxs.nl!textnews.wxs.nl!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 115d96,306a67b8944abfe3,start
X-Google-Attributes: gid115d96,public
X-Google-ArrivalTime: 2003-05-08 07:10:08 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.multikabel.nl!newsfeed.wxs.nl!textnews.wxs.nl!not-for-mail
From: "Ronny Louis" <rl@nospam.be>
Newsgroups: borland.public.delphi.database
Subject: ADO for SQLServer 2000
Date: Thu, 8 May 2003 16:09:48 +0200
Organization: Planet Internet
Lines: 46
Message-ID: <b9dog2$kbp$1@reader10.wxs.nl>
NNTP-Posting-Host: eudsloffice-213-49-38-24.hasselt.kpn.be
X-Trace: reader10.wxs.nl 1052403010 20857 213.49.38.24 (8 May 2003 14:10:10 GMT)
X-Complaints-To: abuse@planet.nl
NNTP-Posting-Date: 8 May 2003 14:10:10 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165