Forum Moderators: coopster
I have instead decide to use Adodb which is the only thing I managed to get working but I am unsure on how to handle certani things like errors and status messages.
Here's how I connect to a DB
$conn = new COM("ADODB.Connection") or die("Cannot start ADO");
$conn->CursorLocation = 3;
$conn->Open("PROVIDER=SQLOLEDB.1;SERVER=".$DBServer.";DATABASE=".$DBName.";UID=".$DBUsername.";PWD=".$DBPass);
Upon this I use
$conn->execute($query)
To execute queries. My problem is that when I execute things like updates or insertions/deletions I do not know if it was successfull or not (Due to constraints violations and such).
Can anybody help me out?
Catchable fatal error: Object of class variant could not be converted to string in filePath on line 1933
var_dump on the other hand outputs
object(variant)#5 (0) { }
As you can see it returns a variant thus I am not sure there's anyway to know what ti actually returns (When not returning the result ofc) without knowing the workings of the protocol behind it which is what I was hoping someone with a bit more experience in ADODB could help me with.