[fpc-devel] TMSSQLConnection - sqlDB component for accessing MS SQL Server

LacaK lacak at zoznam.sk
Wed Mar 21 07:34:15 CET 2012


>>     
>>> No.
>>> Anyway, I change the colum names (id,name to col1, col2)
>>> The error is:
>>> "Cannot insert the value NULL into column 'col', table tempdb.dbo.#t..."
>>>       
>> This error has nothing to do with FPC or SQLDB.
>>
>> Your SQL statement is trying to insert NULL in a required field.
>>     
>
> No Michael, see the example I wrote before.
>
> Create table:
> create table #t (col1 int, col2 varchar(60))
>
> OBS: No column is required.
>
> This INSERT works:
> insert into #t values (1, 'bla bla bla')
>
> This INSERT do NOT works:
> insert into #t (col2) values ('bla bla')
>
>   

Marcos, can you please test with explicitly allowed nulls:
create table #t (col1 int NULL, col2 varchar(60) NULL)

(MS SQL Server nullability is controled by database setting "*ANSI null 
default"* so you can check this setting on your temp database also)*
*L.*
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20120321/9051f98d/attachment.html>


More information about the fpc-devel mailing list