Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 To: Daniel Hofford
  Where is Daniel Hofford?
 Ocala
 Florida - United States
 Daniel Hofford
 Tags
Subject: RE: VPN Recovery
Thread ID: 143086 Message ID: 143088 # Views: 3 # Ratings: 0
Version: Visual FoxPro 9 Category: Network and Computer Management
Date: Friday, August 24, 2007 7:04:20 PM         
   


> Can anyone tell me how to recover from a vpn wire loss. If I am sending data when the connection is lost what do I need to do to keep from losing the program?
> This is the code:
>
SELECT timeinput
> 	WAIT WINDOW "Transmitting data..." NOWAIT
> 	CLEAR
> 	?TIME()
> 	STORE SQLSTRINGCONNECT("Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=N:\FOXPRO\DH\DH_RTDC;Exclusive=No; Collate=Machine;NULL=NO;DELETED=YES;BACKGROUNDFETCH=NO" ) TO lnHandle
> 	SCAN FOR sent =.F. AND !EMPTY(t_out)
> 		ab=wo  &&C
> 		bc=lunch  &&L
> 		CD=IIF(!EMPTY(t_in),t_in,.NULL.) &&DT
> 		de=IIF(!EMPTY(t_out),t_out,.NULL.)   &&DT
> 		ef=ALLTRIM(route)  &&C
> 		fg=empid  &&C
> 		gh=IIF(!EMPTY(sysdate1),sysdate1,.NULL.) &&DT
> 		hi=IIF(!EMPTY(sysdate2),sysdate2,.NULL.) &&DT
> 		ij=COMPLETED  &&L
> 		jk=qtybuilt  &&N
> 		kl=qty2bld  &&N
> 		lm=t_time  &&N
> 		mn=acctime &&N
> 		no=addtime &&N
> 		op=newfld &&C
> 		TEXT TO lcSQL TEXTMERGE NOSHOW PRETEXT 15
>  	 		 INSERT INTO N:\FOXPRO\DH\DH_RTDC\vpntest (wo,lunch,t_in,t_out,route,empid,sysdate1,sysdate2,completed,qtybuilt,qty2bld,t_time,acctime,addtime,newfld) VALUES ("<<ab>>",?bc,?cd,?de,"<<ef>>","<<fg>>",?gh,?hi,?ij,?jk,?kl,?lm,?mn,?no,"<<op>>")
> 		ENDTEXT
> 		IF lnHandle > 0
> 			= SQLSETPROP(lnHandle, 'asynchronous', .F.)
> 			=SQLPREPARE(lnHandle,lcSql)
> 			IF SQLEXEC(lnHandle,lcSql) < 0
> 				lcErrorMsg = "SQL failure ON INSERT vpntest."
> 				AERROR( laError )
> 				=MESSAGEBOX("Something went wrong here"+CHR(13);
> 					+(lcErrorMsg)+CHR(13);
> 					+"Error #: "+ALLTRIM(STR(laError(1)))+CHR(13);
> 					+"Error Message: "+ALLTRIM(laError(2)),16,"Error Message")
> 				= SQLDISCONNECT(lnHandle)
> 				RETURN
> 				ELSE
> 				replace sent WITH .t.
> 			ENDIF
> 		ENDIF
> 	ENDSCAN
> 	= SQLDISCONNECT(lnHandle)
> 	WAIT WINDOW NOWAIT "Data Transmitted!"
> 

> Dan
> "Our gold does not chink and glitter. It gleams in the sun and neighs in the dark." Chief Joseph

Dan,

When you loose your VPN, it is basically the same as if you were to loose your LAN connection. You probably won't be able to fix it in code - if your VPN goes down, it is typically because you have a problem with your Internet. Once you get your internet back, re-establish your VPN and pick up where you left off.

Ken
You shall know the truth - and the truth shall set you free. (John 8:33)

ENTIRE THREAD

VPN Recovery Posted by Daniel Hofford @ 8/24/2007 6:54:24 PM
RE: VPN Recovery Posted by Ken Murphy @ 8/24/2007 7:04:20 PM
RE: VPN Recovery Posted by Daniel Hofford @ 8/24/2007 9:07:57 PM
RE: VPN Recovery Posted by Ken Murphy @ 8/25/2007 1:56:00 AM
RE: VPN Recovery Posted by Daniel Hofford @ 8/25/2007 3:03:33 AM
RE: VPN Recovery Posted by Ken Murphy @ 8/25/2007 2:27:47 PM
RE: VPN Recovery Posted by Eric den Doop @ 8/24/2007 9:02:07 PM
RE: VPN Recovery Posted by Daniel Hofford @ 8/24/2007 9:09:55 PM
RE: VPN Recovery Posted by Borislav Borissov @ 8/24/2007 9:28:00 PM
RE: VPN Recovery Posted by Daniel Hofford @ 8/24/2007 9:44:41 PM
RE: VPN Recovery Posted by Borislav Borissov @ 8/24/2007 9:49:56 PM
RE: VPN Recovery Posted by Daniel Hofford @ 8/24/2007 9:56:24 PM
RE: VPN Recovery Posted by Borislav Borissov @ 8/24/2007 10:41:07 PM
RE: VPN Recovery Posted by Daniel Hofford @ 8/24/2007 10:46:28 PM
RE: VPN Recovery Posted by Borislav Borissov @ 8/24/2007 10:48:32 PM
RE: VPN Recovery Posted by tushar @ 8/25/2007 8:57:40 AM
RE: VPN Recovery Posted by Eric den Doop @ 8/25/2007 10:08:19 AM
RE: VPN Recovery Posted by Daniel Hofford @ 8/26/2007 2:11:00 AM
RE: VPN Recovery Posted by Eric den Doop @ 8/26/2007 9:30:23 AM
RE: VPN Recovery Posted by Daniel Hofford @ 8/26/2007 3:54:40 PM
RE: VPN Recovery Posted by Eric den Doop @ 8/26/2007 9:13:50 PM
RE: VPN Recovery Posted by Daniel Hofford @ 8/27/2007 12:26:18 AM
RE: VPN Recovery Posted by Daniel Hofford @ 8/26/2007 2:10:21 AM
RE: VPN Recovery Posted by tushar @ 8/26/2007 8:13:46 AM
RE: VPN Recovery Posted by Daniel Hofford @ 8/26/2007 3:57:07 PM
RE: VPN Recovery Posted by tushar @ 8/26/2007 4:27:33 PM