mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 07:59:15 +02:00
fcl-db: dbtestframework:
- revert functional changes of previous commit: better deal with NULL setting via connection/session or database level: http://msdn.microsoft.com/en-us/library/ms174979.aspx git-svn-id: trunk@26949 -
This commit is contained in:
parent
3eb1edb749
commit
8e28dd52b4
@ -384,7 +384,6 @@ end;
|
||||
|
||||
procedure TSQLDBConnector.CreateFieldDataset;
|
||||
var
|
||||
AdditionalText: string;
|
||||
CountID : Integer;
|
||||
FType : TFieldType;
|
||||
Sql,sql1: String;
|
||||
@ -406,14 +405,10 @@ begin
|
||||
TryDropIfExist('FPDEV_FIELD');
|
||||
|
||||
Sql := 'create table FPDEV_FIELD (ID INT NOT NULL,';
|
||||
if SQLServerType = ssMSSQL then
|
||||
AdditionalText := ' NULL ' //SQL Server seems to default to NULL fields
|
||||
else
|
||||
AdditionalText := '';
|
||||
for FType := low(TFieldType)to high(TFieldType) do
|
||||
if FieldtypeDefinitions[FType]<>'' then
|
||||
sql := sql + 'F' + Fieldtypenames[FType] + ' ' +
|
||||
FieldtypeDefinitions[FType] + AdditionalText + ',';
|
||||
FieldtypeDefinitions[FType] + ',';
|
||||
Sql := Sql + 'PRIMARY KEY (ID))';
|
||||
|
||||
FConnection.ExecuteDirect(Sql);
|
||||
|
Loading…
Reference in New Issue
Block a user