you don't need an SQL database to save and access user account information. You can do it with simple text files. Why do you think you need winsock? Just use normal file i/o techniques to read the text file, find the user's id, read the associated password and compare it with the password the user entered then logging in.
yes but I am not just reading it from a text file on a local machine I want to be able to read a text file on someone else machine across a network. That other machine would be the server. thats why i am asking if i need to use winsock or sql
Of course its possible, I've done it several times using ODBC device driver. There are several c++ ODBC classes to make that easier, some are free while others are not. Just google for ODBC c++ classes and you will find them.