if submitting the command was not successful you will get back 0, pointer to TSQLResult object otherwise. You must delete this return object (which in case of an insert does not contain any rows of course). Cheers, Fons. "Stephen A. Fuqua" wrote: > > Here's the basic situation: I want to upload data via SQL to a database, > and then check if the insert statement executed properly. Idealy, if my > database object is called "db", I would like to have db->Query("insert > ...") return a value indicating success. Obviously, values are returned > if the query string contains a select statement. But what if its just a > command, not a question? > > In summation: how do I tell if a query command executed properly? > > Stephen A. Fuqua > > sfuqua@hep.utexas.edu // High Energy Physics Lab > Research Assistant // University of Texas at Austin > ph: 512.475.8673 // http://www.hep.utexas.edu/~sfuqua -- Org: CERN, European Laboratory for Particle Physics. Mail: 1211 Geneve 23, Switzerland E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248 WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7677910
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:37 MET