I've been tasked with getting two MS SQL based products to synchronize. My predecessor was content to match records based on a combination of name and address, but both systems have a GUID, and only one is actually using it. So my thought was to match up my existing records and copy the GUID from one database to the other. But I can't seem to update a GUID in MS SQL using PHP and ODBC. The query fails silently. If I echo the query and copy/paste it into SQL Management Studio or Oracle SQL Developer, it works fine. The simplified version of my query looks like this:
$SQL = "UPDATE Contact SET SifGuid = CONVERT(VARCHAR(36), '" . $this->GUID . "') ";
$SQL .= "WHERE contactID = " . $this->POSID . ";
Sending that query through odbc_exec fails. But like I mentioned, the same exact query works fine in SQL Management Studio or Oracle SQL Developer.
Any ideas?
Thanks in advance!