Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error # 20 ????
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Error # 20 ????
Miscellaneous
Thread ID:
00843951
Message ID:
00843951
Views:
57
I use VFP 8.0 SP1 (but the users aren't). I prepare a cursor for print a report. My default CP is 1251, Every text is i Bulgarian. Here is my code:
CREATE CURSOR cTemp (ID C(10), Name (C40), nSum N(14,2))
INDEX ON UPPER(Name)+Id TAG cTemp

SELECT Rab && this table is in DE
SCAN
  && Here prepared some calculations
  nResult = MyFunction()

  SELECT cTemp
  APPEND BLANK
  REPLACE Id WITH Rab.Id, Name WITH Rab.Name, nSum WITH nResult
  SELECT Rab
ENDSCAN
&& When the user choose to print in matrix print I use RawPrint Class
&& created by Ramon F. Jaquez
IF lMatrix
   thisform.AddObject("PrintDev1", "RawPrint.VCX")
   mm1        = GetPrinter()
   IF EMPTY(mm1)
      RETURN
   ENDIF
   ThisForm.Printdev1.cPrinterName = ALLTRIM(mm1)
   ThisForm.Printdev1.cDocName     = "Printing"
   IF .NOT. ThisForm.Printdev1.oOpen()
      msg = "Printer is not ready!"
      DO CASE
         CASE ThisForm.Printdev1.nopenerror == 0
              msg = msg +" See the SPOOLER settings"
      OTHERWISE
             msg = msg + " Error # " +STR(ThisForm.Printdev1.nopenerror)
      ENDCASE
      MessageBox(msg, 16, "Warning")
      RETURN
   ENDIF
ENDIF

***********************************************
** Here in the code below VFP rises error # 20
** Strange is that on my machine (w/ user's data) this error never appears
** (only on user's :o(( )
** If the index is not by Name there is no problem
***********************************************
SELECT cTemp
GO TOP
SCAN
   IF lMatrix
      thisform.PrintDev1.oPrintMem(Id+" "+Name+STR(nSum,15,2)+CRLF)
   ELSE
      ?? Id+" "+Name+STR(nSum,15,2)+CRLF
   ENDIF
ENDSCAN
...
How I can solve the problem? Where to search?

TIA

Boris
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Next
Reply
Map
View

Click here to load this message in the networking platform