Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot Access the Selected Table in Incremental Search C
Message
De
27/09/1999 04:45:12
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
27/09/1999 04:13:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00269219
Message ID:
00269220
Vues:
19
>I used a Special incremental Search Combo Box form tasmanian Traders sample programe. Class name is tsbase.Vcx
>
>I put tsifcombo on form and write code in init procd
>
>parameter cSource, cRow
>
>thisform.tsifcombo.rowSource = cSource
>thisform.tsifcombo.contRolSource = cRow
>thisform.tsifcombo.init
>thisform.tsifcombo.sorted = .t.
>set talk off
>set exect off
>
>In ok command Button
>
>use in temp
>rele thisform
>---------------------------------------------------------------------------
>in the calling form where i called this search form i write code.
>
>on key label F5 do form Search with;
>"select account.name, accounts.code;
>from accounts;
>order by account.name;
>into cursor temp","m.start_code"
>_______________________________________
>When i pressed f5 search form display and search effectively but when i press ok button an error display.
>the error is "Cannot access the selected table"
>Whereas search has completed and return require parameter.
>but temp cursor couldn't close.
>
>Help me regarding this matter


Hi Mohammed,
You use "temp" as a RowSource and try to recreate "temp" in "search". Instead set combo's rowsource directly to SQL :
*Combo init
this.RowSourceTYpe = 3 && SQL
this.rowSource = ;
 "select account.name, accounts.code "+;
 "from accounts "+;
 "order by account.name "+;
 "into cursor temp"

* If combo contents change based on some parameter ie: m.startcode
* then make it part of SQL

** "where accounts.code = m.startcode "+;

* and in combo.gotfocus
this.requery()
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