May 2003
Intermediate to advanced
720 pages
17h 50m
English
Making a web service method call for each ISBN you want to check may not be the most efficient approach possible. Fortunately, Amazon has the ability to search by category. In the next (and final) iteration of this program, you’ll dispense with your XML files with ISBNs and instead simply ask Amazon for all the books in the ASP.NET, C#, and VB.NET category.
Create a copy of the SalesRankDBWebServices project and name it SalesRankDBWebServices02, as shown in Example 16-6.
Example 16-6. SalesRankDBWebServices02
using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.Web.Services; using System.Text; using System.Text.RegularExpressions; using System.Net; namespace SalesRankDBWebService02 { public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.Button btnStart; private string connectionString; private System.Data.SqlClient.SqlConnection connection; private System.Data.SqlClient.SqlCommand command; private System.Windows.Forms.Timer timer1; private System.ComponentModel.IContainer components; private System.Windows.Forms.Button btnNow; private System.Windows.Forms.TextBox txtClock; private System.Windows.Forms.ListBox lbOutput; private int timeRemaining; const int WaitTime = 900; // 15 min. public Form1( ) { // // Required for Windows Form Designer support // InitializeComponent( ); } /// <summary> /// Clean up any resources being used. /// </summary> ...Read now
Unlock full access