Home
Top.Mail.Ru Yandeks.Metrika
Forum: "Bases";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Down

Handling dates from IB to Delphi and back Find similar branches


Сергей Н.   (2001-12-04 06:23) [0]

Нужно сделать UDF-функцию по работе с датами.
Как в Delphi принять и работать с датой IB?
Как обработанную дату из Delphi вернуть в поле таблицы IB?



Vadim   (2001-12-04 10:44) [1]

library Mylib;

uses SysUtils;

type
ISC_QUAD = Record
isc_quad_high: Integer;
isc_quad_low: Cardinal;
End;
PISC_QUAD = ^ISC_QUAD;

threadvar
tempquad: ISC_QUAD;


Function MonthAdd(Var NumberMonth: Integer; IBDate: PISC_QUAD): PISC_QUAD; cdecl; export;
Begin
tempquad.isc_quad_high := Round(IncMonth(IBDate^.isc_quad_high,NumberMonth));
Result := @tempquad;
End;

Function OnlyDate(IBDate: PISC_QUAD): PISC_QUAD; cdecl; export;
Begin
tempquad.isc_quad_high := Round(IBDate^.isc_quad_high);
Result := @tempquad;
End;

Exports MonthAdd Name "MonthAdd";
Exports OnlyDate Name "OnlyDate";

begin
end.




DECLARE EXTERNAL FUNCTION MONTH_ADD
INTEGER, TIMESTAMP
RETURNS TIMESTAMP
ENTRY_POINT "MonthAdd" MODULE_NAME "Mylib.dll";



Pages: 1 whole branch

Forum: "Bases";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Top









Memory: 0.81 MB
Time: 0.027 c
4-22488
Arick
2001-10-31 09:20
2002.01.08
how to find the name of the loaded Dll


3-21988
Andrei
2001-11-29 22:16
2002.01.08
SQL


1-22258
mashinist
2001-12-16 23:16
2002.01.08
Equation of the third degree.


3-21941
jin
2001-11-30 14:56
2002.01.08
Help please create an IB SQL procedure from the application


3-21947
Diehard
2001-12-05 13:18
2002.01.08
Retrieving an index list from an Oracle table





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Español swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish