connection to database in C# [closed]
i am able to connect but my connection is not working. i am making a window base app , which delete the data from table in database and return a value. connection is done, but its not deleting any data or returning the value. MY code is:
For example
Connectionname DAC; :: Create connection
DAC = new Connectioinname(); :: intialize
DAC.Flag_Emp( argText, argDistricts, OptionBit); // Call a procedure from data base.
:: EROOR Error Non-invocable member 'Flag_Aesop_User.ProductionDataSet.Flag_Employee' cannot be used like a method
How about that thing called google? What have you done so far? This is pretty generic and common task. There are tons and tons of information on how to use either Linq2Sql, Ado.net or EF to manipulate your data. If you just need to connect, than start here:
http://www.connectionstrings.com/sql-server-2008
These would help :
How to: Create Connections to SQL Server Databases Using C#
Connecting to a SQL Server Database Using C#
精彩评论