I want to work with Int64 var in my DBInspector, how?
NextDBInspector and Int64
#1
Posted 05 February 2012 - 09:23 PM
I want to work with Int64 var in my DBInspector, how?
#2
Posted 05 February 2012 - 10:37 PM
You may use NxDBSpinItem.
Please tell me if you find some problems.
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#3
Posted 06 February 2012 - 01:50 AM
but I have a problem, It can't handle value more then 294967295. or tell me if I miss something
#4
Posted 06 February 2012 - 03:34 AM
Spin item store Double value so it should be fine for using. Maybe you are not using proper TField type? But , I may set a {$DEFINE} to use Extended instead of Double.
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#5
Posted 06 February 2012 - 08:30 AM
I use MySQL, and BIGINT(unsigned) for the Field type.
this is screen capture of sample problem

In my NextDBGrid it works fine, but I get invalid value in the NxDBInspector.
for Field with value 2147483648 it would be come -2147483648 in NxDBSpinItem
they both use the same DataSource and off course same DataSet.
but I get different value.
I use NxDBNumberColumn for NxDBGrid side.
#6
Posted 06 February 2012 - 09:07 AM
I will do a investigation to see what may cause a problem.
thanks.
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#7
Posted 07 February 2012 - 08:17 AM
I have investigated more.
Can you please tell me which DataType (ftInteger, ftLongInt...) return Field connected to this field? This will help.
Thanks.
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#8
Posted 07 February 2012 - 01:33 PM
MyQuery1.Fields[3].DataType
It is ftLargeInt
unfortunately there is no TField.AsInt64. maybe we can use TLargeIntField(DataField).AsLargeInt ?
thankyou
#9
Posted 08 February 2012 - 02:16 AM
Can you please tell me which Delphi version you use? It seems that AsLargeInt existing in Delphi 2010+ , but not sure it is existing in your version.
Thank you. I hope that I will find a solution very soon.
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#10
Posted 08 February 2012 - 02:25 AM
I am using Delphi 7
Thank you.... I hope so
#11
Posted 08 February 2012 - 02:56 AM
Can you please update next procedure in NxDBInspector.pas (Sources\Next Inspector)
procedure TItemDataLink.SetField(Field: TField; Item: TNxPropertyItem);
begin
if Field.IsNull then Item.AsString := '' else
if (Item is TNxDBComboBoxItem)
then Item.UpdateField(Field.Value) else
begin
case Field.DataType of
ftString: Item.AsString := Field.DisplayText;
ftWideString: Item.AsString := TWideStringField(Field).Value;
ftInteger, ftWord, ftSmallint, ftAutoInc: Item.AsInteger := Field.AsInteger;
ftLargeint:
begin
if Field is TLargeintField then
begin
Item.AsInteger := TLargeintField(Field).AsLargeInt;
end
else Item.AsInteger := Field.AsInteger;
end;
ftFloat, ftCurrency, ftBCD, ftFMTBcd: Item.AsFloat := Field.AsFloat;
ftBoolean: Item.AsBoolean := Field.AsBoolean;
ftDate, ftDatetime, ftTime, ftTimeStamp: Item.AsDatetime := Field.AsDateTime;
ftMemo: Item.AsString := Field.AsString;
{ case }
else Item.AsString := Field.AsString;
end;
end;
end;
Please tell me if we have move from dead point
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#12
Posted 08 February 2012 - 10:34 AM
But sorry I could not find any SetField() method in my NxDBInspector.pas.
Interface TItemDataLink = class(TDataLink) private FOwner: TNextDBInspector; protected procedure ActiveChanged; override; procedure DataSetChanged; override; procedure DataSetScrolled(Distance: Integer); override; procedure UpdateItems; public constructor Create(AOwner: TNextDBInspector); end;
#13
Posted 08 February 2012 - 11:49 PM
Very strange (?) Can you please tell me which version of NextSuite you use?
thanks
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#14
Posted 09 February 2012 - 05:55 AM
I am using ver 5.9.10.1
#15
Posted 09 February 2012 - 07:54 AM
This seems to clarify things
I suggest that you download latest release. Maybe you will not need to change anything.
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#16
Posted 09 February 2012 - 11:01 AM
thanks
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











