Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

connection error with specified user account

Status
Not open for further replies.

mirirom

Programmer
Jul 21, 2001
110
US
hi,

i'm rather new to developing apps with SQL (2K) server, and i'm having a problem with connecting to a database within my local instance.

the error i'm getting back states that the account i'm trying to log on with doesn't have permission, yet i've created this logon account (within the server) and made it (out of a brute force tactic) a member of the Owner's role for my testing database file.

the (C#) code for access is...

Code:
string strSQL = "SELECT * FROM someTable";
string strSource = "data source=myInstanceName;"
   + "initial catalog=testDataStore;user id=webuser"
   + "password=123";

SqlConnection cnn = new SqlConnection(strSource);
SqlAdapter adt = new SqlAdapter(strSQL, cnn);

Dataset d = new Dataset();

cnn.Open();     //fails here
adt.Fill(d, "foo");

any thoughts or suggestions are greatly appreciated. thanks in advance!



..:: mirirom ::..
 
Does the server allow mixed security?

In enterprise manager right click on the server, security and slect sql server and windows.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
hi, tx for your reply (yep, it's mixed security).

as it turns out, the problem was unrelated and had to do with running the application in debug. although i didn't try building and then executing the app on the webserver - this should've worked.

for those that are interested, be sure to give whatever logon account debugging the application EXEC rights to the extended stored procedure SP_SDIDEBUG in master. more info on this sp can be found in online books under the heading

"Troubleshooting the Transact-SQL Debugger"

thanks again,


..:: mirirom ::..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top