georeference.org
Subscribe to this thread
Home - Scripting / All posts - running query from script
Abner60 post(s)
#04-Jan-08 06:26

Hello,

I try to run a SQL-query from a script, but I don't see any results in the table or drawing. If I directly run the query (which I created with my script) by opening the query and running it, it does select the objects.

dim qry

if comps.itemByName("SLQuery") <> -1 then comps.remove("SLQuery")

Set qry = actDoc.NewQuery("SLQuery")

qry.Text = "SELECT * FROM [Netwerk Toedeling Origineel] WHERE [Categorisering] = ""Connector"" "

qry.Run()

comps("Netwerk Toedeling Origineel").open

app.messagebox qry.isvalid

I hope someone can tell me what I am doing wrong.

Martijn

Lorne

575 post(s)
#04-Jan-08 10:46

Change your Selection Query to an Update Query on intrinsic Field [Selection (I)]. See:

17367

Manifold-L 1

Manifold-L 2

Manipedia

Abner60 post(s)
#15-Jan-08 00:08

Thanks a lot!

0 msec Copyright (C) 2007-2008 Manifold.net. All rights reserved.