choisk
asked on
OLEDB Data Provider Development
I am developing OGC data provider component(Data Provider component which satisfies OPEN GIS Simple Feature Spec., so that can handles geometry data.) using ATL Provider template library.
I want to support ITableDefinition interface, especially CreateTable method.
The CreateTable method requires Column Properties to define columns of a table(especially geometry column).
So, I
1. define custom Column Property set in .h file as follows (to give an ability to data provider defining geometry column to table):
DEFINE_GUID(DBPROPSET_OGIS _COLUMN, ...);
#define OGIS_PROPERTY_SET 0x1000L
enum DBPROPOGISENUM {
DBPROP_OGIS_GEOM_TYPE = OGIS_PROPERTY_SET + 128,
DBPROP_OGIS_EXTENT_MINX = OGIS_PROPERTY_SET + 129,
...
};
2. add property string to data provider's .rc file as follows :
Property : OGIS_GEOM_TYPE
Property Constant ID : PROP_OGIS_GEOM_TYPE
Property String Table ID : IDS_PROP_OGIS_GEOM_TYPE
Property Description : “Geom type”
...
3. and add property set map to session object(or Data Source Object, which is right?) as follows :
...
BEGIN_PROPERTY_SET(DBPROPS ET_OGIS_CO LUMN)
PROPERTY_INFO_ENTRY_EX(OGI S_GEOM_TYP E, VT_UI4, DBPROPFLAGS_COLUMN|DBPROPF LAGS_READ| DBPROPFLAGS_WRITE, 1, 0)
...
PROPERTY_INFO_ENTRY_EX(OGI S_EXTENT_M AXX, VT_R8, DBPROPFLAGS_COLUMN | DBPROPFLAGS_READ| DBPROPFLAGS_WRITE, 1, 0)
END_PROPERTY_SET(DBPROPSET _OGIS_COLU MN)
...
But, In VB test application, the newly defined properties(Geom type, ... etc) does not appear.... T.T
Dim conn As ADODB.Connection
Set conn = New ADODB.Connection
connStr = "Provider=..."
conn.Open connStr
For Each prp In conn.Properties
Debug.Print prp.Name, prp.Value
Next prp
========================== ========== ========== ========== ========== ========== =========
Sorry for my poor English ^^;
Did anyone ever have this problem before? or Any clues?
Thanks a lot in advance.
I want to support ITableDefinition interface, especially CreateTable method.
The CreateTable method requires Column Properties to define columns of a table(especially geometry column).
So, I
1. define custom Column Property set in .h file as follows (to give an ability to data provider defining geometry column to table):
DEFINE_GUID(DBPROPSET_OGIS
#define OGIS_PROPERTY_SET 0x1000L
enum DBPROPOGISENUM {
DBPROP_OGIS_GEOM_TYPE = OGIS_PROPERTY_SET + 128,
DBPROP_OGIS_EXTENT_MINX = OGIS_PROPERTY_SET + 129,
...
};
2. add property string to data provider's .rc file as follows :
Property : OGIS_GEOM_TYPE
Property Constant ID : PROP_OGIS_GEOM_TYPE
Property String Table ID : IDS_PROP_OGIS_GEOM_TYPE
Property Description : “Geom type”
...
3. and add property set map to session object(or Data Source Object, which is right?) as follows :
...
BEGIN_PROPERTY_SET(DBPROPS
PROPERTY_INFO_ENTRY_EX(OGI
...
PROPERTY_INFO_ENTRY_EX(OGI
END_PROPERTY_SET(DBPROPSET
...
But, In VB test application, the newly defined properties(Geom type, ... etc) does not appear.... T.T
Dim conn As ADODB.Connection
Set conn = New ADODB.Connection
connStr = "Provider=..."
conn.Open connStr
For Each prp In conn.Properties
Debug.Print prp.Name, prp.Value
Next prp
==========================
Sorry for my poor English ^^;
Did anyone ever have this problem before? or Any clues?
Thanks a lot in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.