Ask a Question related to Coldfusion Database Access, Design and Development.
-
FredPope #1
Error Selecting Timestamps - String Index out of Range
We are running CFMX 6.1 on Linux Connecting to a PostgreSQL 7.X database
cluster.
When we try to perform a query that selects a timestamp from the database, we
are getting a string index out of range error.
<errorMessage>
String index out of range: 23
The error occurred in /home/fred/public_html/sync/testdate.cfm: line 4
</errorMessage>
4: <cfquery datasource="#db#" name="get">
5 : select datein from inventory
6 : </cfquery>
<stackTrace>
java.lang.StringIndexOutOfBoundsException: String index out of range: 23
at java.lang.String.charAt(String.java:444)
at org.postgresql.jdbc1.ResultSet.getTimestamp(Result Set.java:536)
at org.postgresql.jdbc1.ResultSet.getObject(ResultSet .java:940)
</stackTrace>
The problem I *think* is that it is trying to look at the date as a string
instead of a Timestamp.
datein in the database is classified as a Timestamp with timezone.
An example field from the database : 2004-10-05 17:36:06.483
Is there a way to cast this object to a different to a timestamp so this error
does not occur. I was able to find some documentation with regards to this
problem with a ODBC error, but not with a JDBC error.
Thanks in advance.
FredPope Guest
-
STRING INDEX OUT OF RANGE: -12
I am using a form to upload images into the images folder. Tha path to the image it is stored into the database. all works fine on my pc using... -
string index out of range: 0
I cant see why I am getting this. I am passing some vars from one page to another and would only like to display the variable if it is defined. Here... -
String index out of range: -16
I am using the CFFILE shown below to try and upload a PDF file. I get the error: String index out of range: -16 Am running CFMX 6.1 on a WIN2000... -
String Index Out of Range Error on String ComparisonQuery
I am running CFMX 6.1 on Linux connecting to a PostgreSQL database server. I am performing a simple SELECT * where somestring = thisstring When I... -
String index out of range: -6
I have a form that allows people to upload files to the server. Details about the users are stored to a database as is the location of their uploads...



Reply With Quote

