Knowledge Base Category: Development

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

USE [master]
 GO

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

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

 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
Page 3 of 1212345...10...Last »