SQL Vs OLEDB

  • My question is pretty straight forward. I am using SQL Server 2005 Express and VB.Net. Should I be using the System.Data.OLEDB classes to do my database requests or should I use the System.Data.SQL classes for my database work? I am new enough to this that I do not know the answer and before I get myself mired too deeply into OLEDB, which is mostly what I am using since I am converting from ADO and Access to VB.NET anmd Sql Server.

    Any thoughts, opinions, etc. would be greatly appreciated.

    Thx, Tom

  • SQL = SQL Server only, oledb = any db with oledb driver - replaced odbc (supports odbc too if only have older odbc drivers)


    Phil Nicholas

  • take a look at the classes in the System.Data.SqlClient namespace. they will likely handle most of what you want to do. In particular take a look at these classes:

    SqlConnection

    SqlCommand

    SqlDataReader

    ---------------------------------------
    elsasoft.org

  • The SqlClient classes will perform better against a SQL Server database than the more generic OleDb ones.  They're generally a direct replament; you can pretty much do a global search and replace to change from one set of classes to the other.

  • To all, thanks for the replies. I kind of thought that going with straigth SQL would be best, but I wanted to hear it from people who know.

     

    Tom

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply