As programmers, whether we write a variety of MIS systems or games are inseparable from the data access operations, as we did in the previous few days in VS a mis system, now tangled.
If the C/s or b/S model is good, but the demand is not, no way, the customer is God ... Their needs are localized to the database directly to operate (in the case of not installing SQL Server), the brothers have a solution to the idea???
The crowd sought him 1100 degrees, but Gsql was deep in my heart. Alas, now feel look forward, the problem can be solved, then download the gsql_6.5.0.4
Download link Http://www.powerip.net/GSQL/GSQL_6.5.0.4.rar
It's starting with the environment.
1, Unzip first
2, double-click Gsql.exe If no response, force shutdown, restart. 3, the service has been opened, followed by the database to remember the data cry path into a relative path Oh! Here I will no longer wordy, online tutorials. The following link code:
usingSystem;usingSystem.Collections.Generic;usingSystem.Data.SqlClient;usingSystem.Linq;usingSystem.Text;namespacepharmacopeia{/// <summary> ///Database connection Layer/// </summary> Public classCdbresource {/// <summary> ///connection objects for the database/// </summary> Private StaticSqlConnection _con; /// <summary> ///gets the linked object of the database/// </summary> Public StaticSqlConnection Connection {Get{return_con;} } /// <summary> ///static constructors, initializing database connections/// </summary> StaticCdbresource () {stringConnection ="Server = '" 127.0.0.1", 7788 ';D atabase = Pharmacopeia; User Id=sa; Password=admin; Trusted_Connection = False; Multipleactiveresultsets = True"; _con=NewSqlConnection (connection); _con. Open (); } /// <summary> ///static interface, freeing up database connections/// </summary> Public Static voiddisposeconnection () {_con. Close (); } }}
Operation Result:
Actually very simple, really do not have to install SQL Server to take care of, you can try, there are problems to learn together Oh!