#1 2017-01-24 13:29:56

jonsafi
Member
Registered: 2011-07-26
Posts: 33

Can't run project that attempts to create tables...

Hello,

Am in the process of switching from Delphi 2009 to Lazarus/NewPascal.

Installed NewPascal to Windows 7/64bits and managed to run
TestSQL3 more or less OK (the DB Server applications run just fine)

When I then run an existing project of my own that used to
run well with D2009, get the following error:
" ...raised exception class  'EORMException' with message:
TSQLPropInfoRTTI.CreateForm: Unhandled sftUnknown/tkqWord type
for property MyField1"

Specifically, the error occur when running the following line in my code:

Result:= TSQLModel.Create(
          [TSQLMyTable1, TSQLMyTable2],'root');

Stepping through the debugger shows the error occuring at the following
statement in the file Mormot.pas at Line 32500:

  MoveFast(Tables[0],fTables[0],N*Sizeof(Tables[0]));

the debugger is complaining:
" Cannot perform pointer math on incomplete type 'TSQLRecordClass\',
try casting to a known type..."

My understanding is that this NewPascal is especially designed to be
a complete environment for running Mormot, w/o needing any extras..

Would be much obliged for any hints or ideas as to what could be the
problem here...made sure that am running the application as administrator.

Regards,
Sami

Offline

#2 2017-01-24 14:53:19

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 9,268
Website

Re: Can't run project that attempts to create tables...

QWORD type (UInt64) is not supported by the framework yet (due to buggy implemented in Delphi since latest releases).

Try with Int64 instead.

Offline

#3 2017-01-24 16:09:06

jonsafi
Member
Registered: 2011-07-26
Posts: 33

Re: Can't run project that attempts to create tables...

Yes, that did it! Thank you so much!
Now just have to make sure that   the UInt64 values are within the range
of (the signed) Int64.

Offline

Board footer

Powered by FluxBB