Using OpenSchema to get the primary key of all tables, of course this is just one of its functions.
connstr = "Provider = MSDAORA.1; User ID = liujincai; password = ljc1001; Data Source = hp1" set mm = server.CreateObject ( "adodb.connection") mm.Open connstr Const adSchemaPrimaryKeys = 28 set rs = mm.OpenSchema AdschemaprimaryKeys) Response.write
"& RS (i) .Name &" & RS (i) & "
'The following statement gets the field of the primary key of the table' TB_HOUSE_MAIN 'Rs.filter = "Table_name =' tb_house_main '" if not (rs.eof? And rs.bof) THEN Response.write RS ("Column_name")