Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WestWind/database filter help
Message
 
 
À
14/07/2011 10:35:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01516279
Message ID:
01518138
Vues:
65
>I'm not sure, let me explain what I think is happening...
>
>
text to cmd textmerge noshow
>exec InTransitRN 
>endtext
>lr = SQLEXEC( curHandle, cmd, "sq")  && sq is the cursor the data is loaded into
>
>In that code, it's executing the InTransitRN SP and then putting in a cursor called "sq". That SP has filters in it so it only shows one client's data, but it will show all of their data. Then in this code below:
>
>
SELECT;	
>	client_zip,;
>	[<a href="javascript:back('BOL#~X~]+transform(bol_number)+[~]+[') "target="_self"> ]+[</a>            ] as bol_number,;
>	ref_num,;
>	weight,;
>	pro_number,;
>	customer_name,;
>	customer_state,;
>	customer_zip,;
>	carrier_name,;
>	ship_date,;
>	est_delivery,;
>	appt_date,;
>	latest_status_description,;
>	latest_reason_description,;
>	date_last_updated;
>	FROM sq;
>	WHERE bol_Number = ?m.fdBlNo;
>	INTO CURSOR TQuery
>	SELECT TQuery
>	SET CENTURY ON 
>	recs=RECCOUNT()
>
>Actually now that I'm typing this out, it seems as if I'm telling it to select fields that the SP is already selecting, is that what's going on? At the same time though, if I remove the above SELECT I lose my table that gets generated through WestWind, which is generated right below the SELECT statement:
>
>
loSC = CREATEOBJECT("wwShowCursor")
>loSC.lCenterTable = .f.
>loSC.cHeaderBGColor = "black"   &&"#336633"
>loSC.lAlternateRows = .T.
>	loSC.cAlternatingBGColor = "white"  &&"#EFEFEF"
>loSC.cTableBorder ="3"
>loSC.cTableWidth="1000"
>DIMENSION laHeaders[15]
>laHeaders[1] = "Ozp"
>laHeaders[2] = "BOL#"
>laHeaders[3] = "Ref#"
>laHeaders[4] = "Weight"
>laHeaders[5] = "Pro#"
>laHeaders[6] = "Customer Name"
>laHeaders[7] = "Dst"
>laHeaders[8] = "Dzp"
>laHeaders[9] = "Carrier"
>laHeaders[10] = "Ship Date"
>laHeaders[11] = "Est_Delivery"
>laHeaders[12] = "Appt. Date"
>laHeaders[13] = "Latest Status"
>laHeaders[14] = "Latest Reason"
>laHeaders[15] = "Last Updated"
>loSC.BuildFieldListHeader(@laHeaders)
>loSC.lSumNumerics = .t.
>loSC.ShowCursor()
>lctable=loSC.GetOutput()
>
>
>If that's the case then I'm just back where I was, because I don't know how to get the WHERE bol_Number = ?m.fdBlNo; working. It's not like I can put that in the SP itself, and I couldn't get it working any other way. That's the only way I've found that will take the input from the user and only display that record.
>
>>Are you saying you got all data from SQL Server and then filter on the client? And you don't need the rest of the data you fetched?
>>
Ok, as long as you have it working...

Although what if you select into TQuery rather than 'sql' and comment out the select following SQLEXEC statement?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform