@JD, the site
http://www.codeproject.com/cs/database/sql_in_csharp.asp
answered my question about some SQL and ASP.net Problem I was having with VB.net, at the bottom where it says
I know this will work on IIS 6 with Windows 2003 Server because I have done it and that is currently the only OS with IIS 6. On IIS 6 the ASP.NET process runs under the account 'NT AUTHORITY\NETWORK SERVICE'.
osql -E -S %SERVER%\%INSTANCE% -Q "sp_grantlogin 'NT AUTHORITY\NETWORK SERVICE'"Now our ASP.NET application will be able to log into the server. Now all thats left is to grant access to the databases.
osql -E -S %SERVER%\%INSTANCE% -d %DATABASE% -Q "sp_grantdbaccess 'NT AUTHORITY\NETWORK SERVICE'"osql -E -S %SERVER%\%INSTANCE% -d %DATABASE% -Q "sp_addrolemember 'db_owner', 'NT AUTHORITY\NETWORK SERVICE'"These 2 lines will add access to one of the databases. So if you want to add access to another database just change %DATABASE% and run both lines.
IIS 5.1
This should work on all other IIS 5.1 (possibly other versions) combinations. The only difference between IIS 5.1 and IIS 6 is the account the ASP.NET process runs under. IIS 5.1 runs under a %MACHINENAME%\ASPNET where %MACHINENAME% is the machine name.
osql -E -S %SERVER%\%INSTANCE% -Q "sp_grantlogin '%MACHINENAME%\ASPNET'"Now our ASP.NET application will be able to log into the server. Now all thats left is to grant access to the databases.
osql -E -S %SERVER%\%INSTANCE% -d %DATABASE% -Q "sp_grantdbaccess '%MACHINENAME%\ASPNET'"osql -E -S %SERVER%\%INSTANCE% -d %DATABASE% -Q "sp_addrolemember 'db_owner', '%MACHINENAME%\ASPNET'"These 2 lines will add access to one of the databases. So if you want to add access to another database just change %DATABASE% and run both lines.
I now know why I was getting the error "unable to login to the sql server" I know damn good and well I had the server running, but I didn't enable access for the user "machinename\aspnet" wow i'm an idiot!

I am at work now, so I will see what trouble I can stir up later!

thanks again JD for your support