Hello all
I have a proplem using MSLoader component (with using fields DEFAULT values)
Table:
USE [MyDB_1]
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TestTable_1](
[ID] [int] IDENTITY(1,1) NOT NULL,
[DateCreate] [datetime] NOT NULL CONSTRAINT [DF_TestTable_1_DateCreate] DEFAULT (getdate()),
[CurrData] [int] NULL
) ON [PRIMARY]
Code:
dfm:
object MSLoader1: TMSLoader
Connection = MSConnection1
TableName = 'dbo.TestTable_1'
KeepIdentity = True
OnPutData = MSLoader1PutData
Left = 16
Top = 48
end
and
pas:
procedure TForm11.Button2Click(Sender: TObject);
begin
MSLoader1.KeepNulls:=False;
MSLoader1.Load;
end;
procedure TForm11.MSLoader1PutData(Sender: TMSLoader);
begin
MSLoader1.PutColumnData('ID',1,1);
MSLoader1.PutColumnData('DateCreate',1,Null);
MSLoader1.PutColumnData('CurrData',1,100);
end;
or
procedure TForm11.MSLoader1PutData(Sender: TMSLoader);
begin
MSLoader1.PutColumnData('ID',1,1);
MSLoader1.PutColumnData('CurrData',1,100);
end;
and on "Load" method Delphi raise exception (Unknown error)
Help plz !
my configuration:
Client: WinXP Sp2, Delphi CodeGear RAD Studio 2007, SDAC ver: 4.70.0.44
Server: WinServer 2003, Microsoft SQL Server Standard Edition (9.00.3042.00)
What I doing wrong?
Thank you.