Question

event id 4786...

Asked by: nerd619

if anyone has experienced this problem before, any input would be helpful.

Thanks...

The system has called a custom component and that component has failed and generated an exception. This indicates a problem with the custom component. Notify the developer of this component that a failure has occurred and provide them with the information below.
Component Prog ID:
Server Application ID: {1C899FEF-229B-47D9-85B8-C8DCDBF53E43}
Server Application Instance ID:
{F90A5DB0-BAFD-4AA0-9371-B3FC184B1778}
Server Application Name: FoxPro Objects
The serious nature of this error has caused the process to terminate.
Exception: C0000005
Address: 0x014937E7
Call Stack:
 + 0x14937e7
RPCRT4!NdrStubCall2 + 0x217
RPCRT4!NdrpCreateProxy + 0x225
OLEAUT32!DispCallFunc + 0x581
ole32!StgGetIFillLockBytesOnFile + 0x13d32
ole32!StgGetIFillLockBytesOnFile + 0x13cdf
ole32!DcomChannelSetHResult + 0xaab
ole32!DcomChannelSetHResult + 0x495
ole32!CoFreeUnusedLibrariesEx + 0xb06
ole32!StgGetIFillLockBytesOnFile + 0x13bec
ole32!StgGetIFillLockBytesOnFile + 0x13a7d
ole32!StgGetIFillLockBytesOnFile + 0x12f64
ole32!CoFreeUnusedLibrariesEx + 0x9f5
ole32!CoFreeUnusedLibrariesEx + 0x9c0
USER32!LoadCursorW + 0x4cf5
USER32!LoadCursorW + 0x4e86
USER32!TranslateMessageEx + 0x10d
USER32!DispatchMessageW + 0xf
COMSVCS!DllUnregisterServer + 0x270
COMSVCS!DllUnregisterServer + 0x180
COMSVCS!DllUnregisterServer + 0xc6c
COMSVCS!DllUnregisterServer + 0xf4d
msvcrt!_endthreadex + 0xa3
kernel32!GetModuleHandleA + 0xdf


For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2007-12-19 at 14:22:54ID23034710
Tags

event

,

id

Topics

DCOM

,

Windows 2003 Server

,

FoxPro Database

Participating Experts
3
Points
0
Comments
9

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Where is the list of API functions in the  "win32api"  and…
    I'm trying to figure out where the list of all the functions in the "win32api " and "user32" may be found. I need to play with them a little and would ap*****ate the tip Dennis Kean
  2. Notify users of Foxpro maintenance
    What is the best way to notify users of routine maintenance when I need exclusive use of Foxpro and all of the tables? We have remote users who dial in using Citrix and may have the application open but are not using it. Is there a way to notify users through the computer t...
  3. Event ID 7020
    Hi I have 2 windows 2003 Servers R2, Both are on same LAN, and both are DC's. The first DC we promoted and that has all of the master roles is also the Exchange 2003 Server (i know its not ideal but budget was not there) I had an issue that when the server rebooted i got th...
  4. http://go.microsoft.com/fwlink/?LinkId=6915…
    I can't change the homepage for IE7; it keeps redirecting to www.msn.com Recently installed IE7 on XP Pro SP2 laptop which was cleaned from 120 plus spywares, malwares, adwares, trojans, and virus'. Cleaned with numerous tools. Tools used: Norton Antivirus removal, Norton...
  5. Need print screen code but what is API, Handle user32?
    Using Windows Forms, .NET 1.1, VB.NET 2003 Hi Experts, I'm searching the archives to find code that takes a print screen of my window, and saves it to the clipboard as a bitmap file. I found code but I have few questions What does the following mean: 1. Private Declare Sub ...
  6. Event ID 1076 Source User32
    Operating System is WIndows 2003 R2 Enterprise x64bit edition and its configured with NOD32 Antivirus and Microsoft Virtual Server for testing. The server gets restarted automatcially. When i checked the even log i found as Source: USER32 , Event ID: 1076, Type Warning. The...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: CarlWarnerPosted on 2007-12-19 at 15:17:28ID: 20503819

Which version of Visual FoxPro?

 

by: mcse2007Posted on 2007-12-19 at 18:23:01ID: 20504521

The eventid error number is an indication that there is a bug in the software (e.g database, application) hence you will need to refer the matter to the developers who build the program so they can release a patch to fix the issue.

 

by: nerd619Posted on 2007-12-19 at 21:37:54ID: 20505028

were are using VFP Runtime 8... i've tried to talk with our developers in regards to the issue and he's convinced that it is an issue with permissions. i don't think thats the case cause i'm tried everything (iusr_servername, iwam_servernam, iis_wpg, local service, local system, network service) and nothing seems to work. i think it has something to do with a string in the custom dll....

 

by: tmedleyPosted on 2007-12-20 at 11:19:15ID: 20509136

Can you post a code snippet showing how you are instantiating a class from the dll and the properties of it you are setting and methods of it you are calling? Have you used object browser to investigate the classes of the dll? Might you be attempting to set a property with the wrong data type? Or call a method with a parameter of the wrong data type? To eliminate security as the culprit install everything locally and login as a local administrator and see if the error goes away.

 

by: nerd619Posted on 2007-12-27 at 15:09:45ID: 20538150

here is the source code for the core2foxpro dll... hope this helps...

*!*	***** TESTING *****
*!*	SET DEFAULT TO 'c:\DEV\COM\core2foxpro'
*!*	SET TALK ON
*!*	SET PROCEDURE TO  core2foxjob.prg, core2foxcust.prg
*!*	CLEAR
*!*	PUBLIC job1
*!*	secd=SECONDS()
*!*	job1 = CREATEOBJECT("Core2FoxJob")
*!*	*job1 = CREATEOBJECT("Core2Foxpro.Core2FoxJob")
*!*	*job1 = CREATEOBJECTEX('{A3A1D7E6-7BBD-44D9-8075-62D26A14D151}','localhost')
*!*	*cus1 = CREATEOBJECT("Core2Foxcust")
 
*!*	*? job1.version
 
 
*!*	*job1.changeSQLConnection('COREDev','netdev')
 
*!*	*cus1 = CREATEOBJECTEX('{F282456C-6048-4325-87A3-E7265F79444D}','localhost')
*!*	*cus1.changeSQLConnection('COREDev','netdev')
*!*	*job1.changeSQLConnection('COREDev','netdev')
 
*!*	*? cus1.updatecontact(313031)
*!*	* ? job1.procData('00000')
*!*	*? cus1.UpdateCustomer(428655)
*!*	? job1.procData('112384')
*!*	? SECONDS()-secd
*!*	*!*	RELEASE cus1
*!*	*!*	RELEASE job1
 
*!*	*****************************
*
#define SCHEDULED_PRINT_QTY 3000
#define QC_REPRINT_QUANTITY 2700
#define UNIT_IRISGROUP 2
*****************************
DEFINE CLASS Core2FoxJob AS SESSION OLEPUBLIC
 
	dBaseLocation = '//NT_DATA1/Server/Dbase/files'
	*dBaseLocation = '//DATA1/Server/Dbase/files'
	datapath='//NT_DATA1/Server/Dbase/foxpro6'
	sqlDataBase='Core'
	sqlServer ='prodsql1'
 
	PROTECTED connSql
	PROTECTED oStatus
	PROTECTED oJoblog
	PROTECTED cErr
	PROTECTED iTesting
	PROTECTED sProperCreationEmpId
 
	FUNCTION helloWorld() AS STRING
		RETURN 'Hello World!'
	ENDFUNC
 
	FUNCTION procData(cOrder_item_pk AS STRING,cJobType AS STRING ) AS STRING
		TRY
			THIS.sProperCreationEmpId = .null.
 
			THIS.openDBF()
			THIS.cErr=''
			IF THIS.getOrderItem(cOrder_item_pk) < 1
				THROW "Cannot find order_item "+cOrder_item_pk
			ENDIF
			THIS.getOrders(t_orderItem.orders_fk)
			THIS.getEmployee_id(t_orders.creation_employee_fk)
			THIS.getLineItems(t_orderItem.order_item_reference) &&cOrder_item_pk)
			THIS.getChildItems(t_orderItem.order_item_reference) &&cOrder_item_pk)
			THIS.getContact(t_orders.contact_fk,'t_contact')
			*this.getCustomer(t_contact.customer_fk)
			THIS.getProductionDetail(cOrder_item_pk)
			THIS.getTeamDist(t_orderItem.orders_fk)
 
			IF ISNULL(t_orderItem.order_item_number) OR EMPTY(t_orderItem.order_item_number) OR t_orders.order_type<>2
				THROW 'No order_item_number (job number) is set'
			ELSE
				cJob=TRIM(t_orderItem.order_item_number)
			ENDIF
 
			********************************
			**CUSTOMER
			********************************
			*oCore2Cust = CREATEOBJECT("Core2FoxCust")
			*oCore2Cust.changeSQLConnection (this.SQLDatabase,this.SQLServer)
			*r=oCore2Cust.updateContact(VAL(t_orders.contact_fk))
			*RELEASE oCore2Cust
			*IF r <>"Success"
			*	THROW r
			*ENDIF
 
			cAccntNum=THIS.NormalizeAccntNum(t_contact.contact_id)
			SELECT Customer
			IF NOT SEEK(cAccntNum)
				THROW 'Contact '+ cAccntNum+' not in Foxpro.'
			ENDIF
			**STATUS
			SELECT STATUS
			IF SEEK(cJob)
				SCATTER NAME THIS.oStatus
				THIS.oStatus.job_type=cJobType
			ELSE
				***NEW ORDER
				***These are field to be set once only
				SCATTER NAME THIS.oStatus BLANK
				THIS.oStatus.job_num=cJob
				IF ISNULL(t_orderItem.station)
					IF NVL(t_orders.business_unit,1)=UNIT_IRISGROUP 
						THIS.oStatus.station='071'
					ELSE
						THIS.oStatus.station='000'
					ENDIF
				ELSE
					THIS.oStatus.station=TRIM(t_orderItem.station)
				ENDIF
				
				THIS.oStatus.sta_date=DATE()
				THIS.oStatus.br_date=DATE()
				THIS.oStatus.DATE=DATE()
				THIS.oStatus.sta_time=TIME()
				THIS.oStatus.sta_by=THIS.sProperCreationEmpId
				THIS.oStatus.rec_date=DATE()
				THIS.oStatus.rec_time=TIME()
				THIS.oStatus.photog='148'
				THIS.oStatus.job_type=cJobType
 
				THIS.oStatus.Paper_Type = 'KK'
				THIS.oStatus.old_new='N'
				THIS.oStatus.inking ='2'
				THIS.oStatus.team = NVL(t_orders.team_name,Customer.team)
				IF THIS.setRestore()
					THIS.oStatus.oe_type='R'
				ENDIF
				
 
			ENDIF
			**JOBLOG
			SELECT joblog
			IF SEEK(cJob)
				SCATTER NAME THIS.oJoblog
			ELSE
				***These are field to be set once only
				SCATTER NAME THIS.oJoblog BLANK
				THIS.oJoblog.job_num=cJob
				THIS.oJoblog.photog='148'
				THIS.oJoblog.date_in=DATE()
				IF t_orders.source_code = 0
					THIS.oJoblog.line_note='Core Order'
				ELSE
					THIS.oJoblog.line_note='On Line Order'
				ENDIF
				
			ENDIF
			
			IF NVL(t_orders.business_unit,1) = UNIT_IRISGROUP 
				*irisgroup
				THIS.getPhotog()
			ELSE
				THIS.getSalesRep()
			ENDIF
			
			THIS.oStatus.account=ALLTRIM(cAccntNum)
			THIS.oStatus.ship_to=ALLTRIM(cAccntNum)
			THIS.oJoblog.cust_numb=ALLTRIM(cAccntNum)
 
			IF NOT THIS.getPageSize()
				*	THROW 'No postcard found'
			ENDIF
			***GENERAL
			THIS.getPayment()
			THIS.oJoblog.REFERENCE=NVL(t_orders.DESCRIPTION,'')
 
			***CARD PRODUCTS
			=THIS.getPriority()
			=THIS.getProofType()
			=THIS.getBindery()
			=THIS.getOEType()
			=THIS.getCustomTrim()
			=THIS.getShipping()
			=THIS.getPromocode()
			=This.getMailFull()
			this.getScheduled_Print_Qty()	&& sets the print quantity if it is scheduled in CORE - 
													&& DOESN'T OVERWRITE QC PRINT QUANTITY
 
			****LAYOUT PRODUCTS
			=THIS.getBorder()
			=THIS.getHeadline()
			=THIS.getFrontLogo()
			=THIS.getBackLogo()
			=THIS.getFrontImages()
			=THIS.getBackImages()
			=THIS.getNotify()
			******************************
			**CORE OWNED
			******************************
			IF t_orders.is_core_owned = 1
				THIS.oStatus.ship_alt='COR'
				THIS.oStatus.bill_type = 'c'
			ENDIF
 
			*** COMMENTED BECAUSE MO IS SETTING THE TEAM SOMEWHERE ELSE - WE THINK?
			**** Team	
			*IF NOT ISNULL(t_orders.team_fk)
			*	cSQL='select * from team where team_pk=?t_orders.team_fk'
			*	SQLPREPARE(this.connsql,cSQL,'t_team')
			*	rv=SQLEXEC(this.connsql)
			*	**DID WE GET A TEAM?
			*	IF RECCOUNT('t_team')>0 AND this.oStatus.team<>TRIM(t_team.team_name)
			*		this.oStatus.team=TRIM(t_team.team_name)
			*	ENDIF
			*ENDIF
 
			SELECT STATUS
			IF NOT SEEK(TRIM(cJob))
				***NEW ORDER***
				APPEND BLANK
				THIS.doStamps()
			ENDIF
			SELECT STATUS
			IF RLOCK()
				GATHER  NAME THIS.oStatus
			ELSE
				THROW "Cannot Lock Status on "+cJob
			ENDIF
			UNLOCK
 
			SELECT joblog
			IF NOT SEEK(TRIM(cJob))
				APPEND BLANK
			ENDIF
			IF RLOCK()
				GATHER NAME THIS.oJoblog  MEMO
				=THIS.appendJobNotes(t_orders.orders_pk)
			ELSE
				THROW "Cannot Lock Joblog on "+cJob
			ENDIF
			SELECT joblog
			UNLOCK
			************************
			*PUT IT IN FOXPRO
			************************
 
			*oCOM = CREATEOBJECTEX("{C134FA82-1168-42BB-B86B-EE9FFD86B8D1}","data1")
			oCOM = CREATEOBJECT("sqlupdate.SQLUpdate")
			IF THIS.dBaseLocation <> '//NT_DATA1/Server/Dbase/files'
				**DELAY?
				DO WHILE TYPE('oCOM.dBaseLocation')='U'
				ENDDO
				oCOM.dBaseLocation = THIS.dBaseLocation +'/'
				oCom.sqlDataBase=this.sqlDataBase
				oCom.sqlServer =this.sqlServer
			ENDIF
			=oCOM.updateTable("status",cJob)
			=oCOM.updateTable("joblog",cJob)
			RELEASE oCOM
 
			*****************************
			SELECT Stats3
			IF NOT SEEK(STATUS.job_num)
				APPEND BLANK
				REPLACE Stats3.job_num WITH STATUS.job_num
				REPLACE Stats3.rec_date WITH STATUS.rec_date
				REPLACE Stats3.rec_time WITH STATUS.rec_time
				* REPLACE Stats3.start_date WITH date()
				* REPLACE Stats3.start_time WITH time()
				REPLACE Stats3.job_type WITH STATUS.job_type
			ENDIF
			REPLACE Stats3.station WITH STATUS.station
			REPLACE Stats3.Stage   WITH STATUS.Stage
			REPLACE Stats3.sta_date WITH STATUS.sta_date
			REPLACE Stats3.sta_time WITH STATUS.sta_time
			REPLACE Stats3.team  	WITH STATUS.team
			IF RECCOUNT('t_teamdist') >0 AND NOT ISNULL(t_teamdist.start_date)
				REPLACE Stats3.start_date WITH TTOD(t_teamdist.start_date)
				REPLACE Stats3.start_time WITH TTOC(t_teamdist.start_date,2)
			ENDIF
			
			cSql='update orderItem set fox_sync=1, station=?this.oStatus.station '+;
				'where orderItem.order_item_pk=?cOrder_item_pk '
			SQLPREPARE(THIS.connSql,cSql,'t_result')
			SQLEXEC(THIS.connSql)
 
			CLOSE TABLES ALL
		CATCH TO er
			THIS.cErr='ERROR: core2foxjob - '+er.MESSAGE+er.uservalue+' line:'+STR(er.LINENO,4)
			CLOSE TABLES ALL
		ENDTRY
		IF NOT EMPTY(THIS.cErr)
			RETURN THIS.cErr
		ENDIF
		RETURN "Success"
	ENDFUNC
	*suspend
	
	************************************************************************
	*
	*************
	PROTECTED FUNCTION getPageSize() AS Boolean
		SELECT t_lineitem
		LOCATE FOR service_item_dept=1 AND NVL(t_lineitem.quantity,0)>0
		IF NOT FOUND()
			RETURN .F.
		ENDIF
		THIS.oStatus.Paper_Type=IIF(t_lineitem.product_group =2,'DP','KK')
		SELECT serviceitem
		LOCATE FOR pk = VAL(t_lineitem.service_item_pk)
		THIS.oStatus.pagesize  =serviceitem.fld_code
		THIS.oStatus.num_copies=NVL(t_lineitem.quantity,0)
 
		THIS.oJoblog.discript=NVL(t_lineitem.DESCRIPTION,'')
		DO CASE
		CASE THIS.oStatus.pagesize='1'
			THIS.oJoblog.e_format='MPS-CUSTOM'
			THIS.oJoblog.i_format='MPS-CUSTOM'
		CASE THIS.oStatus.pagesize='2'
			THIS.oJoblog.e_format='MPD-CUSTOM'
			THIS.oJoblog.i_format='MPD-CUSTOM'
		OTHERWISE
			THIS.oJoblog.e_format='MP'+TRIM(THIS.oStatus.pagesize)+'-CUSTOM'
			THIS.oJoblog.i_format='MP'+TRIM(THIS.oStatus.pagesize)+'-CUSTOM'
		ENDCASE
		RETURN .T.
	ENDPROC
	
	************
	PROTECTED FUNCTION getPriority() AS Boolean
		SELECT t_productiondetail
		LOCATE FOR detail_name_type=QC_REPRINT_QUANTITY		&& priority is QC priority
		IF FOUND()
			*SET QC AND RETURN
			THIS.oStatus.job_prior='2'
			THIS.oStatus.num_copies=VAL(NVL(detail_value,'0'))
			RETURN .T.
		ENDIF
 
		SELECT t_lineitem
		LOCATE FOR service_item_dept=2
		IF NOT FOUND()
			THIS.oStatus.job_prior='8'
			RETURN .T.
		ENDIF
		SELECT serviceitem
		LOCATE FOR pk = VAL(t_lineitem.service_item_pk)
		THIS.oStatus.job_prior =serviceitem.fld_code
		RETURN .T.
	ENDFUNC
	
	PROTECTED FUNCTION getScheduled_Print_Qty 
		IF this.oStatus.job_prior # '2'		&& if not a QC reprint override priority then continue
			SELECT t_productionDetail
			LOCATE FOR detail_name_type=SCHEDULED_PRINT_QTY		&& 
			IF FOUND()
				this.oStatus.num_copies=VAL(NVL(detail_value,'0'))
			ENDIF 
		ENDIF 
	ENDFUNC 
		
	************
	PROTECTED FUNCTION getProofType() AS Boolean
		SELECT t_lineitem
		LOCATE FOR service_item_dept=10
		IF NOT FOUND()
			THIS.oStatus.Proof_Type ='L'
			RETURN .T.
		ENDIF
		SELECT serviceitem
		LOCATE FOR pk = VAL(t_lineitem.service_item_pk)
		THIS.oStatus.Proof_Type =serviceitem.fld_code
		THIS.oStatus.Proof_Cost =NVL(t_lineitem.cost,0)
		RETURN .T.
	ENDFUNC
	************
	PROTECTED FUNCTION getBindery() AS Boolean
		SELECT t_lineitem
		LOCATE FOR service_item_dept=7 AND NOT UPPER(description) $ "SEALING"
		IF NOT FOUND()
			THIS.oStatus.Bindery =' '
			THIS.oStatus.Bind_Cost =0
			RETURN .F.
		ENDIF
		SELECT serviceitem
		LOCATE FOR pk = VAL(t_lineitem.service_item_pk) AND status_fld='bindery'
		THIS.oStatus.Bindery =serviceitem.fld_code
		THIS.oStatus.Bind_Cost =NVL(t_lineitem.cost,0)
		RETURN .T.
	ENDFUNC
	************
	PROTECTED FUNCTION getMailFull() AS Boolean
		SELECT t_lineitem
		LOCATE FOR feature_option_type=11
		IF FOUND()
			THIS.oStatus.MailFull ='B'
			RETURN .T.
		ENDIF
		
		SELECT t_productiondetail
		LOCATE FOR detail_name_type=210
		IF FOUND()
			THIS.oStatus.MailFull ='M'
			RETURN .T.
		ENDIF
		THIS.oStatus.MailFull =' '
		RETURN .T.
	ENDFUNC
	************
	PROTECTED FUNCTION getOEType() AS Boolean
		SELECT t_childLineitem
		LOCATE FOR  feature_type=30
		IF  FOUND()
			THIS.oStatus.oe_type='R'
			RETURN .T.
		ENDIF
		LOCATE FOR feature_type=31
		IF  FOUND()
			THIS.oStatus.oe_type='C'
			RETURN .T.
		ENDIF
		*	LOCATE FOR feature_type=31
		*	IF  FOUND()
		*		this.oStatus.oe_type='S'
		*		RETURN .T.
		*	ENDIF
		THIS.oStatus.oe_type='N'
		RETURN .T.
	ENDFUNC
	************
	PROTECTED FUNCTION getCustomTrim() AS Boolean
		SELECT t_lineitem
		LOCATE FOR VAL(service_item_pk)=91
		IF NOT FOUND()
			THIS.oStatus.customtrim = ''
			THIS.oStatus.trim_Cost =0
			RETURN .F.
		ENDIF
		THIS.oStatus.customtrim = NVL(t_lineitem.DESCRIPTION,'')
		THIS.oStatus.trim_Cost = NVL(t_lineitem.cost,0)
		RETURN .T.
	ENDFUNC
	************
	PROTECTED FUNCTION getShipping() AS Boolean
		SELECT t_lineitem
		** LOOK FOR Mailing Serv.
		LOCATE FOR feature_option_type= 21
		IF NOT FOUND()
			* no "services only"
			LOCATE FOR feature_option_type= 10
			IF  FOUND()
				THIS.oStatus.ship_via='M'
				RETURN .T.
			ENDIF
		ENDIF
 
		* Be sure priority is called 1st
 
		*default to 'unknown'
		THIS.oStatus.ship_via=' '
		*Look for Shipping
		SELECT t_childLineitem
		LOCATE FOR service_item_dept=3
		IF NOT FOUND()
			RETURN .F.
		ENDIF
 
		* check bulk ship
		IF service_item_id=3122
			SELECT t_productiondetail
			LOCATE FOR detail_name_type =1260
			IF FOUND()
				THIS.oStatus.ship_via =this.getShipViaFromJob(t_productiondetail.detail_value)
			ENDIF
			RETURN .t.
		ENDIF
				
		SELECT serviceitem
		LOCATE FOR pk = VAL(t_childLineitem.service_item_pk)
		THIS.oStatus.ship_via =serviceitem.fld_code
 
		IF TRIM(THIS.oStatus.ship_via) $ 'MD'
			RETURN .T.
		ENDIF
 
		IF THIS.oStatus.job_prior='1'
			THIS.oStatus.ship_via='C'
			RETURN .T.
		ENDIF
 
		IF TRIM(THIS.oStatus.ship_via) $ 'CBDM'
			RETURN .T.
		ENDIF
		**SPECIAL SHIPPING
		THIS.oStatus.shipping ='Y'
		THIS.oStatus.ship_desc =NVL(t_childLineitem.DESCRIPTION,'')
		THIS.oStatus.ship_cost =NVL(t_childLineitem.cost,0)
		RETURN .T.
	ENDFUNC
	************
	PROTECTED FUNCTION getPromocode() AS Boolean
		IF ISNULL(t_orders.promotion_code_fk)
			THIS.oStatus.ad_ref = ''
			RETURN .F.
		ENDIF
		cSql='select * from PromotionCode '+;
			'where promotion_code_pk=?t_orders.promotion_code_fk'
		SQLPREPARE(THIS.connSql,cSql,'t_promotion_code')
		SQLEXEC(THIS.connSql)
		THIS.oStatus.ad_ref = NVL(t_promotion_code.promotion_code_id,'')
		RETURN .T.
	ENDFUNC
	************
	PROTECTED FUNCTION getSalesRep() AS Boolean
		IF VAL(NVL(t_orders.sales_rep_fk,'-1'))= -1
			THIS.oStatus.sales_rep = ''
			RETURN .F.
		ENDIF
		cSql='select cast(employee.employee_id as char(4)) as emp_id from employee '+;
			'where employee.employee_pk=?t_orders.sales_rep_fk'
		SQLPREPARE(THIS.connSql,cSql,'t_salesrep')
		SQLEXEC(THIS.connSql)
		IF RECCOUNT('t_salesrep')>0
			THIS.oStatus.sales_rep = NVL(t_salesrep.emp_id,'')
			RETURN .T.
		ENDIF
		RETURN .F.
	ENDFUNC
		************
	PROTECTED FUNCTION getPhotog() AS Boolean
		IF ISNULL(t_orders.sales_rep_fk)
			RETURN .F.
		ENDIF
		cSql='select cast(employee.employee_id as char(3)) as emp_id from employee '+;
			'where employee.employee_pk=?t_orders.sales_rep_fk'
		SQLPREPARE(THIS.connSql,cSql,'t_salesrep')
		SQLEXEC(THIS.connSql)
		IF RECCOUNT('t_salesrep')>0
			THIS.oStatus.photog = NVL(t_salesrep.emp_id,'')
			THIS.oJoblog.photog = NVL(t_salesrep.emp_id,'')
			RETURN .T.
		ENDIF
		RETURN .F.
	ENDFUNC
	************
	PROTECTED FUNCTION getPayment() AS Boolean
		*cSql='select * from billingDetail '+;
		*'where billing_detail_pk=?t_orderItem.billing_detail_fk'
		*SQLPREPARE(this.connsql,cSql,'t_billingDetail')
		*SQLEXEC(this.connsql)
 
		cSql='select * from Check_Capture (nolock) where orders_fk=?t_orders.orders_pk'
		SQLPREPARE(THIS.connSql,cSql,'t_Check_Capture')
		SQLEXEC(THIS.connSql)
		IF RECCOUNT('t_Check_Capture')>0
			THIS.oStatus.check_amt=NVL(t_Check_Capture.amount,0)
			THIS.oStatus.bill_type='D'
		ENDIF
		THIS.oStatus.bill_to=THIS.NormalizeAccntNum(t_contact.contact_id)
		RETURN .F.
 
		RETURN .T.
	ENDFUNC
	******************************************
	*Layout Details
	******************************************
	PROTECTED FUNCTION getBorder() AS Boolean
		SELECT t_childLineitem
		LOCATE FOR VAL(service_item_pk)=52
		IF NOT FOUND()
			THIS.oStatus.BORDER = 'N'
			THIS.oStatus.Bord_color = ''
			THIS.oStatus.Keyline = 'N'
			THIS.oStatus.Bord_Cost = 0
			RETURN .F.
		ENDIF
		THIS.oStatus.BORDER = 'Y'
		THIS.oStatus.Bord_color = 'Unknown'
		THIS.oStatus.Keyline = 'N'
		THIS.oStatus.Bord_Cost = NVL(t_childLineitem.cost,0)
		RETURN .T.
	ENDFUNC
	************
	PROTECTED FUNCTION getHeadline() AS Boolean
		SELECT t_childLineitem
		LOCATE FOR VAL(service_item_pk)=51
		IF NOT FOUND()
			THIS.oStatus.Headline = 'N'
			THIS.oStatus.Head_Cost = 0
			RETURN .F.
		ENDIF
		THIS.oStatus.Headline = 'Y'
		THIS.oStatus.Head_Cost = NVL(t_childLineitem.cost,0)
		RETURN .T.
	ENDFUNC
	************
	PROTECTED FUNCTION getFrontLogo() AS Boolean
		SELECT t_childLineitem
		LOCATE FOR VAL(service_item_pk)=50
		IF NOT FOUND()
			THIS.oStatus.f_logo = 'N'
			THIS.oStatus.flogo_cost = 0
			RETURN .F.
		ENDIF
		THIS.oStatus.f_logo = 'Y'
		THIS.oStatus.flogo_cost = NVL(t_childLineitem.cost,0)
		RETURN .T.
		************
	PROTECTED FUNCTION getBackLogo() AS Boolean
		SELECT t_childLineitem
		LOCATE FOR VAL(service_item_pk)=75
		IF NOT FOUND()
			THIS.oStatus.num_logos = 0
			THIS.oStatus.new_logo = 'N'
			THIS.oStatus.logo_cost = 0
			RETURN .F.
		ENDIF
		THIS.oStatus.num_logos = NVL(t_childLineitem.quantity,0)
		THIS.oStatus.new_logo = 'Y'
		THIS.oStatus.logo_cost = NVL(t_childLineitem.cost,0)
		RETURN .T.
	ENDFUNC
	************
	PROTECTED FUNCTION getFrontImages() AS Boolean
		SELECT t_childLineitem
		LOCATE FOR VAL(service_item_pk)=48
		IF NOT FOUND()
			THIS.oJoblog.c_photos = 0
			THIS.oStatus.fc_photo = 0
			RETURN .F.
		ENDIF
		THIS.oJoblog.c_photos = NVL(t_childLineitem.quantity,0)
		THIS.oStatus.fc_photo = NVL(t_childLineitem.quantity,0)
		RETURN .T.
	ENDFUNC
	************
	PROTECTED FUNCTION getBackImages() AS Boolean
		SELECT t_childLineitem
		LOCATE FOR VAL(service_item_pk)=73
		IF NOT FOUND()
			THIS.oJoblog.b_photos = 0
			THIS.oStatus.num_ap = 0
			THIS.oStatus.ap_cost = 0
			THIS.oStatus.bb_photo = 0
			RETURN .F.
		ENDIF
		THIS.oJoblog.b_photos = NVL(t_childLineitem.quantity,0)
		THIS.oStatus.num_ap = NVL(t_childLineitem.quantity,0)
		THIS.oStatus.ap_cost = NVL(t_childLineitem.cost,0)
		THIS.oStatus.bb_photo = NVL(t_childLineitem.quantity,0)
		RETURN .T.
	ENDFUNC
	*************
	PROTECTED FUNCTION getNotify() AS Boolean
		DO CASE
		CASE BITAND(t_orders.notification_flag ,1) >0
			THIS.oStatus.disable_pe ='Y'
		CASE BITAND(t_orders.notification_flag ,2) >0
			THIS.oStatus.disable_pe ='T'
		OTHERWISE
			THIS.oStatus.disable_pe =' '
		ENDCASE
 
		DO CASE
		CASE BITAND(t_orders.notification_flag ,4) >0
			THIS.oStatus.disable_me ='Y'
		CASE BITAND(t_orders.notification_flag ,8) >0
			THIS.oStatus.disable_me ='T'
		OTHERWISE
			THIS.oStatus.disable_me =' '
		ENDCASE
		RETURN .T.
	ENDFUNC
	****************************************
	****************************************
	PROTECTED FUNCTION doStamps() AS Boolean
		SELECT Stalog
		APPEND BLANK
		REPLACE Stalog.job_num WITH  THIS.oStatus.job_num
		REPLACE Stalog.station WITH THIS.oStatus.station
		REPLACE Stalog.DATE WITH DATE()
		REPLACE Stalog.TIME WITH TIME()
		REPLACE Stalog.Priority WITH THIS.oStatus.job_prior
		REPLACE Stalog.sta_by WITH THIS.sProperCreationEmpId
 
		SELECT StampLog
		APPEND BLANK
		REPLACE StampLog.job_num WITH  THIS.oStatus.job_num
		REPLACE StampLog.DATE WITH DATE()
		REPLACE StampLog.TIME WITH TIME()
		REPLACE StampLog.Entered_By WITH THIS.sProperCreationEmpId
		REPLACE StampLog.CODE WITH '102'
		REPLACE StampLog.Accounting WITH 'N'
		REPLACE StampLog.action WITH 'Job Number Assigned'
		REPLACE StampLog.TYPE WITH 'H'
		REPLACE StampLog.Accounting WITH 'Y'
		RETURN .T.
	ENDFUNC
 
	****************************************
	PROTECTED FUNCTION setRestore()
		rVal=.F.
		SELECT t_productiondetail
		LOCATE FOR detail_name_type=601
		IF FOUND()
			rJob=UPPER(TRIM(t_productiondetail.detail_value))
			SELECT STATUS
			IF EMPTY(rJob) OR NOT SEEK(rJob)
				RETURN .F.
			ENDIF
 
			mInfo= 'Reprint'
			SELECT t_childLineitem
			LOCATE FOR  feature_type=30 OR feature_type=30
			IF FOUND()
				mInfo= 'Reprint '+TRIM(t_childLineitem.DESCRIPTION)
			ENDIF
			SELECT 0
			IF 'NT_DATA' $ UPPER(THIS.dBaseLocation)
				USE //nt_web2/foxwebprograms/restores/restores
			ELSE
				USE //data1/SERVER/dbase/foxpro6/restores
			ENDIF
			SELECT * from restores WHERE  datein>DATE()-5 AND restores.job_num=m.rJob  INTO CURSOR 'r1'
			IF RECCOUNT('r1') = 0
				SELECT restores
				CALCULATE MAX(ID) TO mx
				INSERT INTO restores (ID,emp_num,job_num,team,notes,datein,datemod,STATUS)  ;
					VALUES(mx+1,THIS.sProperCreationEmpId,rJob,STATUS.team,mInfo,DATETIME(),DATETIME(),'Requested')
				rVal = .T.
			ENDIF
			USE IN 'r1'
			USE IN 'restores'
			
		ENDIF
		RETURN rVal
		RETURN
	ENDFUNC
	****************************************
	****************************************
	PROTECTED FUNCTION getOrders(cOrders_pk AS STRING)
		LOCAL cSql
		cSql='select orders.*,team.team_name from orders (nolock) left join team on orders.team_fk=team_pk '+;
			'where orders.orders_pk=?cOrders_pk '
		SQLPREPARE(THIS.connSql,cSql,'t_orders')
		SQLEXEC(THIS.connSql)
		RETURN RECCOUNT('t_orders')
	ENDFUNC
 
	PROTECTED FUNCTION getEmployee_id(sCreationEmployee_fk AS STRING)
		IF ISNULL(THIS.sProperCreationEmpId)
			LOCAL __select
			__select = SELECT()
			SELECT t_orders
 
			LOCAL cSql
			cSql = 'select employee_id from employee '+;
				'where employee_pk=?sCreationEmployee_fk '
 
			SQLPREPARE(THIS.connSql, cSql, 't_employeeId')
			SQLEXEC(THIS.connSql)
			IF RECCOUNT('t_employeeId') > 0
				THIS.sProperCreationEmpId = STR(NVL(employee_Id,0),4)
			ELSE
				THIS.sProperCreationEmpId = '1100'
			ENDIF
 
			USE IN t_employeeId
			
			SELECT (__select)
 
		ENDIF
 
		RETURN THIS.sProperCreationEmpId
	ENDFUNC
 
	PROTECTED FUNCTION getOrderItem(cOrder_item_pk AS STRING)
		cSql='select orderItem.* from orderItem (nolock) '+;
			'where orderItem.order_item_pk=?cOrder_item_pk '
		SQLPREPARE(THIS.connSql,cSql,'t_orderItem')
		SQLEXEC(THIS.connSql)
		RETURN RECCOUNT('t_orderItem')
	ENDFUNC
 
	PROTECTED FUNCTION getLineItems(cOrder_item_pk AS STRING)
		cSql='select lineItem.*,serviceitem.service_item_pk,serviceitem.service_item_dept, '
		cSql=cSql+'serviceitem.service_item_id,feature.feature_type,featureoption.feature_option_type,product.product_group '
		cSql=cSql+'from lineItem (nolock) left outer join featureoption (nolock) on lineItem.feature_option_fk=featureoption.feature_option_pk '
		cSql=cSql+'left outer join serviceitem (nolock) on serviceitem.service_item_pk=featureoption.service_item_fk '
		cSql=cSql+'left outer join feature (nolock) on feature.feature_pk=featureoption.feature_fk '
		cSql=cSql+'left outer join product (nolock) on feature.product_fk=product_pk '
		cSql=cSql+'where order_item_reference=?cOrder_item_pk and credit_invoice_fk is null'
 
		SQLPREPARE(THIS.connSql,cSql,'t_lineItem')
		SQLEXEC(THIS.connSql)
		RETURN RECCOUNT('t_lineItem')
	ENDFUNC
 
	PROTECTED FUNCTION getChildItems(cOrder_item_pk AS STRING)
 
		cSql='select lineItem.*,serviceitem.service_item_pk,serviceitem.service_item_dept, '
		cSql=cSql+'serviceitem.service_item_id,feature.feature_type,featureoption.feature_option_type '
		cSql=cSql+'from lineItem (nolock) left outer join featureoption (nolock) on lineItem.feature_option_fk=featureoption.feature_option_pk '
		cSql=cSql+'left outer join serviceitem (nolock) on serviceitem.service_item_pk=featureoption.service_item_fk '
		cSql=cSql+'left outer join feature (nolock) on feature.feature_pk=featureoption.feature_fk '
		cSql=cSql+'where  parent_line_item_fk in (select line_item_pk from lineItem where order_item_reference=?cOrder_item_pk '
		cSql=cSql+'and credit_invoice_fk is null)'
 
		SQLPREPARE(THIS.connSql,cSql,'t_childLineItem')
		SQLEXEC(THIS.connSql)
		RETURN RECCOUNT('t_childLineItem')
	ENDFUNC
 
	PROTECTED FUNCTION getProductionDetail(cOrder_item_pk AS STRING)
	*	cSql='select * from productiondetail where line_item_fk '+;
	*		'in (select line_item_pk from lineitem where order_item_fk=?cOrder_item_pk ) '+;
	*		'union all select * from productiondetail where production_detail_fk in '+;
	*		'(	select production_detail_pk from productiondetail '+;
	*		' where line_item_fk in (select line_item_pk from lineitem where order_item_fk=?cOrder_item_pk ) ) '
	*	cSql=cSql+'union all select * from productiondetail where line_item_fk in ( '+;
	*		'select line_item_pk from lineitem where parent_line_item_fk in ('+;
	*		'select line_item_pk from lineitem where order_item_fk =?cOrder_item_pk ))'
		cSQL ='exec Usp_GetProdDetailForLineItem ?cOrder_item_pk'
		SQLPREPARE(THIS.connSql,cSql,'t_productiondetail')
		SQLEXEC(THIS.connSql)
		RETURN RECCOUNT('t_productiondetail')
	ENDFUNC
	
	PROTECTED FUNCTION getTeamDist(cOrder_pk AS STRING)
			cSql='select * from teamdistribution (nolock) where orders_fk=?cOrder_pk'
		SQLPREPARE(THIS.connSql,cSql,'t_teamdist')
		SQLEXEC(THIS.connSql)
		RETURN RECCOUNT('t_teamdist')
	ENDFUNC
	
	PROTECTED FUNCTION getContact(cContact_pk AS STRING,cTableName AS STRING )
		cSql='select * from contact (nolock) '+;
			'where contact_pk=?cContact_pk'
		SQLPREPARE(THIS.connSql,cSql,cTableName )
		SQLEXEC(THIS.connSql)
		RETURN RECCOUNT('t_contact')
	ENDFUNC
 
	PROTECTED FUNCTION getCustomer(cPk AS STRING)
		cSql='select * from customer (nolock) '+;
			'where customer_pk=?cPk'
		SQLPREPARE(THIS.connSql,cSql,'t_customer')
		SQLEXEC(THIS.connSql)
		RETURN RECCOUNT('t_customer')
	ENDFUNC
	********************************
	PROTECTED FUNCTION appendJobNotes(cOrderFk AS INT) AS STRING
		**JOBLOG MUST BE ON JOB
		LOCAL cMsg
		cSql='select employee.employee_id,employee.last_name,employee.first_name,orderNote.order_note_pk, '+;
			'orderNote.note,orderNote.date_created,orderNote.order_note_type from orderNote (nolock),employee (nolock) '+;
			'where employee_pk=employee_fk and order_fk=?cOrderFk and (fox_sync is null or fox_sync <>1)'
		SQLPREPARE(THIS.connSql,cSql,'t_orderNotes')
		SQLEXEC(THIS.connSql)
		cMsg=''
 
		SELECT t_orderNotes
		SCAN
			cMsg = CHR(13)+CHR(10)+TRIM(t_orderNotes.first_name)+' '+TRIM(t_orderNotes.last_name)+' '+TTOC(t_orderNotes.date_created)+CHR(13)+CHR(10)
			cMsg = cMsg + NVL(t_orderNotes.NOTE,"") +CHR(13)+CHR(10)
			IF NVL(t_orderNotes.order_note_type,1)=4
				REPLACE joblog.mail_note WITH joblog.notes+cMsg
			ELSE
				REPLACE joblog.notes WITH joblog.notes+cMsg
			ENDIF
			SQLPREPARE(THIS.connSql,'update orderNote set fox_sync=1 where order_note_pk=?t_orderNotes.order_note_pk' ,'t_result')
			SQLEXEC(THIS.connSql)
		ENDSCAN
 
		RETURN
	ENDFUNC
	**************************************
	PROTECTED FUNCTION getShipViaFromJob(cJobNo AS string) AS STRING
		**JOBLOG MUST BE ON JOB
		cShip=' '
		SELECT status
		nRec=RECNO()
		IF SEEK( cJobNo)
			cShip = status.ship_via
		ENDIF
		* return to current rec#
		IF nRec<=RECCOUNT()
			GOTO nRec
		ELSE
			GOTO BOTTOM 
		ENDIF
		
		RETURN cShip
	ENDFUNC 
	**********************************************************************
	*Basic routines
	**********************************************************************
	FUNCTION NormalizeAccntNum(cAcct AS STRING)
		iContactId=VAL(cAcct )
		cAccntNum=IIF(iContactId>=100000,STR(iContactId,6),'0'+STR(iContactId,5))
		RETURN cAccntNum
	ENDFUNC
	***********************
	FUNCTION changeSQLConnection(sqlDataBase AS STRING,sqlServer AS STRING) AS STRING
		THIS.sqlDataBase=sqlDataBase
		THIS.sqlServer =sqlServer
		*SQLPREPARE(this.connsql,'use '+SQLDatabase )
		*SQLEXEC(this.connsql)
		THIS.closeSQL()
		THIS.openSQL()
		IF THIS.connSql <=0
			RETURN 'Failed'
		ENDIF
		IF 'CORE'=UPPER(sqlDataBase) AND UPPER(sqlServer )='PRODSQL1'
			iTesting = 0
			THIS.dBaseLocation = '//NT_DATA1/Server/Dbase/files'
		ELSE
			iTesting = 1
			THIS.dBaseLocation = '//DATA1/Server/Dbase/files'
		ENDIF
		RETURN 'Success'
	ENDFUNC
 
	**********************
 
	PROTECTED FUNCTION openSQL
		STORE SQLSTRINGCONNECT("Driver=SQL Server;Server="+THIS.sqlServer+";UID=sa;PWD=*******;DATABASE="+THIS.sqlDataBase) TO THIS.connSql
 
		RETURN
	ENDFUNC
 
	*********************
	PROTECTED FUNCTION closeSQL()
		IF THIS.connSql >0
			sqldisconnect(THIS.connSql)
			THIS.connSql=0
		ENDIF
		RETURN
	ENDFUNC
	*********************
	PROTECTED FUNCTION openDBF
		SELECT 0
		USE THIS.dBaseLocation+'\Status' INDEX THIS.dBaseLocation+'\Status', THIS.dBaseLocation+'\Status2',;
			THIS.dBaseLocation+'\Status3'
		SELECT 0
		USE THIS.dBaseLocation+'\JobLog' INDEX THIS.dBaseLocation+'\LogNum', THIS.dBaseLocation+'\LogCust', ;
			THIS.dBaseLocation+'\LogRef'
		SELECT 0
		USE THIS.dBaseLocation+'\Stats3' INDEX THIS.dBaseLocation+'\Stats3'
		SELECT 0
		USE THIS.dBaseLocation+'\Customer' SHARED INDEX THIS.dBaseLocation+'\CustNumb',;
			THIS.dBaseLocation+'\CustName', THIS.dBaseLocation+'\CustFax',;
			THIS.dBaseLocation+'\CustOffi', THIS.dBaseLocation+'\CustEM'
		SELECT 0
		USE THIS.dBaseLocation+'\Office' SHARED INDEX THIS.dBaseLocation+'\OffiNum',;
			THIS.dBaseLocation+'\OffiPhon', THIS.dBaseLocation+'\OffiName', THIS.dBaseLocation+'\OffiZip'
		SELECT 0
		USE THIS.dBaseLocation+'\Stalog' INDEX THIS.dBaseLocation+'\Stalog1', THIS.dBaseLocation+'\Stalog2'
		SELECT 0
		USE THIS.dBaseLocation+'\StampLog' INDEX THIS.dBaseLocation+'\StampLog', THIS.dBaseLocation+'\StampBy'
		SELECT 0
		USE THIS.datapath+'\serviceitem'
		RETURN
	ENDFUNC
	****************
 
	PROCEDURE INIT
		SET REPROCESS TO 5 SECONDS
		SET EXCLUSIVE OFF
		THIS.cErr=''
		THIS.iTesting = 0
		THIS.datapath='//NT_DATA1/Server/Dbase/foxpro6'
		=THIS.openSQL()
		*=This.openDBF()
		*STRTOFILE('init    '+TTOC(DATETIME())+CHR(13)+CHR(10),'C:\temp\sqlupdate.log',1)
		RETURN
	ENDFUNC
 
	PROCEDURE DESTROY
		THIS.closeSQL()
		CLOSE TABLES ALL
		RETURN
 
	ENDFUNC
ENDDEFINE
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:
507:
508:
509:
510:
511:
512:
513:
514:
515:
516:
517:
518:
519:
520:
521:
522:
523:
524:
525:
526:
527:
528:
529:
530:
531:
532:
533:
534:
535:
536:
537:
538:
539:
540:
541:
542:
543:
544:
545:
546:
547:
548:
549:
550:
551:
552:
553:
554:
555:
556:
557:
558:
559:
560:
561:
562:
563:
564:
565:
566:
567:
568:
569:
570:
571:
572:
573:
574:
575:
576:
577:
578:
579:
580:
581:
582:
583:
584:
585:
586:
587:
588:
589:
590:
591:
592:
593:
594:
595:
596:
597:
598:
599:
600:
601:
602:
603:
604:
605:
606:
607:
608:
609:
610:
611:
612:
613:
614:
615:
616:
617:
618:
619:
620:
621:
622:
623:
624:
625:
626:
627:
628:
629:
630:
631:
632:
633:
634:
635:
636:
637:
638:
639:
640:
641:
642:
643:
644:
645:
646:
647:
648:
649:
650:
651:
652:
653:
654:
655:
656:
657:
658:
659:
660:
661:
662:
663:
664:
665:
666:
667:
668:
669:
670:
671:
672:
673:
674:
675:
676:
677:
678:
679:
680:
681:
682:
683:
684:
685:
686:
687:
688:
689:
690:
691:
692:
693:
694:
695:
696:
697:
698:
699:
700:
701:
702:
703:
704:
705:
706:
707:
708:
709:
710:
711:
712:
713:
714:
715:
716:
717:
718:
719:
720:
721:
722:
723:
724:
725:
726:
727:
728:
729:
730:
731:
732:
733:
734:
735:
736:
737:
738:
739:
740:
741:
742:
743:
744:
745:
746:
747:
748:
749:
750:
751:
752:
753:
754:
755:
756:
757:
758:
759:
760:
761:
762:
763:
764:
765:
766:
767:
768:
769:
770:
771:
772:
773:
774:
775:
776:
777:
778:
779:
780:
781:
782:
783:
784:
785:
786:
787:
788:
789:
790:
791:
792:
793:
794:
795:
796:
797:
798:
799:
800:
801:
802:
803:
804:
805:
806:
807:
808:
809:
810:
811:
812:
813:
814:
815:
816:
817:
818:
819:
820:
821:
822:
823:
824:
825:
826:
827:
828:
829:
830:
831:
832:
833:
834:
835:
836:
837:
838:
839:
840:
841:
842:
843:
844:
845:
846:
847:
848:
849:
850:
851:
852:
853:
854:
855:
856:
857:
858:
859:
860:
861:
862:
863:
864:
865:
866:
867:
868:
869:
870:
871:
872:
873:
874:
875:
876:
877:
878:
879:
880:
881:
882:
883:
884:
885:
886:
887:
888:
889:
890:
891:
892:
893:
894:
895:
896:
897:
898:
899:
900:
901:
902:
903:
904:
905:
906:
907:
908:
909:
910:
911:
912:
913:
914:
915:
916:
917:
918:
919:
920:
921:
922:
923:
924:
925:
926:
927:
928:
929:
930:
931:
932:
933:
934:
935:
936:
937:
938:
939:
940:
941:
942:
943:
944:
945:
946:
947:
948:
949:
950:
951:
952:
953:
954:
955:
956:
957:
958:
959:
960:
961:
962:
963:
964:
965:
966:
967:
968:
969:
970:
971:
972:
973:
974:
975:
976:
977:
978:
979:

Select allOpen in new window

 

by: tmedleyPosted on 2007-12-27 at 15:38:25ID: 20538307

well permissions is a good guess given all of the hard coded paths to share names in the code like
//NT_DATA1/Server/Dbase
also all of the forward slashes in your paths look like they should be backslashes to me
also this lib references othere such as sqlupdate
also it appears that you are using this to open dbase files just using the USE commend in vfp as well as use the dbase indexes - this is a risky business as vfp has evolved way beyond the point where they were almost equivalent at the data level - I would be using the dBase ODBC driver personally
Have your developers proven this works in any environment?
Can you get then to write a test app that calls each function individually so you can pin down the failure?

 

by: nerd619Posted on 2007-12-28 at 11:36:11ID: 20544414

this dll's and com objects work fine in our 2k server production environment. we are trying to phase out all of our 2k servers over to 2ke servers so were just testing these dll's and com objects now. the developers think it's a permissions issue with 2k3 server.

 

by: mcse2007Posted on 2007-12-28 at 21:22:31ID: 20546882

Maybe you need to install MS hot fix, see the link below:

http://support.microsoft.com/default.aspx?scid=kb;en-us;906092

 

by: nerd619Posted on 2008-01-03 at 12:22:49ID: 20576288

the problem was related to the foxobject component service. in windows 2k the "enable access level check " is turned off be default. in windows 2k3 this option by default is turned on. we unselected the option under the security tab and then we had to shutdown the service.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...