Quantcast
Channel: SCN: Message List - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 7329

Conversion failed when converting date and/or time from character string.

$
0
0

My PB 10.5 app is connecting to a Microsoft SQL Azure cloud database via ODBC. I am getting the following error:

 

[Microsoft][SQL Server Native Client 11.0][SQL Server]Conversion failed when converting date and/or time from character string.

 

Here is the dbtrace entry:

 

(5a913c0): update WS_FILECONTENT SET FILESIZE =641 , ZLIBSIZE =180 , FILEDATE ={ts '2015-02-10 03:11:45.507000'} WHERE ID =1  (290.509 MS / 4379.111 MS)

 

Here is the inline SQL statement:

 

UPDATE WS_FILECONTENT

       SET FILESIZE = :ll_length,

              ZLIBSIZE = :ll_zlength,

              FILEDATE = :ldt_filedate

WHERE ID = :al_contentid;

 

The column FILEDATE is defined as datetime. I could change the datatype to datetime2 but that would mean that all the datetime columns in the database need to change.

 

Is there a way to tell PowerBuilder to only pass 3 decimal places for the seconds?


Viewing all articles
Browse latest Browse all 7329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>