Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WestWind/database filter help
Message
 
 
À
13/07/2011 14:24:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01516279
Message ID:
01518118
Vues:
71
I don't understand what exactly is the problem. If you need to retrieve records for particular fdBlNo, then you need to have it as a parameter in your SP and pass it.

>Alright, but then I'm back another step because it's only displaying every single record instead of one of the record numbers I'm searching for... I'm still trying to get it to take whatever I put in the input box and only display that record. I remember the issue we were having was trying to get this code to work with a stored procedure instead of a SELECT statement:
>
>
	text to cmd textmerge noshow
>*!*	    select top (200) bol_number, pro_number, client_city, client_state, client_zip,
>*!*	     customer_city, customer_state, customer_zip, ship_date
>*!*	    FROM <<TheSQLTable>>
>*!*	    WHERE bol_Number = ?m.fdBlNo
>*!*	endtext
>
>Somehow I need to get the WHERE bol_Number = ?m.fdBlNo working for the SP code below, but didn't figure it out.
>
>
FUNCTION r214input
>
>fdBlNo = ALLTRIM(UPPER(Request.Form("blno")))
>fdBN   = Request.Form("BN")
>fdPK   = Request.Form("PK")
>mEr = ""
>lcTable=""
>m.protbl = ""
>m.rplen = 0
>
>DO CASE
>CASE ! EMPTY(fdBN)
>	SQLWhere = "BN=" + ALLTRIM(fdBN)
>	IF ! EMPTY(fdPK)
>		SQLWhere = SQLWhere + " AND PK=" + ALLTRIM(fdPK)
>	ENDIF 
>OTHERWISE
>	lcTable = "Not Found" 
>	Response.Expandtemplate(goWCServer.oConfig.oTask.cHtmPath+"r214input.htm")
>	RETURN 
>ENDCASE 
>lcTable="TBL Master File<br>"
>
>THESQLDB = "TBL_BL"	
>THESQLTABLE = "TBL_BOL"
>THESERVER = goWCServer.oConfig.oTask.cSQLServer
>usr = ""
>pas = ""
>ConnStr = [driver=SQL Server; server=]+THESERVER+[; database=]+THESQLDB+[; uid=]+usr+[;pwd=]+pas+[; Trusted_Connection=No;]
>curHandle = SQLstringCONNECT( connStr )
>*!*	cmd = [exec InTransit ?']+ALLTRIM(user.cclientcd)+[']
>text to cmd textmerge noshow
>exec InTransitRN 
>endtext
>lr = SQLEXEC( curHandle, cmd, "sq")  && sq is the cursor the data is loaded into
>
>
>IF SQLEXEC( curHandle, cmd, "sq")  = -1
>messagebox(message())
>ENDIF
>
>SELECT;	
>	client_zip,;
>	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;
>	INTO CURSOR TQuery
>	SELECT TQuery
>	SET CENTURY ON 
>	recs=RECCOUNT()
>		
>loSC = CREATEOBJECT("wwShowCursor")
>loSC.lCenterTable = .f.
>loSC.cHeaderBGColor = "black"   &&"#336633"
>loSC.lAlternateRows = .T.
>	loSC.cAlternatingBGColor = "white"  &&"#EFEFEF"
>loSC.cTableBorder ="3"
>loSC.cTableWidth="750"
>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()
>
>Response.ExpandTemplate(goWCServer.oConfig.oTask.cBTSHTMPath+"r214Input.htm")
>ENDFUNC
>
>
>There is my updated function.
>
>>>Here is the line:
>>>
>>>
exec InTransitRN ?m.fdBlNo
>>>
>>>
>>So, here is your problem :)
>>
>>It should be now
>>
>>
exec lnTransitRN
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