Information générale
Forum:
Microsoft SQL Server
Titre:
DMO Index Type Woes
Hi
I'm trying to use the type property of the index object to determine what type of indexes I have against my tables in SQL Server.
However, the values I'm getting returned from this property seem to be excessive high and don't appear to be in the user manual (SQL Books Online)
if I create a simple index using t-sql eg ;
CREATE INDEX TEST ON MyTable (MyColumn)
when i use my dmo program to return the type property values for this index I'm getting 2097152 back as the return value.
Does anybody know what this figure is as it doesn't seem to equate to any value in the documentation?
I'm using sql server 7.0 and my dmo access is via Microsoft Visual Foxpro 6.0. here's a example of the code I'm using , (this isn't production code btw)
oSQLServer = CREATEOBJECT("SQLDMO.SQLServer")
oSQLServer.CONNECT("MyPC","MyUser","MyPassword")
oDatabase = oSQLServer.DATABASES.ITEM("MyDataBase")
oTables = CREATEOBJECT("SQLDMO.Table")
oTables.NAME = 'MyTable'
FOR lnTagLoop = 1 TO oDatabase.TABLES('MyTable').INDEXES.COUNT
? oDatabase.TABLES('MyTable').INDEXES(lnTagLoop).NAME
? oDatabase.TABLES('MyTable').INDEXES(lnTagLoop).TYPE
ENDFOR
Anybody got any ideas?
Thanks, Mark
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement