Frankly,learning IT techniques ,to myself, is a amazing thing.I love IT knowledg so much that I dedicate most of my times to my learnging of it.But I confess that ,though I am addicted to IT,I am a novice .So,it is still a hard work to improve my skills about computers.
Now let's concentrate on the destination of telling my acquisition which acquires at study.
Today,I learned how to use C# language to retrieve datas form Sql-server 2008.In the textbook I am reading,I know that by building a connection to a database,C# can fetch Datas from it.At first,we should find the right path to connect with the database.To achieve the goal,we shoule build a connection by the code "SqlConnection thisConnection=new SqlConnection();".In the new function,we can add a string parameter to realize the function.Befor the step,we will create a type of string to tell the compiler where it can find the datas.The string contains several information.Data Source keyword is choosed to show the name or network address of the instace of SQL Server to which to connect.Initial Catlog is the name of the database which to connect.Integrated Security keyword is about the way of logging in.When I first use the AttachDBFilename keyword,recommending by the author,to establishing the connection,a error always occurs nomatter what measures I take,which is really baffling.After endless failtures,I decide to use another way to connect to the database.I just use the visual studio 2010'navigation to get the ConnectionString.The way of how to connect to a database is finded by me after searching Internet and finding knowledge relating to the way,which spend me a lot of time .After that,I'm really harassed but happy for I eventually get the way to establishing the connection.