Ask a Question related to ASP Database, Design and Development.
-
Scott McNair #1
Pulling PRINT results from a stored procedure
Hi,
I'd like to pull the results of a sproc within ASP as a text field, e.g.
PRINT statements, "### Rows Affected", etc. How would I go about doing
that?
Regards,
Scott
Scott McNair Guest
-
Stored Procedure
EXEC master..xp_cmdshell 'cscript c:\path\file.vbs' EXEC master..xp_cmdshell 'c:\path\file.exe' "Kannan" <gk_i@yahoo.com> wrote in message... -
drop down menu not pulling results
I have populated a dependent two select drop down menu without any trouble Im not at all sure on the Sql for the next step however. the drop down... -
Pulling the Verity Collection Name from Results
I am running CFMX 6.1 on Windows 2000 Server. I am trying to use Verity to full-text search several collections, one of which is a MS SQL 2000... -
Using a stored procedure
I am trying to pass a ProdID to a stored procedure, but I get an error: Error Executing Database Query. Procedure 'PriceBreak' expects... -
Stored procedure from stored procedure
Is it possible to create a stored procedure from a stored procedure? When I attempt this inanity, it doesn't blow up until syntax error at the... -
Aaron [SQL Server MVP] #2
Re: Pulling PRINT results from a stored procedure
Change the stored procedure to return resultsets instead of print
statements, set @@ROWCOUNT to putput variables or resultsets, etc. ADO can
see row(s) affected messages but can't do anything with them, and I don't
believe it can even see the PRINT statements.
--
[url]http://www.aspfaq.com/[/url]
(Reverse address to reply.)
"Scott McNair" <scott.mcnair@sfmco.takethispartout.com> wrote in message
news:Xns952C59546A714sfmco@207.46.248.16...> Hi,
>
> I'd like to pull the results of a sproc within ASP as a text field, e.g.
> PRINT statements, "### Rows Affected", etc. How would I go about doing
> that?
>
> Regards,
> Scott
Aaron [SQL Server MVP] Guest
-
Scott McNair #3
Re: Pulling PRINT results from a stored procedure
"Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in
news:OgeABHmbEHA.1656@TK2MSFTNGP09.phx.gbl:
Thanks for the response, Aaron. I actually was being obscure in my> Change the stored procedure to return resultsets instead of print
> statements, set @@ROWCOUNT to putput variables or resultsets, etc.
> ADO can see row(s) affected messages but can't do anything with them,
> and I don't believe it can even see the PRINT statements.
request, my primary concern was being able to pass data to an ASP page
without having to rely on a table, through the command object. As
ironically always seems to be the case, I found the answer within 5
minutes of posting on the newsgroup, by doing some creative googling.
As an aside, it's sort of frustrating to see what kind of hoops you have
to jump through in order to pull a simple result off of a sproc. This
seems a rather roundabout way just to get a simple boolean "yes/no"
result, don't you think?
Function IsAdmin(UserName)
Dim cmd, param
dim conServer
Set conServer = server.CreateObject("ADODB.Connection")
Set cmd=server.CreateObject("ADODB.Command")
conServer.ConnectionTimeout = 120
conServer.CommandTimeout = 120
conServer.Provider = "SQLOLEDB"
conServer.ConnectionString = SQLSERVER
conServer.Open
With cmd
.CommandType=adcmdstoredproc
.CommandText = "ProductDevelopment.dbo.pr_IsAdmin"
set .ActiveConnection=conServer
.Parameters.Append .CreateParameter ("@loginname",
advarchar, adParamInput, 50, UserName)
.Parameters.Append .CreateParameter ("@IsAdmin", adBoolean,
adParamOutput)
.execute ,,adexecutenorecords
IsAdmin = .Parameters("@IsAdmin")
end with
End Function
Scott McNair Guest



Reply With Quote

