[Gambas-user] Starnge with DB and IF
Caveat
Gambas at ...1950...
Sun Sep 25 02:24:55 CEST 2011
In your SQL statement, it looks like there's a single quote missing
between LC= and m.LC (at the end of the line you specifically add a
single quote after the content of m.LC).
For the rest I don't have much clue what you're going on about. I wish
you'd state clearly what it is you're trying to achieve. I'm guessing
you're trying to set the title of the Form depending on what you get out
of the database? Just a thought, but have you tried a Me.Refresh after
setting the Form title?
If you're having trouble setting the Form title, then you should forget
all the database nonsense for a minute and try something as simple as
Me.Caption = "Aanmelden"... does that work? If not, it's nothing to do
with your ResultSet, your database, or any IF clause... it has to be
something else...
Kind regards,
Caveat
On Sat, 2011-09-24 at 21:00 -0300, Dag-Jarle Johansen wrote:
> 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
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2dcopy2
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
More information about the User
mailing list