Hi Edson
Your SLQ expression contains an error. If you want to import the whole
table the correct command would be
view = OpenTable("ViewPontos", "ODBCQ", {"Maptitude_Firebird", "SELECT *
FROM CLIENTES"})
You can also extend the SQL expression in the query section and obtain
only the records and fields you need. That will make the whole process
faster.
SQLExp = "SELECT id, longitude, latitude, vendastotais FROM CLIENTES
WHERE vendastotais > 10000 "}
Regards
On Sun, May 27, 2012 at 10:27 PM, edsonmartins2005 <
[email protected]> wrote:
> **
>
>
>
> Thank you. But I needed to make a sql query. Looking to find the function
> ImportFromView GISDK. My code looks like this:
>
> Macro "Location by Coordinate"
>
> map =
> OpenMap("C:\\componentes\\DelphiXE2\\Maptitude\\demo3\\Mapas\\MapaSemLayer.map",
> {
> {"Auto Project", "True"}
> })
>
> view = OpenTable("ViewPontos", "ODBCQ", {"Maptitude_Firebird", "SELECT *
> FROM CLIENTES where "})
>
> ImportFromView("ViewPontos|", {"ID", "LONGITUDE", "LATITUDE"},
> "c:\\temp\\PontosImportados.dbd", {
> {"Label", "Layer de Pontos"},
> {"Layer Name", "Layer of Pontos"},
> {"Optimize", "True"}
> })
>
> new_lyr = AddLayer(mapa, "Pontos", "c:\\temp\\PontosImportados.dbd",
> "Layer de Pontos", {{"Shared", "True"}})
> RunMacro("G30 new layer default settings", new_lyr)
>
> RedrawMap(map)
> endMacro
>
> Edson
>
>
> --- In [email protected], Armando Scalise <armando.scalise@...>
> wrote:
> >
> > In the Maptitude Help , search for "Creating a Map Layer from an ODBC
> Table"
> >
> > Good luck
> >
> > Armando Scalise
> >
> > On Sun, May 27, 2012 at 11:20 AM, edsonmartins2005 <
> > edsonmartins2005@...> wrote:
> >
> > > **
>
> > >
> > >
> > > I am needing to add points from a odbc sql query using GISDK in a
> layer of
> > > points. Someone could tell me how to do this? I am needing to do the
> same
> > > as the menu option Tools->Locate->Locate by coordinate.
> > >
> > > Edson
> > >
> > >
> > >
> >
> >
> >
> > --
> > Armando Scalise
> >
>
>
>
--
Armando Scalise