DSN Connection error with SQL Server 2000

DSN Connection error with SQL Server 2000.

Hi, I am using VS 2010, here is the code below.

System.Data.Odbc.OdbcConnection conn = new System.Data.Odbc.OdbcConnection();
conn.ConnectionString = "Dsn=ESM;Drive=oledb];Provider=SQLOLEDB.1;Password=n0ne;Persist Security Info=True;uid=admin;Initial Catalog=SwitchInterface;Data Source=cbtnt335";
conn.Open();

I am getting the error:

ERROR [01S00] [Microsoft][ODBC SQL Server Driver]Invalid connection
string attribute

1 answer

I'd place my bet it's the "Drive=oledb]" part that's wrong... Try remove that!