Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting COM Error
Message
De
06/05/2009 16:09:12
Steven Dyke
Safran Seats USA
Texas, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Getting COM Error
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01398217
Message ID:
01398217
Vues:
129
Something strange is going on.

I have code that generate reports getting remote data using SPT and standard SQL statements.

One report pulls all records the other only records with an open status.

Both of these reports run on my machine with no problem.

However, one the the users is complaining that the open report runs okay while the all records report generates an error for every record.

Here is the error:
OLE error code 0x800a01a8: Unknown COM status code.

Here is the SQL statement that is causing problem:

Select *, twoProc.shopdescription(shop) As shop1, pdmFunc.finduseridentity(mfgplan) As mfgplanName, twoProc.findmoinfo(IIF(!Empty(oldtwono),oldtwono, "TW" + PadL(recseq,7,'0'))) As twono1 From getTWODataByJobNoQuery InTo Cursor myTWOJobNoStatus Order By shop

This call in specific:
twoProc.findmoinfo(IIF(!Empty(oldtwono),oldtwono, "TW" + PadL(recseq,7,'0'))) As twono1

Here is the method:
lParam whattwonumber
	
	findMOInfoString = "SELECT ordno, refno, curop, ostat From amflib6.momast Where refno = '" + whattwonumber + "'"
	pdmVar.GlobalSQLString = findMOInfoString
	If SQLEXEC(pdmVar.as400con, findMOInfoString, 'findMOInfoQuery') <> -1 Then

		Do Case
		Case reccount("findMOInfoQuery") < 1
			Return PadR("No MO has been issued!",60)
	
		Case findMOInfoQuery.ostat = "10"
			Return PadR("MO-"+findMOInfoQuery.ordno + " Status - " + findMOInfoQuery.ostat,60)
	
		Case findMOInfoQuery.ostat = "45"
			Return PadR("MO-"+findMOInfoQuery.ordno + " Status - " + findMOInfoQuery.ostat,60)
	
		Case findMOInfoQuery.ostat = "40"
			
			findMOInfoString2 = "SELECT ordno, opseq, wkctr, opstc From amflib6.morout Where ordno = '" + findMOInfoQuery.ordno + "'"
			pdmVar.GlobalSQLString = findMOInfoString2
			If SQLEXEC(pdmVar.as400con, findMOInfoString2, 'findMOInfoQuery2') <> -1

				Do Case
				Case reccount("findMOInfoQuery2") < 1
					Return PadR("No MO was found!",60)
			
				Otherwise
					Select Max(opseq) As opseq,	wkctr, opstc From findMOInfoQuery2 Where opstc = '20' InTo Cursor findMOInfoQuery3 Group by wkctr, opstc
					*Select Max(opseq) As opseq, wkctr, opstc From findMOInfoQuery2 Where opstc = '20' InTo Cursor findMOInfoQuery3  &&Current Operation
			
					If reccount("findMOInfoQuery3") > 0 Then
						Return PadR("MO-"+findMOInfoQuery2.ordno + " @ " + findMOInfoQuery3.opseq+" - " + findMOInfoQuery3.wkctr,60)
					Else
						Select Max(opseq) As opseq, wkctr, opstc From findMOInfoQuery2 Where opstc = '30' InTo Cursor findMOInfoQuery3 Group by wkctr, opstc  &&In Work Operation
				
						If reccount("findMOInfoQuery3") > 0 Then
							Return PadR("MO-"+findMOInfoQuery2.ordno + " @ " + findMOInfoQuery3.opseq+" - " + findMOInfoQuery3.wkctr,60)
						Else
							Select Max(opseq) As opseq, wkctr, opstc From findMOInfoQuery2 Where opstc = '40' InTo Cursor findMOInfoQuery3 Group by wkctr, opstc &&Last Operation Complete
				
							If reccount("findMOInfoQuery3") > 0 Then
								Return PadR("MO-"+findMOInfoQuery2.ordno + " Status - " + findMOInfoQuery3.opstc,60)
							Else
								Return PadR("",60)
							EndIf
						EndIf
					EndIf
				EndCase	
			Else
				Return PadR("No Info Found!",60)
			EndIf
			
		OtherWise
			Return PadR("MO is Closed!",60)
		
		EndCase
	Else
		Return PadR("No Info Found!",60)
	EndIf
Répondre
Fil
Voir

Click here to load this message in the networking platform