* * *

Author Topic: TSQLQuery.Params Value assignment problem (possible bug?)  (Read 584 times)

ertank

  • Full Member
  • ***
  • Posts: 104
TSQLQuery.Params Value assignment problem (possible bug?)
« on: June 03, 2017, 10:53:29 pm »
Hello,

I have tested below versions and I seem to have a problem with TSQLQuery.Params[0].Value assignment.

Below problem, I tested and have problem with:
Lazarus 1.8RC1 (SVN 55121) Raspberry Pi 3, Jessie
Lazarus 1.9.0 (SVN 55139) Raspberry Pi 3, Jessie
64bit Lazarus 1.8RC1 (SVN 54919) Windows 10 64bits

I am using Raspberry Pi 3 for development. OS is Jessie last updated about 3 months ago. Windows is just to be sure about the problem.

I have following text in my SQLQuery1.SQL
Code: [Select]
select * from test where abc = :param

All below is at design time. I am using object inspector;
-Click Params (new windows pops: Editing SQLQuery1.Params[0])
-Click 0 - param to set parameter "param" (Object Inspector changes into TParam properties)
-Click Value and type something.

1- When I hit Enter Value reverts back to "(Null)"
2- When I try to set a Parameter Value Type it simply reverts back to "Null"

I appreciate any help please.

Thanks & regards,
Ertan


Edit: I confirm that there is no such problem with 64bit Lazarus 1.6.4 (SVN 54278) on Windows.
Edit2: I confirm that problem exists in Lazarus 1.8.RC2 (SVN 55188) on Raspberry Pi 3, Jessie
Edit3: I confirm that there is no such problem with Lazarus 1.6.4 (SVN 55188) on Raspberry Pi 3, Jessie

After all these, I would like to hear some test results, please.
« Last Edit: June 04, 2017, 12:20:29 am by ertank »

LacaK

  • Hero Member
  • *****
  • Posts: 539
Re: TSQLQuery.Params Value assignment problem (possible bug?)
« Reply #1 on: June 12, 2017, 09:12:00 am »
I have replied to bug tracker, but now I understand, that you cannot reproduce this "bug" on Windows, only on RPi3/Linux, right ? Secondly which version of FPC do you use ?
(We must isolate problem to either FPC or Lazarus)

ertank

  • Full Member
  • ***
  • Posts: 104
Re: TSQLQuery.Params Value assignment problem (possible bug?)
« Reply #2 on: June 14, 2017, 10:59:20 pm »
Hi LacaK,

Will reply on bug tracker anymore. I was in a business trip and couldn't find time to check in.

I just replied you on bug tracker. Problem is in Object Inspector at design-time. Reproduction possible on Win64, Raspberry Pi.

Anyway, Lazarus 1.8.0RC2, fpc 3.0.2 on Raspberry Pi and Lazarus 1.8.0RC1 and fpc 3.0.2 on Win64 installation from available download.

LacaK

  • Hero Member
  • *****
  • Posts: 539
Re: TSQLQuery.Params Value assignment problem (possible bug?)
« Reply #3 on: June 15, 2017, 07:26:10 am »
When I try Lazarus 1.9 (TRUNK) + FPC 3.1.1 (TRUNK) it works for me on Windows 64 (but Lazarus is 32bit app).
So we can say definitely, that problem is not in FPC, right?
May be that in Lazarus ...

ertank

  • Full Member
  • ***
  • Posts: 104
Re: TSQLQuery.Params Value assignment problem (possible bug?)
« Reply #4 on: June 15, 2017, 02:30:26 pm »
Assigning values by code works. I cannot change Value or value type of a given parameter of SQL using Object Inspector.

I am pretty sure it is Lazarus and not fpc.

LacaK

  • Hero Member
  • *****
  • Posts: 539
Re: TSQLQuery.Params Value assignment problem (possible bug?)
« Reply #5 on: June 15, 2017, 09:13:08 pm »
I cannot change Value or value type of a given parameter of SQL using Object Inspector.

I am pretty sure it is Lazarus and not fpc.
Yes it seems be problem with Null variant (as Value is of Variant type) ... in Lazarus 1.6.4 with FPC 3.0.2 I get "Could not convert variant of type Null to string" error

But in Lazarus 1.9 (TRUNK) I do not get this error, so probably it was already fixed but not backported to 1.8 branch ?

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus