Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server ASP
SQL Server ASP Discussions about ASP programming with Microsoft's SQL Server. For more ASP forums, see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 13th, 2006, 09:41 AM
JA1 JA1 is offline
Registered User
Join Date: Apr 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default asp script not responding

I have an asp script that is working fine until I use a function

dim dispCountry
dispCountry = '1'
dispCountry= GetCountry( Cint(dispCountry) )
Function GetCountry( CountryNo )
    Dim rsCountry, CountryName, SQLcmd
    GetCountry = "UNSPECIFIED"

    strSQL = "dbo.OS_GetCountry(" & CountryNo & ")"
    Set SQLcmd = Server.CreateObject("ADODB.Command")
    With SQLcmd 
        .ActiveConnection = adoCon
        .CommandType = adCmdStoredProc
        .CommandText = strSQL
    End With
    Set rsCountry = SQLcmd.Execute()

    While rsCountry.EOF=False
        CountryName = rsCountry("NAME")

    GetCountry = CStr(CountryName)

End Function
If I comment the line executing the function the whole script works, with it in, the script just hangs until "Navigation to the webpage was canceled" happens. The Number is definitely in the table.

Can anyone help me please? What is going wrong? How can I get the script to tell me what is going on?

Old June 12th, 2006, 10:43 PM
Authorized User
Join Date: Sep 2003
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to prabodh_mishra

    While rsCountry.EOF=False
        CountryName = rsCountry("NAME")

    GetCountry = CStr(CountryName)

End Function


Above is few last lines of your codes.
Where is your recordset's moveNext method????
Put it just before wend.....


Similar Threads
Thread Thread Starter Forum Replies Last Post
JSTL is not responding? startjsp JSP Basics 0 May 25th, 2006 02:03 AM
Not Responding yagiroy Pro VB 6 6 December 7th, 2004 09:38 AM
IIS not responding, ASP Queuing marco.vanSchaijk@eds.com Classic ASP Professional 1 August 18th, 2003 08:32 AM
Sql server not responding in ASP umarzia Classic ASP Databases 1 August 4th, 2003 03:28 PM
SQL Server not responding in ASP umarzia SQL Server 2000 1 July 31st, 2003 06:52 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.