Board index » delphi » 'isc_encode_sql_date' error StoreProcedure.ParamByName('SomeDate').AsDate

'isc_encode_sql_date' error StoreProcedure.ParamByName('SomeDate').AsDate

I have a stored procedure like this
Procedure mine (MyID  integer, MyDate Date) AS
begin
  Update mytable set OldData = :MyDate where  ID  =  :MyID;
end

And i also have an IBStoredProcedure component on the form
pointing to this procedure described above

This component on object inspector has the params property set like
MyId   DataType = ftInteger
       ParamType = ptInput
Mydate DataType = ftDate
       ParamType = ptInput

and in my code i'm using something like this:

IBStoreProcedure1.ParamByName('MyId').AsInteger :=  1;
IBStoreProcedure1.ParamByName('MyDate').AsDate :=  MonthCalendar.Date;
IBStoreProcedure1.Prepare;
IBStoreProcedure1.ExecProc;
IBTransaction1.CommitRetaining;

Im getting the error below:
"isc_encode_sql_date is an interbase6 function.
Please upgrade to interbase6 to uses this functionality."

P l a t a f o r m

DELPHI 5 build 5.62
Windows 98
InterBase/x86/Windows NT (access method), version "WI-V5.1.1.680"
on disk structure version 9.0
using IBXComponents update beta1 "ibxdp5ebetaup1.exe"

 

Re:'isc_encode_sql_date' error StoreProcedure.ParamByName('SomeDate').AsDate


Try using ftDateTime.  ftDate and ftTime are new datatypes for IB6 in addition
to ftDateTime.  IB5.x only has a DateTime type and no real Date type.

Quote
Fabiano Mariath wrote:

> I have a stored procedure like this
> Procedure mine (MyID  integer, MyDate Date) AS
> begin
>   Update mytable set OldData = :MyDate where  ID  =  :MyID;
> end

> And i also have an IBStoredProcedure component on the form
> pointing to this procedure described above

> This component on object inspector has the params property set like
> MyId   DataType = ftInteger
>        ParamType = ptInput
> Mydate DataType = ftDate
>        ParamType = ptInput

> and in my code i'm using something like this:

> IBStoreProcedure1.ParamByName('MyId').AsInteger :=  1;
> IBStoreProcedure1.ParamByName('MyDate').AsDate :=  MonthCalendar.Date;
> IBStoreProcedure1.Prepare;
> IBStoreProcedure1.ExecProc;
> IBTransaction1.CommitRetaining;

> Im getting the error below:
> "isc_encode_sql_date is an interbase6 function.
> Please upgrade to interbase6 to uses this functionality."

> P l a t a f o r m

> DELPHI 5 build 5.62
> Windows 98
> InterBase/x86/Windows NT (access method), version "WI-V5.1.1.680"
> on disk structure version 9.0
> using IBXComponents update beta1 "ibxdp5ebetaup1.exe"

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
Live never to be ashamed if anything you do or say is published around the world
- even if what is published is not true.    (R Bach)

Re:'isc_encode_sql_date' error StoreProcedure.ParamByName('SomeDate').AsDate


Just use IBStoreProcedure1.ParamByName('MyDate').AsDateTime :=
MonthCalendar.Date;

IB 5.6 doesnt support date type. Unfortunately IBX doesnt check this. (the
same problem can occur with all the new IB 6 datatypes)

Quote
Fabiano Mariath wrote:
> IBStoreProcedure1.ParamByName('MyDate').AsDate :=  MonthCalendar.Date;

> Im getting the error below:
> "isc_encode_sql_date is an interbase6 function.
> Please upgrade to interbase6 to uses this functionality."

Other Threads