Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.

Public Report
Report From: Blackfish SQL/Data Express/StorageDataSet    [ Add a report in this area ]  
Report #:  6594   Status: Open
DataModule query - query.setDate doesn't work when passing variable.
Project:  JDataStore Build #:  10.0.176.0
Version:    7.0 Submitted By:   Peter Zaharkiv
Report Type:  Basic functionality failure Date Reported:  12/10/2003 11:25:24 AM
Severity:    Commonly encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All versions Internal Tracking #:   193897
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
query.setDate( string, Date) doesn't work as documented.

Handling Date types in dbSwing appears to be unstable or erroneous.

RESULTING ERROR:

cannot resolve symbol: method setDate (java.lang.String,java.util.Date)in class com.borland.dx.sql.dataset.QueryDataSet at line 1,582 (1,582:40)

Steps to Reproduce:
     ....
     ....
     Date contracted_date;
     contracted_date = dataModule1.query1.getDate("CONTRACTED_DATE");
     ....
     dataModule1.query1.setDate("Contracted Date", contracted_date);
     ....



RESULTING ERROR:

cannot resolve symbol: method setDate (java.lang.String,java.util.Date)in class com.borland.dx.sql.dataset.QueryDataSet at line 1,582 (1,582:40)

Workarounds
By not using a Date variable, but dirrectly feeding a query .getDate( String, Date ) into a query.setDate( String, Date)

   ....
     ....
//     Date contracted_date;
//     contracted_date = dataModule1.query1.getDate("CONTRACTED_DATE");
     ....
     dataModule1.query1.setDate("Contracted Date", dataModule1.query1.getDate("CONTRACTED_DATE"));
     ....
Attachment
None
Comments

Rudolph Janse van Rensburg at 7/24/2007 12:14:32 AM -
I have the same problem the work around is only applicable if values exists in table. I have done an calculation on an existing date result returned in String & Date Objects but can not set new value in table using query.setDate("Column", Date), how would I convert this value to an exceptable format or apply an work around.

Any solution will be greatly appriciated

Server Response from: ETNACODE01