Ed Leafe wrote: > > Generally it's not a good idea to run ad-hoc queries against your > bizobj, as that will delete the data set, and probably mess up some > of your data bindings. If you need to do something like you describe > above, it's much better to use the 'executeSafe()' method of the > bizobj. > > executeSafe() takes SQL and runs it with a separate auxilliary > cursor, so that the results don't overwrite the bizobj's main data. > It returns the cursor, which you can then inspect to see the returned > values. Here's a rewrite of your check method: > > def checkPhoneNum(self, phonenum) : """ Query phone number to see if > it is already in the db """ testSQL = """select * from names where > phone_num = %s""" crs = self.executeSafe(sql, (phonenum, )) isDupe = > (crs.RowCount> 0) > >
Noted. That works. Thanks, Jim _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[email protected]
