Loading ...
Sorry, an error occurred while loading the content.

fdb: conversion error from string (datetime value)

Expand Messages
  • Maximiliano Robaina
    Hi (again), Testing django-firebird I caught this error: Error while executing SQL statement: n- SQLCODE: -303 n- Incompatible column/host variable data
    Message 1 of 5 , Sep 26, 2012
    • 0 Attachment
      Hi (again),

      Testing django-firebird I caught this error:

      Error while executing SQL statement:\n- SQLCODE: -303\n- Incompatible column/host variable data type\n- Dynamic SQL Error\n- SQL error code = -303\n- conversion error from string "2012-10-10 16:34:30.072356"', -303, 335544569)

      (BTW, I can found what -303 is)


      The sql statement is:

      INSERT INTO "DJANGO_SESSION" ("SESSION_KEY", "SESSION_DATA", "EXPIRE_DATE")
      VALUES ('239a187593169b5b12cac16fbb19032c', 'ZTliNzMyZTU4MWZkODI0ODg4ZTM5MzQ3Yzk4YzdlYmQ4ODkzNWE0ODqAAn1xAS4=', '2012-10-10 16:34:30.072356')

      Then, I run this sql on FlameRobin and I get a different error code:
      SQL Message : -413
      Overflow occurred during data type conversion.

      Engine Code    : 335544334
      Engine Message :
      conversion error from string "2012-10-10 16:34:30.072356"



      So, two questions:

      1. What is the real error code -413 or -303?

      2. What is the best approach to resolve this? Replaces 6 digits microseconds to 4 digits allowed in Firebird?



      --
      Maxi












       
      --
      Maxi


      b: http://maxirobaina.tumblr.com
      t: http://twitter.com/maxirobaina
    • Pavel Cisar
      Hi, ... Both :-) You must realize that in FlameRobin, you send to server the whole command as one string, while in FDB (I m sure) you used parameters. The
      Message 2 of 5 , Sep 27, 2012
      • 0 Attachment
        Hi,


        Dne 27.9.2012 00:10, Maximiliano Robaina napsal(a):
        > Hi (again),
        >
        > Testing django-firebird I caught this error:
        >
        > Error while executing SQL statement:\n- SQLCODE: -303\n- Incompatible
        > column/host variable data type\n- Dynamic SQL Error\n- SQL error code
        > = -303\n- conversion error from string "2012-10-10 16:34:30.072356"',
        > -303, 335544569)
        >
        > (BTW, I can found what -303 is)
        >
        > The sql statement is:
        >
        > INSERT INTO "DJANGO_SESSION" ("SESSION_KEY", "SESSION_DATA",
        > "EXPIRE_DATE") VALUES ('239a187593169b5b12cac16fbb19032c',
        > 'ZTliNzMyZTU4MWZkODI0ODg4ZTM5MzQ3Yzk4YzdlYmQ4ODkzNWE0ODqAAn1xAS4=',
        > '2012-10-10 16:34:30.072356')
        >
        > Then, I run this sql on FlameRobin and I get a different error code:
        > SQL Message : -413 Overflow occurred during data type conversion.
        >
        > Engine Code : 335544334 Engine Message : conversion error from
        > string "2012-10-10 16:34:30.072356"
        >
        > So, two questions:
        >
        > 1. What is the real error code -413 or -303?

        Both :-) You must realize that in FlameRobin, you send to server the
        whole command as one string, while in FDB (I'm sure) you used
        parameters. The error is discovered by different layers, so error code
        is different. Why they're different when it's basically the same thing?
        Probably an artifact of Firebird's code evolution.

        > 2. What is the best approach to resolve this? Replaces 6 digits
        > microseconds to 4 digits allowed in Firebird?

        Most likely.

        best regards
        Pavel Cisar
        IBPhoenix
      • mariuz
        ... You need to do the conversion from 6 to 4 like in the kinterbase driver for django 6 digits microseconds are not implemented in Firebird yet I will open a
        Message 3 of 5 , Sep 27, 2012
        • 0 Attachment
          On Wed, Sep 26, 2012 at 03:10:07PM -0700, Maximiliano Robaina wrote:
          > Hi (again),
          >
          > Testing django-firebird I caught this error:
          >
          > Error while executing SQL statement:\n- SQLCODE: -303\n- Incompatible column/host variable data type\n- Dynamic SQL Error\n- SQL error code = -303\n- conversion error from string "2012-10-10 16:34:30.072356"', -303, 335544569)
          >
          > (BTW, I can found what -303 is)
          >
          >
          > The sql statement is:
          >
          > INSERT INTO "DJANGO_SESSION" ("SESSION_KEY", "SESSION_DATA", "EXPIRE_DATE")
          > VALUES ('239a187593169b5b12cac16fbb19032c', 'ZTliNzMyZTU4MWZkODI0ODg4ZTM5MzQ3Yzk4YzdlYmQ4ODkzNWE0ODqAAn1xAS4=', '2012-10-10 16:34:30.072356')
          >
          > Then, I run this sql on FlameRobin and I get a different error code:
          > SQL Message : -413
          > Overflow occurred during data type conversion.
          >
          > Engine Code    : 335544334
          > Engine Message :
          > conversion error from string "2012-10-10 16:34:30.072356"
          >
          >
          >
          > So, two questions:
          >
          > 1. What is the real error code -413 or -303?
          >
          > 2. What is the best approach to resolve this? Replaces 6 digits microseconds to 4 digits allowed in Firebird?

          You need to do the conversion from 6 to 4 like in
          the kinterbase driver for django


          6 digits microseconds are not implemented in Firebird yet

          I will open a bug/feature request
        • mariuz
          ... Bug is open in the core tracker , please vote for it http://tracker.firebirdsql.org/browse/CORE-3939
          Message 4 of 5 , Sep 27, 2012
          • 0 Attachment
            On Thu, Sep 27, 2012 at 12:49:15PM +0300, mariuz wrote:
            > On Wed, Sep 26, 2012 at 03:10:07PM -0700, Maximiliano Robaina wrote:
            > > Hi (again),
            > >
            > > Testing django-firebird I caught this error:
            > >
            > > Error while executing SQL statement:\n- SQLCODE: -303\n- Incompatible column/host variable data type\n- Dynamic SQL Error\n- SQL error code = -303\n- conversion error from string "2012-10-10 16:34:30.072356"', -303, 335544569)
            > >
            > > (BTW, I can found what -303 is)
            > >
            > >
            > > The sql statement is:
            > >
            > > INSERT INTO "DJANGO_SESSION" ("SESSION_KEY", "SESSION_DATA", "EXPIRE_DATE")
            > > VALUES ('239a187593169b5b12cac16fbb19032c', 'ZTliNzMyZTU4MWZkODI0ODg4ZTM5MzQ3Yzk4YzdlYmQ4ODkzNWE0ODqAAn1xAS4=', '2012-10-10 16:34:30.072356')
            > >
            > > Then, I run this sql on FlameRobin and I get a different error code:
            > > SQL Message : -413
            > > Overflow occurred during data type conversion.
            > >
            > > Engine Code    : 335544334
            > > Engine Message :
            > > conversion error from string "2012-10-10 16:34:30.072356"
            > >
            > >
            > >
            > > So, two questions:
            > >
            > > 1. What is the real error code -413 or -303?
            > >
            > > 2. What is the best approach to resolve this? Replaces 6 digits microseconds to 4 digits allowed in Firebird?
            >
            > You need to do the conversion from 6 to 4 like in
            > the kinterbase driver for django
            >
            >
            > 6 digits microseconds are not implemented in Firebird yet
            >
            > I will open a bug/feature request

            Bug is open in the core tracker , please vote for it

            http://tracker.firebirdsql.org/browse/CORE-3939
          • maxi_robaina
            ... Ok, actually this is that I m doing. I just wanted to know if there was a better approach. ... Excellent.
            Message 5 of 5 , Sep 27, 2012
            • 0 Attachment
              --- In firebird-python@yahoogroups.com, mariuz <mariuz@...> wrote:
              >
              > On Wed, Sep 26, 2012 at 03:10:07PM -0700, Maximiliano Robaina wrote:
              > > Hi (again),
              > >
              > > Testing django-firebird I caught this error:
              > >
              > > Error while executing SQL statement:\n- SQLCODE: -303\n- Incompatible column/host variable data type\n- Dynamic SQL Error\n- SQL error code = -303\n- conversion error from string "2012-10-10 16:34:30.072356"', -303, 335544569)
              > >
              > > (BTW, I can found what -303 is)
              > >
              > >
              > > The sql statement is:
              > >
              > > INSERT INTO "DJANGO_SESSION" ("SESSION_KEY", "SESSION_DATA", "EXPIRE_DATE")
              > > VALUES ('239a187593169b5b12cac16fbb19032c', 'ZTliNzMyZTU4MWZkODI0ODg4ZTM5MzQ3Yzk4YzdlYmQ4ODkzNWE0ODqAAn1xAS4=', '2012-10-10 16:34:30.072356')
              > >
              > > Then, I run this sql on FlameRobin and I get a different error code:
              > > SQL Message : -413
              > > Overflow occurred during data type conversion.
              > >
              > > Engine Code    : 335544334
              > > Engine Message :
              > > conversion error from string "2012-10-10 16:34:30.072356"
              > >
              > >
              > >
              > > So, two questions:
              > >
              > > 1. What is the real error code -413 or -303?
              > >
              > > 2. What is the best approach to resolve this? Replaces 6 digits microseconds to 4 digits allowed in Firebird?
              >
              > You need to do the conversion from 6 to 4 like in
              > the kinterbase driver for django
              >
              >
              > 6 digits microseconds are not implemented in Firebird yet

              Ok, actually this is that I'm doing. I just wanted to know if there was a better approach.

              >
              > I will open a bug/feature request
              >
              Excellent.
            Your message has been successfully submitted and would be delivered to recipients shortly.