[Lazarus] Inactive Dataset
Marc Santhoff
M.Santhoff at t-online.de
Wed May 28 16:21:25 CEST 2008
Hi,
I'm not really sure if this is a c&p-error or the like, but ...
Am Mittwoch, den 28.05.2008, 10:32 +0200 schrieb Dave Coventry:
> Sorry,
>
> I should have been more specific....
>
> SQLQuery1.SQL.Text:='SELECT fname,
> sname,id,comboboxcourse,studentnumber,enquirydate,enquiryreferencenumber
> from registration WHERE fname=''Dave''';
> StringGrid1.RowCount:=2;
> SQLQuery1.SQL.Text:=sqlq;
... here you assign another string named sqlq and overwrite the nice SQL
from above.
Maybe that line is still in your code messing up the query?
HTH,
Marc
> SQLQuery1.Open;
> SQLQuery1.First;
> while not SQLQuery1.EOF do
> begin
> StringGrid1.Cells[0,i]:=SQLQuery1.FieldByName('fname').AsString;
> StringGrid1.Cells[1,i]:=SQLQuery1.FieldByName('sname').AsString;
> StringGrid1.Cells[2,i]:=SQLQuery1.FieldByName('id').AsString;
> StringGrid1.Cells[3,i]:=SQLQuery1.FieldByName('comboboxcourse').AsString;
> StringGrid1.Cells[4,i]:=SQLQuery1.FieldByName('studentnumber').AsString;
> StringGrid1.Cells[5,i]:=SQLQuery1.FieldByName('enquirydate').AsString;
> RecNumber:=RecNumber+','+SQLQuery1.FieldByName('enquiryreferencenumber').AsString;
> inc(i);
> StringGrid1.RowCount:=i+1;
> end;
> SQLQuery1.Close;
>
> On Wed, May 28, 2008 at 9:01 AM, Dave Coventry <dgcoventry at gmail.com> wrote:
> > Hi,
> >
> > I'm getting this: "operation cannot be performed on an inactive dataset".
> >
> > Googling (I'm on a slow dialup on someone else's line) seems to
> > indicate that the problem is with my Lazarus version.
> >
> > The version I'm using is 0.9.23 beta SVN rev 12712.
> >
> > I obviously can't download a new version of Lazarus...
> >
> > Can anyone advise me?
> >
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>
More information about the Lazarus
mailing list