Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class definition is not found
Message
From
22/06/2011 15:53:25
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01515551
Message ID:
01515565
Views:
40
Ok, that brought up another library issue but I fixed that the same way. Now it's just giving me "Syntax error" when i try to run the program, no other information. This is the function it points me to:
FUNCTION 214Listing
THESQLDB = "TBL_BL"	
THESQLTABLE = "TBL_BOL"
THESERVER = goWCServer.oConfig.oWebProcess.cSQLServer
usr = "sa"
pas = "Th1nk@123"
ConnStr = [driver=SQL Server; server=]+THESERVER+[; database=]+THESQLDB+[; uid=]+usr+[;pwd=]+pas+[; Trusted_Connection=No;]
curHandle = SQLstringCONNECT( connStr )
cmd = [exec InTransit ?']
*+ALLTRIM(user.cclientcd)+[']
lr = SQLEXEC( curHandle, cmd, "sq")  && sq is the cursor the data is loaded into

SELECT;	
	client_zip,;
	bol_number,;
	ref_num,;
	weight,;
	pro_number,;
	customer_name,;
	customer_state,;
	customer_zip,;
	carrier_name,;
	ship_date,;
	est_delivery,;
	app_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()
listingtable=loSC.GetOutput()

Response.ExpandTemplate(goWCServer.oConfig.oWebProcess.cBTSAllTBLPath+"214List.htm")
ENDFUNC
I am using WestWind so if something is unfamiliar to you that's probably why.


>If it's a PRG based class, you need to use
>
>SET PROCEDURE to \WConnectX\_FP\WebProcess.prg ADDITIVE
>
>>WebProcess is another PRG that wasn't in the folder with the PRG in which the code came from. I dropped it and the FXP file in with the main program and tried to do:
>>
>>SET CLASSLIB TO \WConnectX\_FP\WebProcess
>>
>>But it's telling me "\WConnectX\_FP\WebProcess.vcx doesn't exist" because it in fact doesn't, there was no VCX where I found the two other files.
>>
>>Aside from that I don't see WebProcess mentioned in this code anywhere, at least nothing that defines it.
>>
>>Can I get it working without the VCX file?
>>
>>
>>>Where is WebProcess class defined and do you have
>>>
>>>SET PROCEDURE TO ProgramWhereThisClassDefined
>>>
>>>or
>>>
>>>SET CLASSLIB TO ClassLibWhereThisClassIsDefined
>>>
>>>statement missing.
>>>
>>>>When I try to run my program, I get "Class definition WEBPROCESS is not found."
>>>>
>>>>Here are the first few lines of code, the error pops up at loProcess=CREATEOBJECT("task",loServer).
>>>>
>>>>
#define DISC_NORMAL 0
>>>>#define DISC_RATE   1
>>>>#define _MAXLNS 10
>>>>#define _MAXWLNS 10
>>>>#define RATE_UNKNOWN 0
>>>>#define RATE_PAY 1
>>>>#define RATE_INV 2
>>>>#define CHANGETHIS this.fp1521()  &&this.BGMAudit()  &&this.fp1601()
>>>>*#define TESTING 1
>>>>LPARAMETERS loServer
>>>>LOCAL loProcess
>>>>#include WCONNECT.H
>>>>#DEFINE TIMEOUT 14400
>>>>#DEFINE TOL_PATH "D:\BTS\Tolerance\"
>>>>
>>>>loProcess=CREATEOBJECT("task",loServer)
>>>>IF VARTYPE(loProcess)#"O"
>>>>	WAIT WINDOW NOWAIT "Unable to create Process object..."
>>>>	RETURN .f.
>>>>ENDIF 
>>>>loProcess.Process
>>>>RETURN 
>>>>
>>>>DEFINE CLASS Task as WebProcess
>>>>
>>>>After that I start making functions. I'm running a local server to test the pages and all of them come back saying there's a syntax error at line 0, so it's obviously zero help. Any ideas?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform