Category Archives: SQL

Execute ad hoc SQL commands in C#

This example shows how you can execute ad hoc SQL commands such as CREATE TABLE and INSERT INTO in an Access 2007 database. ADO.NET itself doesn’t provide much in the way of objects to manipulate a database’s structure. Fortunately you … Continue reading

Posted in ADO.NET, database, SQL | Tagged , , , , , , , , , , , , , , | 2 Comments

Execute ad hoc SQL queries in C#

This example shows how you can execute an ad hoc SQL query at run time. Normally a program uses Recordsets, DataGrids, LINQ to SQL objects, and other database objects and controls to display and manipulate database records. Those techniques tend … Continue reading

Posted in ADO.NET, database, SQL | Tagged , , , , , , , , , , , , , | 3 Comments

Protect a program from SQL injection attacks in C#

This example explains how you can protect a C# application from SQL injection attacks. The techniques can also protect other kinds of programs such as web applications. Recently Russian hackers stole more than 1.6 billion (yes, that’s 1,600,000,000) user names … Continue reading

Posted in database, SQL, system | Tagged , , , , , , , , , , , , | 7 Comments