Has anyone succesffully linked MapXtreme with Microsoft Activex Data 
Objects (ADO)?
The sample ASP pages that come with MapXTreme have DAO and ODBC examples 
but examples of the new ADO methods that come with Microsoft ASP in NT4.

Does Mapinfo have any plans to support ADO in the future?

Thanks in advance.

Example ASP code below
>>this code works
bRC = CreateMapODBCQueryInfo(objODBCQueryInfo)
        If bRC Then
                objODBCQueryInfo.SqlQuery = strSQL
                objODBCQueryInfo.DataSource = "SAM"     ' name of odbc datasource
                objODBCQueryInfo.ConnectString = 
"ODBC;UID=uid;PWD=pwd;DSN=SAM;DATABASE=SAM"     'can be left blank, or can 
include user= or pwd=
                bRC = CreateMapFields(objFields)
                objFields.add "ZoneID", "ZoneID", 4, 0
                objFields.add "Share", "Share"
                
                Set objBindLayer = Session(SESN_MAPPER).layers("Zones")
                strDataSetName = "ShareByArea"
                strBindField = "ZoneID"
                
                Session(SESN_MAPPER).datasets.add miDataSetODBC, objODBCQueryInfo, 
strDataSetname, strBindField, , objBindLayer, objFields
                set objDS= Session(SESN_MAPPER).DataSets(strDataSetName)
                set objTheme = objds.themes.add (nThemeType, objFields("Share"), 
"ShareTheme")
                const miColorWhite =  16777215
                const miColorRed = 255
                objTheme.Properties.RangeCategories(1).Style.RegionColor = miColorWhite
                objTheme.Properties.RangeCategories(objTheme.Properties.RangeCategorie 
 
s.Count).Style.RegionColor = miColorRed
etc.



>>this next line is what I want but doesnt work with mapinfo
        Set conn = Server.CreateObject("ADODB.Connection")
        
        strDSN = "DSN=SAM;Database=SAM"
        strUserID="uid"
        strPwd="pwd"
        conn.Open strDSN, strUserID, strPwd
        strSQL = "exec SalesByAreaShareZone '" & Request.Form("cboGroup") & "', 
1999"
        Set rsShare = Server.CreateObject("ADODB.Recordset")
        rsShare.Open strSQL , conn, 1
        objFields.add "ZoneID", "ZoneID", 4, 0
        objFields.add "Share", "Share"
        Set objBindLayer = Session(SESN_MAPPER).layers("Zones")
        strDataSetName = "ShareByArea"
        strBindField = "ZoneID"
        
        Session(SESN_MAPPER).datasets.add miDataSetDAO, rsShare, strDataSetname, 
strBindField, , objBindLayer, objFields
        set objDS= Session(SESN_MAPPER).DataSets(strDataSetName)

        

----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to