WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

OLE COM ADO CDO ADSI LDAP
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Converting Pre 2004B OLE Scripts


Question:

This is probably already been asked, but I did a quick search here in the tech database and did not find anything. I was wondering if anyone has taken a stab at writing a script that would convert a wbt file that uses ole pre 2004b to a wbt script that uses ole post 2004b? In other words, read a script line by line, convert ObjectOpen to ObjectCreate, convert objectclose to objvar = "", use multi-level OLE objects, etc. I find I have alot a scripts that I would like to convert, and wondering if someone else has already gone down this road. Thanks in advance for any input!

Answer:

No scripts that I am aware of. I am sure some of it can be scripted however, the majority of it will probably need to be converted by hand. Especially when dealing with object collections. Scripting a conversion from the ObjCollection__ functions to using the ForEach construct would be problematic.

*In General* all the old scripts should still work. There have been various oddball exceptions found.

Seems like a "real" converter would be programmatically "difficult", although one might be able to write one that works for one's own style of coding.

ObjectOpen does not need to be changed to ObjectCreate. ObjectClose is still just fine.

Collapsing of one dotted lines to multidotted lines is hard, and is not done on a line by line basis. The converter program would have to kind of understand the whole OLE session to handle it properly.

And getting rid of ObjectCollection in favor of ForEach might be dicey.


Article ID:   W17090
File Created: 2007:07:03:14:28:16
Last Updated: 2007:07:03:14:28:16