![]() ![]() ResultSetMetaData object Throws: SQLException - if a database access error occurs or Returns: the description of a ResultSet object's columns or NOTE: Using this method may be expensive for some drivers due On the ResultSet object that is returned. It and then invoking the ResultSet.getMetaData method PreparedStatement object rather than waiting to execute Possible to know about the ResultSet object that it will That will be returned when this PreparedStatement objectīecause a PreparedStatement object is precompiled, it is Information about the columns of the ResultSet object Retrieves a ResultSetMetaData object that contains The currently running Statement See Also: Statement.execute(), Method has been exceeded and has at least attempted to cancel Timeout value that was specified by the setQueryTimeout Or an argument is supplied to this method SQLTimeoutException - when the driver has determined that the Object false if the first result is an updateĬount or there is no result Throws: SQLException - if a database access error occurs Returns: true if the first result is a ResultSet To retrieve the result you must call getMoreResults to Method handles these complex statements as well as the simplerįorm of statements handled by the methods executeQuery Some prepared statements return multiple results the execute Or the type of the given object is ambiguousĮxecutes the SQL statement in this PreparedStatement object, Marker in the SQL statement if a database access error occurs x - the object containing the input parameter value Throws: SQLException - if parameterIndex does not correspond to a parameter Parameters: parameterIndex - the first parameter is 1, the second is 2. ![]() Object is of a class implementing more than one of the interfaces named above. Note: This method throws an exception if there is an ambiguity, for example, if the Instead of setObject(int parameterIndex, Object x). ![]() SetObject(int parameterIndex, Object x, int sqlType) For maximum portability, the setNull or the Note: Not all databases allow for a non-typed Null to be sent to Or Array, the driver should pass it to the database as a If, on the other hand, the object is of a class implementing The JDBC driver should call the method SQLData.writeSQL If the object is of a class implementing the interface SQLData, Specific abstract data types, by using a driver-specific Java Note that this method may be used to pass datatabase. Will be converted to the corresponding SQL type before being ![]() The JDBC specification specifies a standard mapping from Sets the value of the designated parameter using the given object. setBinaryStream void setBinaryStream(int parameterIndex,.This method is called on a closed PreparedStatement SQLFeatureNotSupportedException - if the JDBC driver does not support Unicode parameter value length - the number of bytes in the stream Throws: SQLException - if parameterIndex does not correspond to a parameter x - a java.io.InputStream object that contains the The byte format of the Unicode stream must be a Java UTF-8, as defined in the The JDBC driver willĭo any necessary conversion from Unicode to the database char format. Stream as needed until end-of-file is reached. When a very large Unicode value is input to a LONGVARCHAR Sets the designated parameter to the given input stream, which This method is called on a closed PreparedStatement Marker in the SQL statement if a database access error occurs or x - the Java input stream that contains the ASCII parameter value length - the number of bytes in the stream Throws: SQLException - if parameterIndex does not correspond to a parameter Java stream object or your own subclass that implements the Note: This stream object can either be a standard The JDBC driver willĭo any necessary conversion from ASCII to the database char format. Data will be read from the streamĪs needed until end-of-file is reached. Parameter, it may be more practical to send it via a When a very large ASCII value is input to a LONGVARCHAR Sets the designated parameter to the given input stream, which will have ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |