[Gambas-user] Starnge with DB and IF

Dag-Jarle Johansen dag.jarle.johansen at ...626...
Sun Sep 25 02:00:12 CEST 2011


Well, here I am again, almost ashamed.

I shorten the source to the main thing:

Public sub ReafDB()

Dim RS as result
DIM S As string

SQL="Select * From APCtrl Where Pseudo='J' AND LC=" & m.LC & "'"
RS=msql.$ConU.Exec(SQL)
RS.Movefirst
(There is exactly on Record present, and with print RS!objname and Print
RS!CtrlInhalt I can see the result, even so with S and S2)
Now the strange:
S=RS!objname
IF S="Header" then
   S2=RS!CtrlInhalt
ENDIF
Me.Caption=S2
END
S="Header", definitly
S2="Anmelden", evenso

(I used S and S2 to check the content of the data)

I get the caption "Budget", which is the name of the project. The programm
ignores the IF at all, and I also tried without if, just Me.Caption=S2 - is
ignored, simply.

I will be grateful for any help here, the work is blocked now.

Regards
Dag-Jarle



More information about the User mailing list