Skip to main content

Fall 2007

Go Search
Fall 2007
Customer Resource Site
  
Fall 2007 > Announcements > Using Sql in the Backend  

Announcements: Using Sql in the Backend

Title

Using Sql in the Backend 

Body

Most of you shouldn't need to do this, but if you need to execute a SQL command within the backend, please follow the following guidlines from now on:
 
  1. You should not ever need to reference any specific provider's namespace. This means that you should not have using System.Data.SqlClient.
  2. Your command should be a reference to an IDbCommand, which you can get by DatabaseFactory.CreateCommand.
  3. To add parameters to this command, use c.Parameters.Add(), along with the helper function DatabaseFactory.CreateParam which creates the parameter to add. Look at any other database command execution for an example.
  4. To get a reader, you still just call c.ExecuteReader() but the reader will have type IDataReader instead of SqlDataReader.

I think this is all you should need to know. Email if you have questions.

Expires

 

Links

 
Attachments
Created at 12/4/2007 5:33 PM  by Bradley D. Dodson 
Last modified at 12/4/2007 5:33 PM  by Bradley D. Dodson