Recent

Author Topic: can't Convert delphi's dataset to lazaruses dataset.  (Read 5189 times)

wylton

  • Jr. Member
  • **
  • Posts: 50
can't Convert delphi's dataset to lazaruses dataset.
« on: October 21, 2014, 12:50:05 pm »
i have changed TFieldType in db.pas for
 TFieldType = (ftUnknown, ftString, ftSmallint, ftInteger, ftWord, // 0..4
      ftBoolean, ftFloat, ftCurrency, ftBCD, ftDate, ftTime, ftDateTime, // 5..11
      ftBytes, ftVarBytes,  ftAutoInc, ftBlob, ftMemo, ftGraphic, ftFmtMemo, // 12..18
      ftParadoxOle, ftDBaseOle, ftTypedBinary, ftCursor, ftFixedChar, ftWideString, // 19..24
      ftLargeint, ftADT, ftArray, ftReference, ftDataSet, ftOraBlob, ftOraClob, // 25..31
      ftVariant, ftInterface, ftIDispatch, ftGuid, ftTimeStamp, ftFMTBcd, // 32..37
      ftFixedWideChar, ftWideMemo, ftOraTimeStamp, ftOraInterval, // 38..41
      ftLongWord, ftShortint, ftByte, ftExtended, ftConnection, ftParams, ftStream, //42..48
      ftTimeStampOffset, ftObject, ftSingle); //49..51

but i always get ord(high( TFieldType))=39.

how can i to do?

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: can't Convert delphi's dataset to lazaruses dataset.
« Reply #1 on: October 21, 2014, 01:07:20 pm »
you probably need to run "make all" for fpc since the db.pas comes with fpc not lazarus.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: can't Convert delphi's dataset to lazaruses dataset.
« Reply #2 on: October 21, 2014, 01:49:15 pm »
So what is the exact change and why do you need it? If it's useful for others, please feel free to file a feature request in the bugtracker ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

wylton

  • Jr. Member
  • **
  • Posts: 50
Re: can't Convert delphi's dataset to lazaruses dataset.
« Reply #3 on: October 21, 2014, 03:00:43 pm »
you probably need to run "make all" for fpc since the db.pas comes with fpc not lazarus.
how can i recompile fpc in windows?  I can't find out in web .

wylton

  • Jr. Member
  • **
  • Posts: 50
Re: can't Convert delphi's dataset to lazaruses dataset.
« Reply #4 on: October 21, 2014, 03:03:56 pm »
So what is the exact change and why do you need it? If it's useful for others, please feel free to file a feature request in the bugtracker ;)
I have  dataserver  with delphi . i do client with lazarus . and TFieldtype is different.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: can't Convert delphi's dataset to lazaruses dataset.
« Reply #5 on: October 21, 2014, 03:04:44 pm »
Look at the installation instructions on the fpc site (don't know where they are exactly) or in your FPC directory.

There are also instructions on
http://wiki.lazarus.freepascal.org/Installing_Lazarus

You need to have the fpc sources and a bootstrap compiler (fpc 2.6.4)
taazz is right: you'd then do make all/make install. See the instructions.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: can't Convert delphi's dataset to lazaruses dataset.
« Reply #6 on: October 21, 2014, 03:06:10 pm »
I have  dataserver  with delphi . i do client with lazarus . and TFieldtype is different.
And presumably you added new datatypes at the end or something? Ah well, never mind...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: can't Convert delphi's dataset to lazaruses dataset.
« Reply #7 on: October 21, 2014, 03:12:40 pm »
Look at the installation instructions on the fpc site (don't know where they are exactly) or in your FPC directory.

Afaik since FPC distributes binary in general, the building is not one button-press like Lazarus. The buildfaq (link on the FPC docs webpage) is the closest I guess, but a bit more geared towards development (build trunk yourself), and not messing in existing distributions.

Lazarus will also need a (full) recompile after FPC is built btw.

u2o

  • Jr. Member
  • **
  • Posts: 72
  • No message
Re: can't Convert delphi's dataset to lazaruses dataset.
« Reply #8 on: October 21, 2014, 04:02:47 pm »
Hi!
If change:
Code: [Select]
{$mode objfpc}{$H+} with
Code: [Select]
{$mode delphi}
Maybe works?

Info: http://www.freepascal.org/docs-html/prog/progap4.html#progse62.html

rvk

  • Hero Member
  • *****
  • Posts: 6111
Re: can't Convert delphi's dataset to lazaruses dataset.
« Reply #9 on: October 21, 2014, 04:15:19 pm »
I have  dataserver  with delphi . i do client with lazarus . and TFieldtype is different.
Just adding FieldTypes to TFieldType won't help you very much with this. There is a lot of code in db.pas (and others) which you would need to change (and add) to take advantage of those new types. You've taken this fragment from DB.PAS in Delphi so if you look in there you'll see it's used a lot more then just the type-definition.

Maybe if you specify what server en what fields you have trouble with... we could help you determine the problem and try to fix it.

 

TinyPortal © 2005-2018