Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL - List Box - RowSource problem
Message
De
21/04/2006 16:59:01
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
21/04/2006 16:40:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01115429
Message ID:
01115584
Vues:
8
>Yuri,
>I can put in the following code:
>SQLEXEC(Ras2Conn, "SELECT Ras2_envelope.ENV_NO, Ras2_envelope.ENV_TOTL ;
> FROM Ras2_envelope", "test")
> SELECT test
> BROWSE nowait
>And browse the data; however, the following code (and the code you provided):
>thisform.List1.columnCount=2
>thisform.list1.RowSourceType= 3
>thisform.list1.RowSource="SELECT ENV_NO, ENV_TOTL FROM Ras2_envelope"
>
>results in a box that shows open tables (and there is none). It is apparently trying to open a dbf file.
>Jerry

Jerry,
It doesn't look like you are doing it the way Yuri suggested. Reread his post:

.RowSource="SELECT ENV_NO, ENV_TOTL FROM test into cursor crsMyList"

In other words your local cursor name is "test" (what you browse) and not "Ras2_envelope". Either change "test" to "Ras2_envelope" in SQLexec or "Ras2_envelope" to test in rowsource assignment.

However since you already have a cursor at hand, you don't not need to create another:
SQLEXEC(m.Ras2Conn, "SELECT ENV_NO, ENV_TOTL FROM Ras2_envelope", "ras2_envelope")
SQLDisconnect(m.Ras2Conn)
with thisform.List1
 .ColumnCount = 2
 .RowSourceTYpe = 1
 .RowSource = "ras2_envelope.env_no,env_total"
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform