I am using Laravel's SQL Server driver for Eloquent and attempt to read and write to the database.
I am able to successfully read data from the database.
I am able to save to the database if I paste my query directly into my database client (Navicat).
However when I attempt to insert data via Eloquent I get an error.
//returns valid results
$results = DB::connection('next')->table('CMS_Tree')->get();
//throws exception
$sql = "INSERT INTO CMS_Tree (
[NodeAliasPath], [NodeName], [NodeAlias], [NodeClassID], [NodeLevel], [NodeSiteID], [NodeGUID]
) VALUES (
'/Home', 'Home', 'Home', 1095, 1, 1, '17B28018-C4DC-4896-ADAC-29F1E35B69BA'
)";
$result = DB::connection('next')->statement($sql);
The exception message:
General error: 1934 General SQL Server error: Check messages from the SQL Server [1934] (severity 16) [(null)]
My research on that error suggests there could be an issue in how I am sending the data, but I'm unsure how to simplify this further.
Schema: