I'm using the following bit of code to generate a DSN, but it seems to keep setting it up to use SQL Server authentication and I want it to use the integrated Windows Authentication:
Code:
using System.Runtime.InteropServices;
[DllImport("ODBCCP32.DLL")]
private static extern bool SQLConfigDataSource(IntPtr parent, int request, string driver, string attributes);
SQLConfigDataSource((IntPtr)0, 4, "SQL Server\0", "SERVER=sql-dev\\sql2k5dev\0DESCRIPTION=DRI Production Database\0DSN=DRI2\0DATABASE=DRI\0");