Re: Migrating ASP/MSSQL app from IIS 4 to IIS 6



WebTent wrote:
> We have moved an Internet and Intranet site over to our IIS 6 MS Small
> Business Server 2003. The Internet site works fine, but was done by a
> company recently. The Intranet site is older and we're having
> problems from the get go. The first thing I've hit a problem with, I
> cannot seem to track down the cause. I have the following code:
>
> Set cnn=Server.CreateObject("ADODB.Connection")
> cnn.Open "EXECBOB","SA",""

1. Don't use your sa account for your applications. Create a
limited-permission account to use instead. Using sa can lead to bad habits.
sa should only be used for server administration. Nothing else. The
potential for misuse in the wrong hands is huge.
2. A blank password for the sa account?!? Have you never heard of Code
Red??? Hopefully you've just censored the password so you could post your
connection's Open statement.
3. Avoid using ODBC: http://www.aspfaq.com/show.asp?id=2126

> Set cmd = Server.CreateObject("ADODB.Command")

It's not fatal, but I don't see why you are using an explicit Command
object.

> cmd.ActiveConnection = cnn
> cmd.CommandType = 1
> Set rst = Server.CreateObject("ADODB.Recordset")
> cmd.CommandText = "SELECT * FROM Sendout_Records ORDER BY

Don't use selstar: http://www.aspfaq.com/show.asp?id=2096

> Arranged_Date DESC"
> rst.Open cmd, , 3, 1

Again, nothing fatal, but I don't see why you are using anything but the
default forward-only cursor. This code could be simplified to:

sSQL="SELECT <column list> FROM Sendout_Records " & _
"ORDER BY Arranged_Date DESC"
set rst=cnn.execute(sSQL,,1)

> companyID=rst(6)
> apptDate=rst(1)
> latestJO="Congratulations to "&recruiterName(rst(11))&" for posting
> the latest send out: "&PCase(rst(10))&" with "
> rst.Close
>
> That recordset is coming back empty, however, if I run the
> commandText in the MSSQL ent mgr directlry, brings up many records.

Use SQL Profiler to verify that the commad text you expect to be executed is
actually what is being exxecuted.

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


.



Relevant Pages

  • Re: Impossible to open a 2002 DB from network path?
    ... Intranet site is identified as an Internet site when you use an FQDN or an ... > your machine or to a network location where you have access to." ... > After that message I had a look at the Internet Explorer preferences and I ...
    (microsoft.public.access.conversion)
  • Re: Migrating ASP/MSSQL app from IIS 4 to IIS 6
    ... >> We have moved an Internet and Intranet site over to our IIS 6 MS Small ... Don't use your sa account for your applications. ... >> That recordset is coming back empty, however, if I run the ... > quicker response by posting to the newsgroup. ...
    (microsoft.public.inetserver.asp.db)
  • Re: SQL - Login falied, user null error w SSPI
    ... > I have an intranet site that is set to use integrated windows ...
    (microsoft.public.dotnet.security)
  • Re: SQL - Login falied, user null error w SSPI
    ... > I have an intranet site that is set to use integrated windows ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Allowing access To Our INTRANET site from the outside
    ... get them to sign a form saying that you recommended they use VPN on ... > Intranet site is inside and can only be accessed from the inside. ... > big bosses want the board to have access to our intranet site. ... They want a link on the internet site that they can ...
    (microsoft.public.inetserver.iis.security)

Quantcast