Thursday, March 8, 2012

Connection to SQL Server 2000 From an ASP Page

Dear All,
I'm really confusing while reading the connections Issue in the support
knowledge.
Our Company website guest users can register themselves in my website. The
data goes to the SQL Server database 2000 which also used by internal users
of my company as Inhouse Database. So I want to restrict the Website Guest
users. Whats the safest way to connect to?.
Actually MY IIS SQL Server running on different machine(as stated in
support base)
1. I have created windows user a/c (say WEBUSER) on both machines with the
same password.
2. I have created a login a/c SQL Server for WEBUSER too.
But unfortunately I am getting "Internal Server Error" - Page Can not be
Displayed.
My connection String is as follows:
dc0.Open "Provider=sqloledb;" & _
"Network Library=DBNETLIB;" & _
"Integrated Security=SSPI." & _
"Data Source=ServerName;" & _
"Initial Catalog=DatabaseName;" & _
"User ID=UserName;" & _
"Password=password"
Please advice me is this safe?. Why I'm getting the error?
Thanks
KaviAs a first step, try the following:
Log onto SQL Query Analyser and log on with the DataSource/username/password
that is used withing your connection string.
If this is OK , simulate a SQL statement that is similar that will run by a
web user.
At this point, you'll know that the account is OK.
can you connect , for example, via telnet to the sql server?
Are other pages running on the web server.
Also, see if you can trap the error and print it on the page.
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
"Kavi" <Kavi@.discussions.microsoft.com> wrote in message
news:FA375A40-B27B-44DE-9584-7CC8B781AFE1@.microsoft.com...
> Dear All,
> I'm really confusing while reading the connections Issue in the support
> knowledge.
> Our Company website guest users can register themselves in my website. The
> data goes to the SQL Server database 2000 which also used by internal
users
> of my company as Inhouse Database. So I want to restrict the Website Guest
> users. Whats the safest way to connect to?.
> Actually MY IIS SQL Server running on different machine(as stated in
> support base)
> 1. I have created windows user a/c (say WEBUSER) on both machines with
the
> same password.
> 2. I have created a login a/c SQL Server for WEBUSER too.
> But unfortunately I am getting "Internal Server Error" - Page Can not be
> Displayed.
> My connection String is as follows:
> dc0.Open "Provider=sqloledb;" & _
> "Network Library=DBNETLIB;" & _
> "Integrated Security=SSPI." & _
> "Data Source=ServerName;" & _
> "Initial Catalog=DatabaseName;" & _
> "User ID=UserName;" & _
> "Password=password"
> Please advice me is this safe?. Why I'm getting the error?
> Thanks
> Kavi
>|||Thanks Jack. I'll try.
"Jack Vamvas" wrote:

> As a first step, try the following:
> Log onto SQL Query Analyser and log on with the DataSource/username/passwo
rd
> that is used withing your connection string.
> If this is OK , simulate a SQL statement that is similar that will run by
a
> web user.
> At this point, you'll know that the account is OK.
> can you connect , for example, via telnet to the sql server?
> Are other pages running on the web server.
> Also, see if you can trap the error and print it on the page.
>
> --
> Jack Vamvas
> ___________________________________
> Receive free SQL tips - www.ciquery.com/sqlserver.htm
>
> "Kavi" <Kavi@.discussions.microsoft.com> wrote in message
> news:FA375A40-B27B-44DE-9584-7CC8B781AFE1@.microsoft.com...
> users
> the
>
>|||In the Advanced tab of Internet Options of IE, uncheck "Show friendly
HTTP error messages". Then you usually can see the whole error
message.
Shane

No comments:

Post a Comment