Re: SQLDataConnection

From: Jay Walters (
Date: 06/04/04

Date: Thu, 3 Jun 2004 20:10:18 -0700

I don't think that's what he was trying to do :-)

I think he's a total newbie and just doesn't have a
proper connection string...

The error is : >> Login failed for user '(null)'.

If he was having trouble connecting with the ASPNET
account - it would say failed for <LOCAL>\ASPNET

>-----Original Message-----
>First uncheck anonymous access in directory security tab
of IIS, then in
>web.config put element <impersonate="true"> that will
allow to connect to
>SQL server under your account.
>"Papri Chakravorty"
<> wrote in message
>> hello,
>> I have been trying to test a code to connect to an
sqlserver database.
>> all i have done is used a datagrid to display some
data from pubs databse
>in sqlserver.
>> i have used sqlconnection, sqldataadapter. i have
writted code under page
>load as
>> sqldataadapter1.fill(dataset1)
>> datagrid1.databind().
>> when i build and browse the page, I get the message,
>> Login failed for user '(null)'. Reason: Not associated
with a trusted SQL
>Server connection.
>> Can you guys explain what is happening? It is really
>> Thanks Papri