SQLOLEDB Connection Strings

This post is a little off track, but after spending quite some time trying to figure a technical problem out, I thought it might help out another lost soul, so I’m posting under Technical Architecture.

If you need to use an OLE style connection string to connect to a SQL Server database (for example, you’re using pre-written code that relies on that provider type), but you’re having trouble connecting, you can use the SQL Native Client Provider instead.

So rather than:

Provider=SQLOLEDB;Server=myhost;Database=mydatabase;Persist Security Info=False;User ID=xxxx;Password=yyyy

you can use:

Provider=SQLNCLI;Server=myhost;Database=mydatabase;Persist Security Info=False;User ID=xxxx;Password=yyyy

Bear in mind, the provider should match your version of Native Client, so in my case (I’m running SQL Server 2008 R2), it’s actually SQLNCLI10, as per:


If you can, avoid SQLOLEDB altogether and use SQLClient.

Hope that helps someone.

Related posts...

Related websites...

  • Microsoft Warns of SQL Attack SQL stands for Structured Query Language. SQL Attack is kind of Hacking attack. Just days after patching a critical flaw in its Internet Explorer browser, Microsoft is now warning users of a serious bug in its SQL Server database software. Microsoft issued a security advisory late Monday, saying that the......
  • The Benefits of using Cloud Hosting over Traditional Hosting Servers Everybody's talking about cloud computing, and with good reason - it's likely to become a fundamental part of day-to-day life. The impact of cloud computing on web hosting can't be underestimated. Trying to figure out the best hosting option is one of the first major headaches that anyone who is......
  • The Tony Hawk Foundation The Tony Hawk Foundation is an organization that is geared towards providing youths with the resources to safely and legally hone their craft of skate boarding. In November of 2008, the entertainment elite and action sport pros met to raise money in the fifth annual Activision Presents Stand Up For......

Warning: Illegal string offset 'echo' in /var/www/html/wp-great-seo/wp-content/themes/social/library/extensions/custom-field-series.php on line 79


  1. Fatal error: Uncaught Error: Call to undefined function mysql_escape_string() in /var/www/html/wp-great-seo/wp-content/plugins/user-photo/user-photo.php:203 Stack trace: #0 /var/www/html/wp-great-seo/wp-includes/class-wp-hook.php(300): userphoto_filter_get_avatar('<img alt='Jeff'...', 'sunshine@yahoo....', 80, 'mm') #1 /var/www/html/wp-great-seo/wp-includes/plugin.php(203): WP_Hook->apply_filters('<img alt='Jeff'...', Array) #2 /var/www/html/wp-great-seo/wp-includes/pluggable.php(2455): apply_filters('get_avatar', '<img alt='Jeff'...', 'sunshine@yahoo....', 80, 'mm', 'Jeff', Array) #3 /var/www/html/wp-great-seo/wp-content/themes/social/library/functions/comments.php(76): get_avatar('sunshine@yahoo....', '80', NULL, 'Jeff') #4 /var/www/html/wp-great-seo/wp-content/themes/social/library/functions/comments.php(103): hybrid_avatar() #5 /var/www/html/wp-great-seo/wp-includes/class-walker-comment.php(180): hybrid_comments_callback(Object(WP_Comment), Array, 1) #6 /var/www/html/wp-great-seo/wp-includes/class-wp-walker.php(146): in /var/www/html/wp-great-seo/wp-content/plugins/user-photo/user-photo.php on line 203