Visual Connect
Forums
Hi Brian,
While using visual connector Am getting an error.
1. Variable not defined Id0. (Then I declared Id0 as Object)
Then got the next error
"Object variable or With block variable not set"Please help...below is my code
Function visualConnnectDatabase(resultFileName)Dim db As Database
Dim task As Object
Dim id0 As ObjectDim id1 As ObjectDim id2 As ObjectSet db = Client.OpenDatabase(FileName)Set task = db.VisualConnectorid0 = task.AddDatabase(FileNameA)id1 = task.AddDatabase(FileNameB)id2 = task.AddDatabase(FileNameC)task.MasterDatabase = id0task.AppendDatabaseNames = FALSEtask.IncludeAllPrimaryRecords = TRUEtask.AddRelation id0, conditionA, id1, conditionBtask.AddRelation id0, conditionC, id2, conditionDtask.IncludeAllFieldstask.CreateVirtualDatabase = Falsetask.OutputDatabaseName = resultFileNametask.PerformTaskSet task = NothingSet db = NothingEnd Function
Hi Jiyajijp,
Hi Jiyajijp,
Sorry for not getting back sooner. Actually they are numeric and should be defined as long. What is happening is IDEA is just returning a number as a handle to relate to the different databases, so id0 is 0, id1 is 1, id2 is 2 and so on. If you do a msgbox id0 after you have added it you will see that it returns a 0.
Brian
When am declared Id0 as
When am declared Id0 as String, then the issue is fixed.