mrjeffy321
10-21-2004, 03:43 PM
two diferent questions here:
1. the more inportant one. How can I tell how many results were returned in my result set after I query a database with an SQL statement. I need to know becuase depending on how many I get, I will need to take diferent courses of action, there are only 3 possibilies either I get nothing back, one back, or more than 1 back, I need to test how many I get.
2. is there a way to test whether or not I have an established connection allready to a database? I would like to be able to know this so I can tell if I need to close it first, before I open a new one. I thought I could just use my own boolean vaiable and set it myself when I had one or when I closed one, but is there a way of getting it straight from the connection?
1. the more inportant one. How can I tell how many results were returned in my result set after I query a database with an SQL statement. I need to know becuase depending on how many I get, I will need to take diferent courses of action, there are only 3 possibilies either I get nothing back, one back, or more than 1 back, I need to test how many I get.
2. is there a way to test whether or not I have an established connection allready to a database? I would like to be able to know this so I can tell if I need to close it first, before I open a new one. I thought I could just use my own boolean vaiable and set it myself when I had one or when I closed one, but is there a way of getting it straight from the connection?