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.

OLE and Create Object

Keywords:    createobject objectcreate objectopen

Question:

Here is an example of code used with VB to access the ACT! ole object. I would like to be able to use WinBatch instead of VB.
	dim objData as object
	Set objData = CreateObject("ACTOLE.DATABASE")
	objData.Open dbName

	Dim tableObject As Object
	Set tableObject = objData.CONTACT

	tableObject.MoveFirst

	; get the name of the contact
	dim strOutput as String
	strOutput = tableObject.Data(CF_Name)

	set tableObject = Nothing

	objData.Close

	set objData = Nothing
I think I use ObjectOpen command, but I am not sure how to set the table object (or any other object). This may not be very practical, but it does look like it has potential.

Answer:

Starting in WinBatch 2004B, see the ObjectCreate function.
dbName = "c:\file path\database.ext"
objData = ObjectCreate("ACTOLE.DATABASE")
objData.Open(dbName)

tableObject = objData.CONTACT
tableObject.MoveFirst

; get the name of the contact
strOutput = tableObject.Data(CF_Name)

tableObject = 0
objData.Close
objData = 0

Article ID:   W13665
Filename:   OLE and Create Object.txt
File Created: 2004:08:30:09:39:22
Last Updated: 2004:08:30:09:39:22