🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #17644

Re: Access Violation ERROR! Help me!

#17644
From: Tuga
Date: Fri, 07 Mar 2003 20:53
54 lines
2485 bytes
Thanks for reply.
I think this hapens because i try to print out of the print area.
Take a look please.
I've got this code:

dtsRelCustos->DataSet->First();
   for(i=0; i<dtsRelCustos->DataSet->RecordCount; i++)
   {
      iStartX = 70;
      for(j=0; j<dtsRelCustos->DataSet->FieldCount; j++)
      {
         linha = dtsRelCustos->DataSet->Fields->Fields[j]->Text;

Printer()->Canvas->TextOut(iStartX,iStartY+iLineHeight*iLineNumber-1,
                                    linha);
         if(len[j]>15)     // This is justo to format the alinment of the
text.
            iStartX += (len[j] * 25);
         else
            iStartX += (len[j] * 30);
      }
      if(Printer()->Canvas->PenPos.y+2*iLineHeight >=
            Printer()->PageHeight)
      {
         Printer()->NewPage();
         iLineNumber = 3;
      }
      else
      {
         iLineNumber++;
      }
      linha = "";
      if(i<dtsRelCustos->DataSet->RecordCount - 1)
         dtsRelCustos->DataSet->Next();
   }

What's the problem?


"JD" <nospam@nospam.com> escreveu na mensagem
news:3e61e7bd$1@newsgroups.borland.com...
>
> "Tuga" <nmp@ispgaya.pt> wrote:
> > When i try to print i receive an error like this:
> >
> > Access violation at adress 325025E0 in module 'CC3250mt.dll'.
> > Write of adress 00000008. But the printers prints anyway.
>
> I'm simply not hip to what the error message means but what
> ever the case, someone will most likely need to see your code
> to track it down.
>
> ~ JD
>
Technical Details
Message-ID: <3e690548@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3e5fd484@newsgroups.borland.com> <3e61e7bd$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,c1110153f4f88ad7,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-03-07 12:53:11 PST
From: "Tuga" <nuno@paquete.dynu.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References:  <3e5fd484@newsgroups.borland.com> <3e61e7bd$1@newsgroups.borland.com>
Subject: Re: Access Violation ERROR! Help me!
Date: Fri, 7 Mar 2003 20:53:18 -0000
Lines: 56
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
NNTP-Posting-Host: 213.22.154.95
Message-ID: <3e690548@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1047070024 213.22.154.95 (7 Mar 2003 12:47:04 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail