I am having trouble setting a bind variable to a (oracle 8) 2 digit number.
(The real query is rather large but it does work with '07' hard coded in place of the ?.) Now according to the db myMonth is a NUMBER(2) type. I tried the following:
but I get an Invalid number exception from the oracle drivers. What do i need to call to bind a 2 digit number in a prepaired statement other than raw string concat'n?
[This message has been edited by Heath Lilley (edited January 16, 2001).]
posted 15 years ago
Try setInt(). If that doesn't work, then you can try this technique. psuedo-code 1. Get a database connection. 2. Get the metadata object. 3. Execute a getColumns() on that table. 4. Find the correct column name and get its column type from the result set. 5. Using the column type as the type for your setXXX() statement. -Peter [This message has been edited by Peter Tran (edited January 16, 2001).]