Its because you have 'Integrated Security=SSPI' in your conn string - this tells it to connect as the Windows user who is running the code. For a SQL Server login you need a slightly different connection string, like this:
conn.connectionstring="Provider=SQLOLEDB.1;User Id=raj;Password=myPassword;Initial Catalog=Northwind;Data Source=RAJANI;"
Also, make sure your SQL Server is configured to allow SQL Server logins, not just Windows logins. You can do this from Enterprise Manager by right-clicking the server, choosing properties, looking at the 'Security' tab and make sure the Authentication is set to 'SQL Server and Windows'
|