1. Tracy Lamb
  2. PowerBuilder
  3. Sunday, 18 March 2018 15:43 PM UTC

My application connects to SQL 2012 via ODBC.  When I configure the ODBC source to use a SQL Server Native Client driver (either 10 or 11), I get errors with the smalldatetime fields in the database.  It works fine with just the SQL Server driver, although that's an older driver.  Wondering if I need to do something in my code and/or datawindow to accommodate the Native Client drivers?  Or are Native Client drivers not intended for ODBC connections?

The error when inserting a new record from a datawindow is:

Datetime Field Overflow : Fractional second precision exceeds the scale specified in the parameter binding

TIA,

~~~Tracy

 

Govinda Lopez @Appeon Accepted Answer Pending Moderation
  1. Friday, 23 March 2018 16:20 PM UTC
  2. PowerBuilder
  3. # 1

Hi Tracy,

 

Michael is right, the datatypes seems to be your problem. Try deleting the fractional seconds or reducing them as stated on the documentation.

 

 

Regards,

Comment
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Monday, 19 March 2018 11:32 AM UTC
  2. PowerBuilder
  3. # 2

Hi Tracy,

SQL Server supports 7 fractional digits for seconds whereas PowerBuilder supports no more than 6 digits.

You can find more details ((incl. how to "fix") here: PowerBuilder Help > Connecting to Your Database > Working with Native Database Interfaces > Using Microsoft SQL Server > SQL Server 2008 Features > Support for New Datatypes

 

HTH /Michael

Comment
There are no comments made yet.
Alfredo Aldama Accepted Answer Pending Moderation
  1. Monday, 19 March 2018 02:05 AM UTC
  2. PowerBuilder
  3. # 3

Hello,

Puedes probar regenerar el datawindow(s)  con conexión al dbms; usando el driver que no funciona, Es probable que cuando creaste el datawindow la conexion fue con otro driver.  Tambien puedes probar dando edit

datasource ahi podras ver que tipo de dato tienes realmente mapeado al DBMS (es posible modificarlo )

Regards !

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.