private static extern bool vdb_GetIndexInformationByName( [MarshalAs(UnmanagedType.LPStr)] string cpTagName, ref RTagInfo pInfo );
/// <summary> /// Get index information /// </summary> /// <param name="sIndexName">Index name</param> /// <param name="indexInfo">Index info</param> /// <returns>Return true if success</returns> public bool IndexInformation(string sIndexName, ref RTagInfo indexInfo) { lock(database.SyncRoot) { GetFocus(); return VistaDBAPI.ivdb_GetIndexInformationByName(sIndexName, ref indexInfo); } }
public static bool ivdb_GetIndexInformationByName( string cpTagName, ref RTagInfo pInfo ) { bool res = vdb_GetIndexInformationByName(cpTagName, ref pInfo); VistaDBErrorMsgs.ShowErrors(!res, res); return res; }
/// <summary> /// Get index info /// </summary> /// <param name="indexName">Index name</param> /// <param name="active">If true then index is active else inactive</param> /// <param name="orderIndex">Index order</param> /// <param name="unique">If true then index is unique</param> /// <param name="primary">If true then index is primary key</param> /// <param name="desc">If true then index descending</param> /// <param name="keyExpr">Index expression</param> /// <param name="fts">If tru then index is FTS</param> /// <returns>True for success</returns> public bool GetIndex(string indexName, out bool active, out int orderIndex, out bool unique, out bool primary, out bool desc, out string keyExpr, out bool fts) { RTagInfo info = new RTagInfo(); bool res = false; active = false; orderIndex = 0; keyExpr = ""; unique = false; primary = false; desc = false; fts = false; lock(database.SyncRoot) { GetFocus(); info.iInfoSize = VistaDBAPI.RTagInfoSize; res = VistaDBAPI.ivdb_GetIndexInformationByName(indexName, ref info); } active = info.bActive; orderIndex = info.iOrderIndex; keyExpr = info.cpKeyExpr; unique = info.bUnique; primary = info.bPrimary; desc = info.bDesc; fts = info.bFts; return res; }