Hi Muffakham,
Thank you for posting your query in Microsoft Community forums.
From the issue description, I see that you are unable to connect to Internet and receive "Error Code 797 connection is not available because there is a problem with your modem or network adapter".
I can imagine the inconvenience you have experienced. We are here to help and guide you in the right direction.
To provide the appropriate resolution I would need more information from your end.
Did you make any recent changes on the computer prior to this issue?
This issue may occur due to corrupted or incompatible drivers, incorrect network connection settings, hardware or software problems and missing updates.
Method 1:
I would suggest you to try the steps in the article and check if it helps.
How do I fix network adapter problems?
http://windows.microsoft.com/en-US/windows7/fix-network-adapter-problems
Method 2:
If the issue is not resolved, I would suggest you to try the steps in the article and check if it helps.
Wired and wireless network connection problems in Windows ****http://windows.microsoft.com/en-US/windows/help/wired-and-wireless-network-connection-problems-in-windows
Refer to the link for additional information.
Why can't I connect to the Internet? ****http://windows.microsoft.com/en-US/windows7/Why-can-t-I-connect-to-the-Internet
Let us know the status of the issue after performing the troubleshooting steps. If you need any further assistance or information about the issue with connecting to Internet, I will be glad to help you. We, at Microsoft strive towards excellence.