Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: How to handle errors


Member

Status: Offline
Posts: 20
Date: Jul 14, 2009
How to handle errors
Permalink   
 


Hi,str =

"https://secure.ifbyphone.com/click_to_xyz.php?app=cts&acct=XXX&scheduleonly&survo_id=ccc&key=dfgdg&type=2&sdate=" & StartDate & "&edate=" & EndDate & "&tz=Pacific&phone=" & csvfile & "&attempts=3&desc=Mydfgdfg" 

 

Dim hRequest As HttpWebRequest = WebRequest.Create(str)

 

Try

 

Dim resp As HttpWebResponse = hRequest.GetResponse() 

Dim sr AsNew StreamReader(resp.GetResponseStream()) 

Dim results AsString = sr.ReadToEnd()sr.Close()lblCallStatus.Visible =

True

lblCallStatus.Text = results

 

Catch ex As WebExceptionResponse.Write(

"<font color=red>Error<br />Status: " & ex.Status & "Message: " & ex.Message & "</font>") 

EndTry

in the above code i want to handle if there is any error dure csv file does not have write format or any erros records not found in .csv file etcc.
How to handle this.



__________________


Member

Status: Offline
Posts: 20
Date: Jul 14, 2009
Permalink   
 

For the above , i want to handle , like .csv does not have right format or number column missing or invalid column name etc..

Please let me know how to handle this in above code.

__________________


Veteran Member

Status: Offline
Posts: 45
Date: Jul 14, 2009
Permalink   
 

Please track: http://www.phonemashup.com/forum.spark?forumID=130002&p=3&topicID=29368179

__________________
-Phil Seguin
pseguin@ifbyphone.com
Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.

Post to Digg Post to Del.icio.us


Create your own FREE Forum
Report Abuse
Powered by ActiveBoard