Re: Digest Number 2261
Louis Nardozi <[email protected]> Thu, 07 Aug 2003 16:59:46 -0500
| Newsgroups | gmane.comp.lang.delphi.programming |
|---|---|
| Message-ID | <[email protected]> |
Don't you have to close the query before changing the parameters? At least we always do... Also does the query have Paramcheck turned on? If it doesn't you're going to have to do an explicit .prepare on the query. regards, Louis >From: "Brigitte Spatz" <[email protected]> >To: <[email protected]> >Sent: Thursday, August 07, 2003 1:11 PM >Subject: [Delphi] query returns no record > > > > >>SELECT P.Register, P.[First Name], AE.[Kind Of Event], AP.ID >>FROM Assured_Person AS AP, Person AS P, Assurance_Event AS AE >>WHERE AP.ID = AE.ID >>AND AP.[Person ID] = P.ID >>AND P.Register = :Register >>AND AE.[Kind Of Event] = :Event >> >>returns the correct records when run from within Access. When run from >>Delphi, it only returns the correct record on the first run but on >>consecutive calls to the following function returns a recordcount of 0 >>although both parameters have the correct values that do return a record >>in Access: >> >>procedure MakeTocLetters(NextRegister, Event: integer); >>begin >> with frmDMGenerator.qryGeneratorAssuranceEventDetails do >> begin >> Parameters[0].Value := Event; >> Parameters[1].Value := NextRegister; >> Open; >> if RecordCount > 0 then >> begin >> First; >> while not EOF do >> begin >> strScript := strScript + 'insDoc(' + >>AssuranceEventConcatenated(Event) + >> ', gLnk(0,' + QuotedStr(_('Letter for ') + '11-' + >>Fields[3].AsString) >> + ', ' + QuotedStr('11-' + IntToStr(NextRegister) + '-' + >> IntToStr(Event) + '-' + Fields[3].AsString + '.htm') + '))' + >>#13#10; >> Next; >> end; >> end; >> Close; >> end; >>end; >> >>I'm sure it must be something obvious but I can't see it. Any help >>appreciated. >> >>TIA. >> >>Brigitte >> >> >> >>[Non-text portions of this message have been removed] >> >> >> >>CodeCoffer - new Delphi code protection Tool! >>http://www.delphicollection.com/public/CodeCoffer.htm >>--------------------------------------------------------------- >>Unsubscribe:[email protected] >>List owner:[email protected] >>--------------------------------------------------------------- >> >>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ >> >> >> >> > > > >________________________________________________________________________ >________________________________________________________________________ > > > >Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ > > > > > ------------------------ Yahoo! Groups Sponsor ---------------------~--> Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511 http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/i7folB/TM ---------------------------------------------------------------------~-> CodeCoffer - new Delphi code protection Tool! http://www.delphicollection.com/public/CodeCoffer.htm --------------------------------------------------------------- Unsubscribe:[email protected] List owner:[email protected] --------------------------------------------------------------- Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/