I know I need to go out to control panel and create my DSN file which I have done. Now how do I write code to open the connection and read first line?

I am new to this so thanks in advance!