Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Moving asp page from PWS to IIS


Message #1 by "Durwood Edwards" <durwoode@m...> on Tue, 24 Apr 2001 21:20:41
I have modified a page from Beginning ASP Databases and it works perfectly 

in PWS, but after moving all relevant files to IIS and creating the 

referenced DSN, I get nothing returned to the browser. It acts as though 

it is performing the requests, and the progress bar slowly increases at 

bottom of page, but I never get a page to view.

Simple ASP pages perform fine, but his is the first data connection page I 

have tried.



We are running NT 4.0 with service pack 6a.

I have updated ADO to 2.1



Any ideas where to start looking?



Thanks,



Durwood Edwards



A familiar bit of code follows:



<%Option Explicit

%>



<HTML>

<HEAD>

<TITLE>Employment Opportunites</TITLE>

</HEAD>

<BODY>



<%

Dim objConn, objRS

Dim adOpenForwardOnly, adLockReadOnly, adCmdTable

adOpenForwardOnly = 0

adLockReadOnly = 1

adCmdTable = 2



Set objRS = Server.CreateObject("ADODB.Recordset")



objRS.Open "advertisement", "dsn=employment", adOpenForwardOnly, 

adLockReadOnly, adCmdTable



While Not objRS.EOF

  Response.Write  "<H3>" & objRS("JobTitle")& "</H3>" &  "<P>" & objRS

("Description") & "<BR><BR>" & objRS("requirements") & "<BR><BR>" & objRS

("ToApply") &"</P>"

  objRS.MoveNext

Wend



objRS.Close

objConn.Close

Set objRS = Nothing

Set objConn = Nothing 

%>



</BODY>

</HTML>

Message #2 by gbrown@c... on Wed, 25 Apr 2001 10:45:27
> I have modified a page from Beginning ASP Databases and it works 

perfectly 

> in PWS, but after moving all relevant files to IIS and creating the 

> referenced DSN, I get nothing returned to the browser. It acts as though 

> it is performing the requests, and the progress bar slowly increases at 

> bottom of page, but I never get a page to view.

> Simple ASP pages perform fine, but his is the first data connection page 

I 

> have tried.

> 

> We are running NT 4.0 with service pack 6a.

> I have updated ADO to 2.1

> 

> Any ideas where to start looking?

> 

> Thanks,

> 

> Durwood Edwards

> 

> A familiar bit of code follows:

> 

> <%Option Explicit

> %>

> 

> <HTML>

> <HEAD>

> <TITLE>Employment Opportunites</TITLE>

> </HEAD>

> <BODY>

> 

> <%

> Dim objConn, objRS

> Dim adOpenForwardOnly, adLockReadOnly, adCmdTable

> adOpenForwardOnly = 0

> adLockReadOnly = 1

> adCmdTable = 2

> 

> Set objRS = Server.CreateObject("ADODB.Recordset")

> 

> objRS.Open "advertisement", "dsn=employment", adOpenForwardOnly, 

> adLockReadOnly, adCmdTable

> 

> While Not objRS.EOF

>   Response.Write  "<H3>" & objRS("JobTitle")& "</H3>" &  "<P>" & objRS

> ("Description") & "<BR><BR>" & objRS("requirements") & "<BR><BR>" & objRS

> ("ToApply") &"</P>"

>   objRS.MoveNext

> Wend

> 

> objRS.Close

> objConn.Close

> Set objRS = Nothing

> Set objConn = Nothing 

> %>

> 

> </BODY>

> </HTML>



I don't use DSN's  but do use OLEDB instead.



actconn="Driver={Microsoft Access Driver (*.mdb)};dbq=" & server.mappath

("/") &"\fleetwave\db\fw.mdb"



Set objConn = Server.CreateObject("ADODB.Connection")

strSQL = "SELECT distinct lang,textmess,translateto FROM lang where 

lang='" & session("lang")&"' order by lang,textmess;"

Set rslang = Server.CreateObject("ADODB.Recordset")

objConn.Open actconn

rslang.Open strSQL, objConn

If Not rslang.EOF Then

....



Regards

Graham

Message #3 by "Durwood Edwards" <durwoode@m...> on Wed, 25 Apr 2001 08:25:21 -0500
Thank you. I would really like to use DSN if possible. Anyone else have

ideas. I am suspecting that the problem lies somewhere in the NT box, but I

am quite new to all this, so my  suspicions are of almost no value LOL.



Thank you,



Durwood Edwards



----- Original Message -----

From: <gbrown@c...>

To: ASP Databases <asp_databases@p...>

Sent: Wednesday, April 25, 2001 10:45 AM

Subject: [asp_databases] Re: Moving asp page from PWS to IIS





> > I have modified a page from Beginning ASP Databases and it works

> perfectly

> > in PWS, but after moving all relevant files to IIS and creating the

> > referenced DSN, I get nothing returned to the browser. It acts as though

> > it is performing the requests, and the progress bar slowly increases at

> > bottom of page, but I never get a page to view.

> > Simple ASP pages perform fine, but his is the first data connection page

> I

> > have tried.

> >

> > We are running NT 4.0 with service pack 6a.

> > I have updated ADO to 2.1

> >

> > Any ideas where to start looking?

> >

> > Thanks,

> >

> > Durwood Edwards

> >

> > A familiar bit of code follows:

> >

> > <%Option Explicit

> > %>

> >

> > <HTML>

> > <HEAD>

> > <TITLE>Employment Opportunites</TITLE>

> > </HEAD>

> > <BODY>

> >

> > <%

> > Dim objConn, objRS

> > Dim adOpenForwardOnly, adLockReadOnly, adCmdTable

> > adOpenForwardOnly = 0

> > adLockReadOnly = 1

> > adCmdTable = 2

> >

> > Set objRS = Server.CreateObject("ADODB.Recordset")

> >

> > objRS.Open "advertisement", "dsn=employment", adOpenForwardOnly,

> > adLockReadOnly, adCmdTable

> >

> > While Not objRS.EOF

> >   Response.Write  "<H3>" & objRS("JobTitle")& "</H3>" &  "<P>" & objRS

> > ("Description") & "<BR><BR>" & objRS("requirements") & "<BR><BR>" &

objRS

> > ("ToApply") &"</P>"

> >   objRS.MoveNext

> > Wend

> >

> > objRS.Close

> > objConn.Close

> > Set objRS = Nothing

> > Set objConn = Nothing

> > %>

> >

> > </BODY>

> > </HTML>

>

> I don't use DSN's  but do use OLEDB instead.

>

> actconn="Driver={Microsoft Access Driver (*.mdb)};dbq=" & server.mappath

> ("/") &"\fleetwave\db\fw.mdb"

>

> Set objConn = Server.CreateObject("ADODB.Connection")

> strSQL = "SELECT distinct lang,textmess,translateto FROM lang where

> lang='" & session("lang")&"' order by lang,textmess;"

> Set rslang = Server.CreateObject("ADODB.Recordset")

> objConn.Open actconn

> rslang.Open strSQL, objConn

> If Not rslang.EOF Then

> ....

>

> Regards

> Graham

>
Message #4 by gbrown@c... on Wed, 25 Apr 2001 17:08:48
> Thank you. I would really like to use DSN if possible. Anyone else have

> ideas. I am suspecting that the problem lies somewhere in the NT box, 

but I

> am quite new to all this, so my  suspicions are of almost no value LOL.

> 

> Thank you,

> 

> Durwood Edwards

> 

> ----- Original Message -----

> From: <gbrown@c...>

> To: ASP Databases <asp_databases@p...>

> Sent: Wednesday, April 25, 2001 10:45 AM

> Subject: [asp_databases] Re: Moving asp page from PWS to IIS

> 

> 

> > > I have modified a page from Beginning ASP Databases and it works

> > perfectly

> > > in PWS, but after moving all relevant files to IIS and creating the

> > > referenced DSN, I get nothing returned to the browser. It acts as 

though

> > > it is performing the requests, and the progress bar slowly increases 

at

> > > bottom of page, but I never get a page to view.

> > > Simple ASP pages perform fine, but his is the first data connection 

page

> > I

> > > have tried.

> > >

> > > We are running NT 4.0 with service pack 6a.

> > > I have updated ADO to 2.1

> > >

> > > Any ideas where to start looking?

> > >

> > > Thanks,

> > >

> > > Durwood Edwards

> > >

> > > A familiar bit of code follows:

> > >

> > > <%Option Explicit

> > > %>

> > >

> > > <HTML>

> > > <HEAD>

> > > <TITLE>Employment Opportunites</TITLE>

> > > </HEAD>

> > > <BODY>

> > >

> > > <%

> > > Dim objConn, objRS

> > > Dim adOpenForwardOnly, adLockReadOnly, adCmdTable

> > > adOpenForwardOnly = 0

> > > adLockReadOnly = 1

> > > adCmdTable = 2

> > >

> > > Set objRS = Server.CreateObject("ADODB.Recordset")

> > >

> > > objRS.Open "advertisement", "dsn=employment", adOpenForwardOnly,

> > > adLockReadOnly, adCmdTable

> > >

> > > While Not objRS.EOF

> > >   Response.Write  "<H3>" & objRS("JobTitle")& "</H3>" &  "<P>" & 

objRS

> > > ("Description") & "<BR><BR>" & objRS("requirements") & "<BR><BR>" &

> objRS

> > > ("ToApply") &"</P>"

> > >   objRS.MoveNext

> > > Wend

> > >

> > > objRS.Close

> > > objConn.Close

> > > Set objRS = Nothing

> > > Set objConn = Nothing

> > > %>

> > >

> > > </BODY>

> > > </HTML>

> >

> > I don't use DSN's  but do use OLEDB instead.

> >

> > actconn="Driver={Microsoft Access Driver (*.mdb)};dbq=" & 

server.mappath

> > ("/") &"\fleetwave\db\fw.mdb"

> >

> > Set objConn = Server.CreateObject("ADODB.Connection")

> > strSQL = "SELECT distinct lang,textmess,translateto FROM lang where

> > lang='" & session("lang")&"' order by lang,textmess;"

> > Set rslang = Server.CreateObject("ADODB.Recordset")

> > objConn.Open actconn

> > rslang.Open strSQL, objConn

> > If Not rslang.EOF Then

> > ....

> >

> > Regards

> > Graham



Hi 



Is the DSN set up as a system DSN?

If you have moved the data from pws to iis does the dsn point to the 

correct place with the correct privileges?

Correct version of access? The connection details do change if you are 

using 2000.

Do you need an ADODB.Connection object with a DSN?

When we started to mess around with DSN's they had to be created both on 

the server and the workstation but as we swapped to just using OLEDB I 

never found out the reason. 



Regards

Graham











Message #5 by "Durwood Edwards" <durwoode@m...> on Wed, 25 Apr 2001 11:41:02 -0500
Yes the definition of dsn is "system". The dsn on the server references the

new location of the databse. The database was created in access 2000, and

the dsn on the server uses the access driver.

Are you saying that the dsn has to be set up on both workstation that the

user is browsing from as well as the server? I wouldn't think so, since the

server is actually the only one accessing the database, but then again, I am

new at this.

Thanks,



Durwood



> Is the DSN set up as a system DSN?

> If you have moved the data from pws to iis does the dsn point to the

> correct place with the correct privileges?

> Correct version of access? The connection details do change if you are

> using 2000.

> Do you need an ADODB.Connection object with a DSN?

> When we started to mess around with DSN's they had to be created both on

> the server and the workstation but as we swapped to just using OLEDB I

> never found out the reason.

>

> Regards

> Graham

Message #6 by gbrown@c... on Thu, 26 Apr 2001 17:32:39
> Yes the definition of dsn is "system". The dsn on the server references 

the

> new location of the databse. The database was created in access 2000, and

> the dsn on the server uses the access driver.

> Are you saying that the dsn has to be set up on both workstation that the

> user is browsing from as well as the server? I wouldn't think so, since 

the

> server is actually the only one accessing the database, but then again, 

I am

> new at this.

> Thanks,

> 

> Durwood

> 

> > Is the DSN set up as a system DSN?

> > If you have moved the data from pws to iis does the dsn point to the

> > correct place with the correct privileges?

> > Correct version of access? The connection details do change if you are

> > using 2000.

> > Do you need an ADODB.Connection object with a DSN?

> > When we started to mess around with DSN's they had to be created both 

on

> > the server and the workstation but as we swapped to just using OLEDB I

> > never found out the reason.

> >

> > Regards

> > Graham

Hi 



We stopped using DSN's because they were such a pain. We do however still 

have DSN's for the reports. Our local tests require the DSN to exist on 

both the workstation and the server even though we are running IIS 

locally. Once deployed to our ISP we only have a system DSN on their 

server. 



It is hit and miss so I presume there must be different ways and 

privileges etc to set these up.



I am going in to the office next week so if you are still struggling I'll 

have a word with the hardware guys and see what I can find out.



Regards

Graham


  Return to Index