Unhandled exception at line 103, column 5 in 0x800a01ad - JavaScript runtime error: Automation server can't create object.
on yellow highlight. This is an issue now with IE 10. IE 10 blocks the ADODB as a threat. Need another way to open a SQL connection other than ADODB.
This ccode draws rectangles on a canvas. I can have the X-Y [highlight #8AE234]coords[/highlight] in an XML file or other file if need be, SQL is best though.
TIA
DougP
on yellow highlight. This is an issue now with IE 10. IE 10 blocks the ADODB as a threat. Need another way to open a SQL connection other than ADODB.
This ccode draws rectangles on a canvas. I can have the X-Y [highlight #8AE234]coords[/highlight] in an XML file or other file if need be, SQL is best though.
TIA
Code:
<script>
var c = document.getElementById("myCanvas");
c.width = window.screen.availWidth
c.height = window.screen.availHeight
var ctx = c.getContext("2d");
ctx.fillStyle = "#FF0000";
//ctx.fillRect(55, 35, 150, 75);
[highlight #FCE94F]var connection = new ActiveXObject("ADODB.Connection");[/highlight] var connectionstring = "Data Source=myserver;Initial Catalog=myCatalog;Persist Security Info=True;User ID=userID;pwd=Password;Provider=SQLOLEDB";
connection.Open(connectionstring);
var rs = new ActiveXObject("ADODB.Recordset");
rs.Open("Select [highlight #8AE234]TopLocation, LeftLocation, Width , Height[/highlight] [highlight #8AE234][/highlight]from grocery_StoresXYAisles", connection);
rs.MoveFirst
while (!rs.eof) {
//document.write(rs.fields(1) + " " + rs.fields(0) + " " + rs.fields(2) + " " + rs.fields(3) + "\r\n");
ctx.fillRect(rs.fields(1), rs.fields(0), rs.fields(2), rs.fields(3));
rs.movenext;
}
rs.close;
//connection.close;
c.fillStyle = "blue";
c.font = "bold 16px Arial";
c.fillText("Zibri", 100, 100);
</script>
DougP