D
Digger
Hi,
I hope that anybody have info on this, i've install and have
win32::sqlserver working properly.
I'm able to retrieve data from my database with the select statement.
My problem is with sql_insert here my code:
my $table = "icon";
#my %values=("iconID"=>'3',"link"=>"something");
#my %values=("iconID"=>3,"link"=>"something");
#my %values=("iconID"=>"3","link","something");
#my %values=("iconID",3,"link","something");
my %values=("iconID","3","link","somethingElse");
$sqlsrv->sql_insert($table,\%values);
Table is call icon, iconID is a primary key and an integer, link is a
varchar.
Here the error I get all the time:
SQL Server message 515, Severity 16, State 2, Server WEB-T-
SQL1\DVSQBQL
Line 1
Cannot insert the value NULL into column 'iconid', table
'master.dbo.Icon'; column does not allow nulls. INSERT fails.
1> EXEC sp_executesql N'INSERT icon (iconID, link)
2> VALUES (@P1, @P2)',
3> N'@P1 int, @P2 varchar(13)',
4> @P1 = NULL, @P2 = 'somethingElse'
The statement has been terminated.
It look like it doesn't like my value for IconID, what's missing...
take me out of my misery.
Thx,
Michel
I hope that anybody have info on this, i've install and have
win32::sqlserver working properly.
I'm able to retrieve data from my database with the select statement.
My problem is with sql_insert here my code:
my $table = "icon";
#my %values=("iconID"=>'3',"link"=>"something");
#my %values=("iconID"=>3,"link"=>"something");
#my %values=("iconID"=>"3","link","something");
#my %values=("iconID",3,"link","something");
my %values=("iconID","3","link","somethingElse");
$sqlsrv->sql_insert($table,\%values);
Table is call icon, iconID is a primary key and an integer, link is a
varchar.
Here the error I get all the time:
SQL Server message 515, Severity 16, State 2, Server WEB-T-
SQL1\DVSQBQL
Line 1
Cannot insert the value NULL into column 'iconid', table
'master.dbo.Icon'; column does not allow nulls. INSERT fails.
1> EXEC sp_executesql N'INSERT icon (iconID, link)
2> VALUES (@P1, @P2)',
3> N'@P1 int, @P2 varchar(13)',
4> @P1 = NULL, @P2 = 'somethingElse'
The statement has been terminated.
It look like it doesn't like my value for IconID, what's missing...
take me out of my misery.
Thx,
Michel