Code: Select all
dim databaseContext as object
dim dataSource as object
dim queryDefinitions as object
dim queryDefinition as object
dim statement as object
dim resultSet as object
dim I as integer
databaseContext = createUnoService("com.sun.star.sdb.databaseContext")
dataSource = databaseContext.getByName("Customers")
queryDefinitions = dataSource.getQueryDefinitions()
for I = 0 to queryDefinitions.count()-1
queryDefinition = queryDefinitions(I)
msgbox queryDefinition.name
next I
"BASIC runtime error: Object variable not set" at the line
dataSource = databaseContext.getByName("Customers").
What did I wrong here? Or is it the result of a bug? Is there a way to work
around by formulation the code differently?
Any helpful suggestion would be highly appreciated.
Thanks in anticipation.
Title Edited. A descriptive title for posts helps others who are searching for solutions and increases the chances of a reply. BBCode fixed also (Hagar, Moderator).