View Issue Details

IDProjectCategoryView StatusLast Update
0038594PackagesPackagespublic2021-03-17 16:18
ReporterJan Bouwman Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
PlatformWindows 10 64 bit 
Product Version2.0.12 
Summary0038594: SQLdb -> SQLquery.Prepare reports at most 1 parameter
DescriptionAlso with earlier versions of Lazarus

Steps To ReproduceUnpack attachment and run project1.

Attachement works with SQLite but I have seen same behaviour with ODBC
TagsNo tags attached.
Fixed in Revision
LazTarget-
Widgetset
Attached Files

Activities

Jan Bouwman

2021-03-06 12:11

reporter  

project1.zip (128,991 bytes)

Michael Van Canneyt

2021-03-06 13:39

administrator   ~0129429

SQLDB works with named parameters.
Parameters must be written in the format :ParamName, not with question marks.

So for your example:

insert into relation
      ( relationid , name )
values
      ( :id, :name)

:ID and :Name are the parameters.

See for example
https://www.freepascal.org/docs-html/current/fcl/sqldb/usingparams.html
There is also an explanation on the wiki.

Jan Bouwman

2021-03-17 16:18

reporter   ~0129742

Thanks Michael,
I will change my code, code used to work in the past but I apparantly missed this change when switching to newer Lazarus version lately.
With an apology for the extra work.

Issue History

Date Modified Username Field Change
2021-03-06 12:11 Jan Bouwman New Issue
2021-03-06 12:11 Jan Bouwman File Added: project1.zip
2021-03-06 13:39 Michael Van Canneyt Assigned To => Michael Van Canneyt
2021-03-06 13:39 Michael Van Canneyt Status new => resolved
2021-03-06 13:39 Michael Van Canneyt Resolution open => no change required
2021-03-06 13:39 Michael Van Canneyt LazTarget => -
2021-03-06 13:39 Michael Van Canneyt Note Added: 0129429
2021-03-17 16:18 Jan Bouwman Note Added: 0129742