Advertisement
Advertisement
| 07.12.2008 at 12:20PM PDT, ID: 23559918 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: |
cmd = new FbCommand("SELECT ISBN, BookNbr, Condn FROM tBooks WHERE Stat = 'For Sale'AND ISBN != '' AND DoNotReprice != 'T' ORDER BY 'BookNbr' ASC", bookConn);
try
{
if (bookConn.State == ConnectionState.Closed)
bookConn.Open();
dr = cmd.ExecuteReader();
int j = 0;
while (dr.Read()) // place all ISBNs in the array, starting pos -> 1 (0 is count)
{
listISBNs[j].ISBN = dr.GetString(0); // ISBN
listISBNs[j].SKU = dr.GetString(1); // get SKU while we're here
listISBNs[j++].bookType = dr.GetString(2).ToString().ToLower().Contains("new") ? 'n' : 'u'; // if condition is 'new'
}
}
|