Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 892 of file msiquery.c.
Referenced by create_diff_row_query(), merge_verify_primary_keys(), MSI_DatabaseExport(), msi_get_table_labels(), and MsiDatabaseGetPrimaryKeysW().
{ static const WCHAR sql[] = { 's','e','l','e','c','t',' ','*',' ', 'f','r','o','m',' ','`','_','C','o','l','u','m','n','s','`',' ', 'w','h','e','r','e',' ', '`','T','a','b','l','e','`',' ','=',' ','\'','%','s','\'',0 }; struct msi_primary_key_record_info info; MSIQUERY *query = NULL; UINT r; if (!TABLE_Exists( db, table )) return ERROR_INVALID_TABLE; r = MSI_OpenQuery( db, &query, sql, table ); if( r != ERROR_SUCCESS ) return r; /* count the number of primary key records */ info.n = 0; info.rec = 0; r = MSI_IterateRecords( query, 0, msi_primary_key_iterator, &info ); if( r == ERROR_SUCCESS ) { TRACE("Found %d primary keys\n", info.n ); /* allocate a record and fill in the names of the tables */ info.rec = MSI_CreateRecord( info.n ); info.n = 0; r = MSI_IterateRecords( query, 0, msi_primary_key_iterator, &info ); if( r == ERROR_SUCCESS ) *prec = info.rec; else msiobj_release( &info.rec->hdr ); } msiobj_release( &query->hdr ); return r; }