Knowledge Base Category: Development

Add an access database as a LinkedServer in Microsoft SQL 2008 R2

USE [master]

EXEC master . dbo. sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0' , N'AllowInProcess' , 1

EXEC master . dbo. sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0' , N'DynamicParameters' , 1

 EXEC sp_addlinkedserver 
   @server = N'LinkedServer', 
   @provider = N'Microsoft.ACE.OLEDB.12.0', 
   @srvproduct = N'OLE DB Provider... 						
Read more

Access connections from Visual Studio

Import classes
using System.Data;
using System.Configuration;
using System.Data.OleDb;
set up your app config
<add name="AccessConnection" 
connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\location\accessdb.mdb;
		Persist Security Info=False;;"/>
  public DataTable accessquery()
Read more

Connection String

Quick Connection String for SQL Database for webconfig:
 <add name="ANYNAME" connectionString="Data Source=SERVERNAME;
Initial Catalog=DBNAME;User Id=USERNAME;Password=PASSWORD;" providerName="System.Data.SqlClient" />
Read more

Warning: Use of undefined constant XML - assumed 'XML' (this will throw an Error in a future version of PHP) in /homepages/35/d428352912/htdocs/WilliamMendoza/wp-content/plugins/wp-syntaxhighlighter/wp-syntaxhighlighter.php on line 1048