Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Could not parse SQL TimeStamp string


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 5 - Last Post: May 4, 2015 1:11 PM Last Post By: Barry Wood
Barry Wood

Posts: 21
Registered: 7/16/01
Could not parse SQL TimeStamp string  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 1, 2015 2:07 AM
Hi

I have a TFDQuery set up using a Parameter to extract data. The data is held in MS SQL Server 2008 and the field is a MS SQL DateTime field. The Parameter data type I've set as both ftDateTime and ftSQLTimeStamp (either extracts the data in the FireDAC Query Editor). When I run the application I get this error: 'Could not parse SQL TimeStamp string'. I get this error every time the query is run.

What is also odd is that the query actually runs OK and I get the result set I need, so whatever the error is telling me isn't affecting the result, other than the annoying error message.

I'm loath to just trap this error and ignore it but I can't figure out how I can 'fix' the issue. This whole datetime issue with MS SQL Server is really annoying, I'm nearly at the point of never using these types of fields as they always throw up conversion errors.

Any suggestions would be of great help.
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: Could not parse SQL TimeStamp string  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 4, 2015 1:40 AM   in response to: Barry Wood in response to: Barry Wood
Try to create a simple test application reproducing the issue, post it to
attachments forum. Then I will check it.

--
With best regards,
Dmitry Arefiev / FireDAC Architect
Barry Wood

Posts: 21
Registered: 7/16/01
Re: Could not parse SQL TimeStamp string  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 4, 2015 1:11 PM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Really odd, I just went through everything very carefully, couldn't see anything to change differently, and now it works OK. Very strange.

Thanks for your comments and suggestion to help me, really appreciated.
Robert Triest

Posts: 687
Registered: 3/24/05
Re: Could not parse SQL TimeStamp string  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 4, 2015 3:21 AM   in response to: Barry Wood in response to: Barry Wood
Maybe your TDateTime param is still hanging into a DB component. (Data Access, Data Control)
Normally accessed by rightmouseclick on the component. Like a FieldDef in a Stringgrid or in
Field Editor of the Query component.
Robert Triest

Posts: 687
Registered: 3/24/05
Re: Could not parse SQL TimeStamp string  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 4, 2015 3:26 AM   in response to: Barry Wood in response to: Barry Wood
Maybe your TDateTime param is still hanging into a DB component. (Data Access, Data Control)
Normally accessed by rightmouseclick on the component. Like a FieldDef in a Stringgrid or in
Field Editor of the Query component.
Barry Wood

Posts: 21
Registered: 7/16/01
Re: Could not parse SQL TimeStamp string  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 4, 2015 1:09 PM   in response to: Robert Triest in response to: Robert Triest
MAny thanks for your suggestion.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02