By Ashley Killough, CNN
(CNN) -- Customs officials have not had the technology to determine whether foreign students entering the United States were in compliance with their visas, Rep. Peter King, former chairman of the Homeland Security Committee, said Sunday on CNN's "State of the Union."
"There should be a way to correct this. The problem (officials) will tell you is there are 850,000 student visas, and there's an I-20 form which certifies whether or not that person is still in compliance with the requirements of the visa," said King, R-New York. "And unfortunately, it does not appear the technology is there to marry them up, and I think it's inexcusable."
Last week, the Department of Homeland Security began ordering U.S. Customs and Border Protection agents to verify, "effective immediately," that every foreign student who wants to enter the United States has a valid student visa.
The order came after it was discovered that two friends of Boston Marathon bombing suspect Dzhokhar Tsarnaev, who are now charged in connection with the attack, may have been in the country on student visas that were no longer valid.
Now, everyone coming in with a student visa will be "stopped and checked and examined at the airport," King said, a change that could cause longer lines at passport control desks.
"I think that's something we have to do to enforce this," he told CNN's chief political correspondent Candy Crowley.
King said two different government agencies - U.S. Customs and Border Protection and Immigration and Customs Enforcement - regulate two separate forms, one that shows the student has a student visa and one that shows whether or not the student is in compliance with the visa. But there was not a way to link the two, he said.
"Homeland Security should have been working more effectively toward making this technologically feasible...It has to be done -- it is finally going to be done."
CNN's Melissa Gray contributed to this report.