Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #6776

Re: Error Code 50 with Subcode 5333

From JohnMartens <martens@tennishulp.info>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Error Code 50 with Subcode 5333
Date 2014-04-16 12:58 +0200
Organization A noiseless patient Spider
Message-ID <lilno8$nif$1@dont-email.me> (permalink)
References <3e012240-0c6d-4a2d-9d30-4690d3faf84e@googlegroups.com> <08d5c3d1-b4a9-4b9a-9ea2-7338c9d212a2@googlegroups.com> <49664af5-b2b9-46fb-a075-8f6406897fff@googlegroups.com>

Show all headers | View raw


Disable the controls which you want to keep unchanged during the thread 
and issue a ExecWhileEvent every once in a while to let other pasrts of 
your app do their job



Jürgen Knauf schreef op 16-4-2014 11:05:
> I need the thread for simultaneously typing and searching. Like in a Google Search machine.
>
>
> Am Mittwoch, 16. April 2014 08:47:37 UTC+2 schrieb Mathias:
>> Jurgen,
>>
>>
>>
>> I Think you should read the help texts about "Building a multithreaded web server with Visual Objects". Especially the part about thread synchronization. To access objects in the gui thread you have to use critical sections. You also have to read about dynamic memory management and the use of DynLock() and DynUnlock().
>>
>>
>>
>> /Mathias
>>
>>
>>
>> Den tisdagen den 15:e april 2014 kl. 14:42:53 UTC+2 skrev Jürgen Knauf:
>>
>>> Hi,
>>
>>>
>>
>>>
>>
>>>
>>
>>> I get often an Error Code 50 with Subcode 5333 on some machines. It occurs always in the search routine.
>>
>>>
>>
>>>
>>
>>>
>>
>>> This the search routine:
>>
>>>
>>
>>> ****************************************
>>
>>>
>>
>>> STATIC FUNCTION SqlSearch(dwParam) AS DWORD PASCAL
>>
>>>
>>
>>>   LOCAL dwRet AS DWORD
>>
>>>
>>
>>> // LOCAL hConn AS DWORD
>>
>>>
>>
>>>   LOCAL cText, cBed AS STRING
>>
>>>
>>
>>>   LOCAL oSql AS AdsSQLServer
>>
>>>
>>
>>>   LOCAL oWin AS OBJECT
>>
>>>
>>
>>>   LOCAL cSuche,cFeld, cLastFeld AS STRING
>>
>>>
>>
>>>   LOCAL nTreffer AS DWORD
>>
>>>
>>
>>>   LOCAL cdbPfad,cDatei,cdbDatei AS STRING
>>
>>>
>>
>>>   LOCAL aExtract AS ARRAY
>>
>>>
>>
>>>
>>
>>>
>>
>>>   oWin := OBJECT(_CAST, dwParam)
>>
>>>
>>
>>>   cDatei := oWin:cdbDatei
>>
>>>
>>
>>>
>>
>>>
>>
>>>   aExtract := ExtractPath(cDatei)
>>
>>>
>>
>>>   cdbPfad := aExtract[1]
>>
>>>
>>
>>>   cdbDatei := aExtract[2]
>>
>>>
>>
>>>
>>
>>>
>>
>>>   IF glConnect == 0 // LocalServer
>>
>>>
>>
>>>      dwRet := AdsConnect60(cdbPfad, ADS_LOCAL_SERVER, "", "", 0,@glConnect)
>>
>>>
>>
>>>
>>
>>>
>>
>>>      IF dwRet <> 0
>>
>>>
>>
>>>         AdsShowError( "" )
>>
>>>
>>
>>>         RETURN
>>
>>>
>>
>>>      ENDIF
>>
>>>
>>
>>>
>>
>>>
>>
>>>      AX_SetConnectionHandle(glConnect)
>>
>>>
>>
>>>   ENDIF
>>
>>>
>>
>>>
>>
>>>
>>
>>>   Sleep(1000) //Damit am Anfang nicht beim ersten Buchstaben gesucht wird.
>>
>>>
>>
>>>   oWin:nKatNr := 0
>>
>>>
>>
>>>
>>
>>>
>>
>>>   DO WHILE !oWin:lExit
>>
>>>
>>
>>>      GetAppObject():Exec(EXECWHILEEVENT)
>>
>>>
>>
>>>
>>
>>>
>>
>>>      DO CASE
>>
>>>
>>
>>>         CASE Upper(RTrim(oWin:oDCGrpSuche:VALUE)) == "RDKURZ"
>>
>>>
>>
>>>         cFeld := "KUERZEL"
>>
>>>
>>
>>>         CASE Upper(RTrim(oWin:oDCGrpSuche:VALUE)) == "RDBEZ"
>>
>>>
>>
>>>         cFeld := "BEZ"
>>
>>>
>>
>>>        CASE Upper(RTrim(oWin:oDCGrpSuche:VALUE)) == "RDVOLLTEXT"
>>
>>>
>>
>>>         cFeld := "SEARCH"
>>
>>>
>>
>>>        CASE Upper(RTrim(oWin:oDCGrpSuche:VALUE)) == "RDSW"
>>
>>>
>>
>>>         cFeld := "SW"
>>
>>>
>>
>>>      ENDCASE
>>
>>>
>>
>>>
>>
>>>
>>
>>>      IF (Upper(RTrim(oWin:oDCSuche:CurrentText)) != Upper(cSuche) .OR. cFeld != cLastFeld) .AND. !Empty(oWin:oDCSuche:CurrentText)
>>
>>>
>>
>>>         cSuche := Upper(RTrim(oWin:oDCSuche:CurrentText))
>>
>>>
>>
>>>         cLastFeld := cFeld
>>
>>>
>>
>>>
>>
>>>
>>
>>>
>>
>>>
>>
>>>
>>
>>>
>>
>>>         IF cFeld == "SEARCH"
>>
>>>
>>
>>>
>>
>>>
>>
>>>            IF oWin:lSearchKat
>>
>>>
>>
>>>               cBed := "SELECT * from ["+ cdbDatei+ "] WHERE (contains (SEARCH, "+"'"+cSuche+"*')) AND parnr IN "+oWin:cSearchCat
>>
>>>
>>
>>>            ELSE
>>
>>>
>>
>>>              cBed :=  "SELECT * FROM ["+ cdbDatei+ "] where contains (SEARCH, "+"'"+cSuche+"*')"
>>
>>>
>>
>>>            ENDIF
>>
>>>
>>
>>>
>>
>>>
>>
>>>         ELSE
>>
>>>
>>
>>>
>>
>>>
>>
>>>            IF oWin:lSearchKat
>>
>>>
>>
>>>               cBed :=  "SELECT * FROM ["+ cdbDatei+ "] where (contains (Upper("+cFeld+"), "+"'"+cSuche+"*')) AND parnr IN "+oWin:cSearchCat
>>
>>>
>>
>>>            ELSE
>>
>>>
>>
>>>               cBed :=  "SELECT * FROM ["+ cdbDatei+ "] where contains (Upper("+cFeld+"), "+"'"+cSuche+"*')"
>>
>>>
>>
>>>            ENDIF
>>
>>>
>>
>>>
>>
>>>
>>
>>>         ENDIF
>>
>>>
>>
>>>
>>
>>>
>>
>>>         IF oWin:oCCrdBez:Pressed .AND. oWin:oCCrdVolltext:Pressed
>>
>>>
>>
>>>
>>
>>>
>>
>>>            IF oWin:lSearchKat
>>
>>>
>>
>>>               cBed :=  "SELECT * FROM ["+ cdbDatei+ "] where (contains (SEARCH, "+"'"+cSuche+"*') or contains (BEZ, "+"'"+cSuche+"*')) AND parnr IN "+oWin:cSearchCat
>>
>>>
>>
>>>            ELSE
>>
>>>
>>
>>>               cBed :=  "SELECT * FROM ["+ cdbDatei+ "] where contains (SEARCH, "+"'"+cSuche+"*') or contains (BEZ, "+"'"+cSuche+"*')"
>>
>>>
>>
>>>            ENDIF
>>
>>>
>>
>>>
>>
>>>
>>
>>>         ENDIF
>>
>>>
>>
>>>             oWin:oDcStatusSuche:CurrentText:= "Suche läuft"
>>
>>>
>>
>>>
>>
>>>
>>
>>>             oSql:= AdsSQLServer{cBed, , , "AXSQLADT" }
>>
>>>
>>
>>>
>>
>>>
>>
>>>             IF !oSql:Used
>>
>>>
>>
>>>                AdsShowError( "" )
>>
>>>
>>
>>>                RETURN
>>
>>>
>>
>>>             ENDIF
>>
>>>
>>
>>>
>>
>>>
>>
>>>          oSql:GoTop()
>>
>>>
>>
>>>
>>
>>>
>>
>>>          cText := ""
>>
>>>
>>
>>>          nTreffer := 0
>>
>>>
>>
>>>
>>
>>>
>>
>>>          oWin:oDClbSuche:Clear()
>>
>>>
>>
>>>
>>
>>>
>>
>>>          DO WHILE !oSql:EoF .AND. nTreffer < 100
>>
>>>
>>
>>>
>>
>>>
>>
>>>             IF Len(oSql:FIELDGET(#Bez)) > 0
>>
>>>
>>
>>>                oWin:oDClbSuche:AddItem(oSql:FIELDGET(#Bez),,oSql:FIELDGET(#NR))
>>
>>>
>>
>>>             ENDIF
>>
>>>
>>
>>>
>>
>>>
>>
>>>             IF Upper(RTrim(oWin:oDCSuche:CurrentText)) != Upper(cSuche)
>>
>>>
>>
>>>                EXIT
>>
>>>
>>
>>>             ENDIF
>>
>>>
>>
>>>
>>
>>>
>>
>>>             oSql:Skip()
>>
>>>
>>
>>>             nTreffer++
>>
>>>
>>
>>>          ENDDO
>>
>>>
>>
>>>
>>
>>>
>>
>>>          IF nTreffer < 100
>>
>>>
>>
>>>             oWin:oDcStatusSuche:CurrentText := "Suche abgeschlossen"
>>
>>>
>>
>>>          ELSE
>>
>>>
>>
>>>             oWin:oDcStatusSuche:CurrentText := "Es wurden mehr als 100 Treffer gefunden"
>>
>>>
>>
>>>          ENDIF
>>
>>>
>>
>>>
>>
>>>
>>
>>>       ELSE
>>
>>>
>>
>>>           IF Empty(oWin:oDCSuche:CurrentText)
>>
>>>
>>
>>>              oWin:oDClbSuche:Clear()
>>
>>>
>>
>>>           ENDIF
>>
>>>
>>
>>>       ENDIF
>>
>>>
>>
>>>
>>
>>>
>>
>>>   ENDDO
>>
>>>
>>
>>>
>>
>>>
>>
>>>   oSql:close()
>>
>>>
>>
>>>   oSql := NULL_OBJECT
>>
>>>
>>
>>>   oWin:lExit := FALSE
>>
>>>
>>
>>>
>>
>>>
>>
>>>   RETURN 0
>>
>>>
>>
>>> ****************************************
>>
>>>
>>
>>>
>>
>>>
>>
>>> Any ideas?
>>
>>>
>>
>>>
>>
>>>
>>
>>> Juergen
>

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Error Code  50 with Subcode 5333 Jürgen Knauf <trotterklaus@googlemail.com> - 2014-04-15 05:42 -0700
  Re: Error Code  50 with Subcode 5333 "Jamal" <someone@example.com> - 2014-04-15 11:08 -0400
    Re: Error Code  50 with Subcode 5333 Jürgen Knauf <trotterklaus@googlemail.com> - 2014-04-15 09:19 -0700
    Re: Error Code  50 with Subcode 5333 Jürgen Knauf <trotterklaus@googlemail.com> - 2014-04-15 09:23 -0700
      Re: Error Code  50 with Subcode 5333 Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2014-04-15 19:52 +0200
      Re: Error Code  50 with Subcode 5333 "Jamal" <someone@example.com> - 2014-04-15 15:32 -0400
  Re: Error Code  50 with Subcode 5333 Mathias <mathias.hakansson@consultec.se> - 2014-04-15 23:47 -0700
    Re: Error Code  50 with Subcode 5333 Jürgen Knauf <trotterklaus@googlemail.com> - 2014-04-16 02:05 -0700
      Re: Error Code  50 with Subcode 5333 Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2014-04-16 11:51 +0200
        Re: Error Code  50 with Subcode 5333 Jürgen Knauf <trotterklaus@googlemail.com> - 2014-04-16 03:19 -0700
        Re: Error Code  50 with Subcode 5333 Jürgen Knauf <trotterklaus@googlemail.com> - 2014-04-16 04:34 -0700
          Re: Error Code  50 with Subcode 5333 Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2014-04-16 17:45 +0200
            Re: Error Code  50 with Subcode 5333 Jürgen Knauf <trotterklaus@googlemail.com> - 2014-04-16 09:16 -0700
              Re: Error Code  50 with Subcode 5333 Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2014-04-16 19:45 +0200
              Re: Error Code  50 with Subcode 5333 Carlos Rocha <FreeTheMusic@ascap.com> - 2014-04-16 22:04 +0100
      Re: Error Code  50 with Subcode 5333 JohnMartens <martens@tennishulp.info> - 2014-04-16 12:58 +0200
  Re: Error Code  50 with Subcode 5333 Sherlock <sherlock@sherlock.com.au> - 2014-04-16 04:19 -0700
  Re: Error Code  50 with Subcode 5333 Jürgen Knauf <trotterklaus@googlemail.com> - 2014-04-16 22:44 -0700
    Re: Error Code  50 with Subcode 5333 Jürgen Knauf <trotterklaus@googlemail.com> - 2014-04-18 02:55 -0700

csiph-web