I have been trying to find any resources about OLE Automation in T-SQL. The problem right now is:
I have a file at a location on the server. I want the binary content of the file to be stored in an XML variable and lets say, I want to insert that xml variable in a table (which ofcourse has a column of datatype xml).
I know that this could be done using spOA system stored procedures.
I could find several other things with spOACreate, except any useful resource for 'scripting.filesystemobject'.
I would avoid using OLE Automation in T-SQL if you can - it is ugly in the extreme. I would either use managed code or (possibly - I'm not 100% certain if it can be done for this though I think it should) native T-SQL.