Menu

#70 BigInt problem

7.1.2-Stable
closed
BigInt type (1)
2014-06-11
2014-05-07
Nargott
No

Windows 7, Lazarus 1.2.2, MySQL 5.5, ZeosLib 7.1.3a-stable

The table cells, that has an bigint MySQL type, loaded in DBGrid as "0". It is wrong. Check attachments.

3 Attachments

Discussion

  • Nargott

    Nargott - 2014-05-07
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,3 @@
    -The table calls, that has an bigint MySQL type loaded in DBGrid as "0". It is wrong. 
    +Windows 7, Lazarus 1.2.2, MySQL 5.5, ZeosLib 7.1.3a-stable
    +
    +The table cells, that has an bigint MySQL type, loaded in DBGrid as "0". It is wrong. Check attachments. 
    
     
  • EgonHugeist

    EgonHugeist - 2014-06-09

    Seems to happen because of unsigned bigint? Well actually i'm reworking such spezials on 7.2 (SVN). But i've no idea how to make it running with the current FPC fields! There is no type available for UInt64/QWord fields, thought. To prevent this case i did also start to write TZFields (optional and work in progress since dbc need to be fixed too).

    Propose you cast this field to a string type untill we get it fully running.

    Objections?

    Cheers, Michael

     
  • Nargott

    Nargott - 2014-06-09

    No objections for me. I know that problem in FPC, but it must to be resolved some way.
    I can to cast fields in string type, but didn't know how to do this...

     
  • EgonHugeist

    EgonHugeist - 2014-06-10

    http://dev.mysql.com/doc/refman/5.1/de/cast-functions.html

    Select Cast(YOUR_UNSIGNED_BIGINT_FIELD, VARCHAR(20)) as Your_Field_Name from .........

    Do you think we can close this ticket?

     
  • EgonHugeist

    EgonHugeist - 2014-06-10
    • assigned_to: EgonHugeist
     
  • Nargott

    Nargott - 2014-06-11

    You can close this ticket, but your solution is only workaround I think.

     
    • EgonHugeist

      EgonHugeist - 2014-06-11

      It is a workaround, indeed. But in current stage:
      It wont't be able to get it running with current Compiler given TField descendants of FPC or Delphi (below XE). Also is there NO way to use Parameters as true UInt64/QWord values. The current ONLY way is using string fields for this case.
      Yesterday i commited a huge MySQL patch for dbc-internals to be able to fetch UInt64 values this than works for all compiler version we do support.
      But getting TFields and TParameters running for all numeric types means a loads of remaining work.

      Thank you for confirming to close this ticket.
      Michael

       
  • EgonHugeist

    EgonHugeist - 2014-06-11
    • status: unread --> closed
     

Log in to post a comment.