I'm trying to write a mapbasic app that will update a table in a SQL server 2000 database from a .tab polygon table where the polygon table contains the table in SQL server (which has lat and long fields from which I can create points).  Is this possible to do?

I've connected to the sql server using the following code-
__________________________________________________
Dim hdbc as Integer
Dim hstmt as Integer

hdbc=server_connect("QELIB",  connect_string)
hstmt=server_execute(hdbc, "Select * from tablename")
Server hstmt Fetch Into "temp_tablename"
Server hstmt close
Open table "c:\polygonboundary.TAB" Interactive
Set style symbol makesymbol(32,255,10)
Create map for temp_tablename coordsys earth projection 1,74
Update temp_tablename
        Set Obj-CreatePoint(Long, Lat)
Commit Table temp_tablename Interactive
Add Column "temp_tablename"(column) From polygonboundary Set To 'column of polygonboundary' Where Contains
Commit Table temp_tablename Interactive
Server hdbc Disconnect
__________________________________________________
The above code will only update the temp_tablename and NOT the table in SQL server.  I also tried the following server command- hstmt=Server_Execute(hdbc, "Update tablename Set column_name=700"), which worked and changed the rows in the SQL table, but does not account for where the polygon table contains the points.

Any help is appreciated.

Thanks,
Bob
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to