Fetching Data from Database
How to select data from database using hashtable
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Afzaal Ahmad ZeeshanRank #60 · 27.6K reputationPosted Mar 18, 2015, 6:21 AM EDT
You use the objects present inside the SqlClient namespace, to work with the SQL Server databases. You would need, Connection string for your database; which would include the server name, database name, authentication and other data that you would require to connect to the database instance. Once that has been done, you can connect to your database using the SqlConnection object, and execute different commands using SqlCommand object.
You can then, access the values and generate a HashTable for your data inside the database tables. But you can't access SQL Server database values using a HashTable, it is not designed for such purposes.