Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listbox setting rowsource to empty ...
Message
De
23/08/1999 04:33:26
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
23/08/1999 03:00:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00255751
Message ID:
00256477
Vues:
32
>Problem is the SQL statement is like this:
>
>select distinct STR(Userno,2) + " "+ IIF(ISNULL(username),"          ",SUBSTR(Username, 1, 10))+ IIF(ISNULL(Users.init),"          ",Users.init)+  IIF(ISNULL(Users.PWChgDate),'  /  /    ',DTOC(Users.PWChgDate)) + " "+ALLTRIM(STR(Users.Language)) from users where not deleted() order by userno into cursor cur_users
>
>So I can't put it in this way.
>
>But I fixed the problem.
>
>When I set rowsorurce=""
>It reports the error because I initailly set rowsource='cur_user'
>In the properties dialog.
>If IO set it to (none)
>It works fine.
>
>So thanks!
Good it works. FYI:
*Your original SQL
select distinct STR(Userno,2) + " "+ ;
  IIF(ISNULL(username),"          ",SUBSTR(Username, 1, 10))+ ;
  IIF(ISNULL(Users.init),"          ",Users.init)+  ;
  IIF(ISNULL(Users.PWChgDate),'  /  /    ',DTOC(Users.PWChgDate)) + ;
  " "+ALLTRIM(STR(Users.Language)) ;
 from users ;
 where not deleted() ;
 order by userno ;
 into cursor cur_users

* Listbox.init
lcSQL = [select distinct STR(Userno,2) + " "+] + ;
  [IIF(ISNULL(username),"          ",SUBSTR(Username, 1, 10))+] + ;
  [IIF(ISNULL(Users.init),"          ",Users.init)+ ]+ ;
  [IIF(ISNULL(Users.PWChgDate),'  /  /    ',DTOC(Users.PWChgDate)) + ]+;
  [" "+ALLTRIM(STR(Users.Language)) ]+;
 [from users ] +;
 [where not deleted() ]+;
 [order by userno ]+;
 [into cursor cur_users]
with this
 .Rowsourcetype = 3
 .Rowsource = lcSQL
endwith
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform