hi ian,
as you can see this is what i am doing, a simple insert statement, with MySQL i have no problem doing this but with MS SQL? headache!!!
<?
$Connection = mssql_connect("FOO_SERVER","sa","") or die ("Unable to connect to server");
$DB = mssql_select_db("MyDB",$Connection);
$Query = "INSERT INTO MyTable VALUES (NULL,'$mon_year','$div','$num_emp_planned','$num_emp_attended','$emp_name','$badge_num','$div','$course_name','$comp_date')";
$Result = mssql_query($Query,$Connection);
mssql_close($Connection);
?>
and this is the error message i recieved:
Warning: MS SQL message: An explicit value for the identity column in table 'MyTable' can only be specified when a column list is used and IDENTITY_INSERT is ON. (severity 16) in C:\Inetpub\wwwroot\Test\recordadd.php on line 7
Warning: MS SQL: Query failed in C:\Inetpub\wwwroot\Test\recordadd.php on line 7
i do not know what to do anymore, plese help
thanks