You are here: HTTP POST in SQL Server 2005 « MsSQL Server « IT news, forums, messages
HTTP POST in SQL Server 2005

Posted by Nick Chan on 09/14/07 08:48

hello, i have this summarized stored proc. Problem is, when using
'Send', my aspx page reads (asp.net)Request.Form as empty

However, when I use a simple html file to post, it works. Does anyone
know what's wrong?

EXEC @iHr = sp_oaCreate 'Msxml2.ServerXMLHTTP.3.0',@iObject OUTPUT

declare @data as nvarchar(max)
set @data = 'boo=yeah'

EXEC @iHr = sp_OAMethod @iObject, 'Open', null,
'POST',@smtpWebService, 0

EXEC @iHr = sp_OAMethod @iObject, 'setRequestHeader', null, 'Content-
Type', 'application/x-www-form-urlencoded'

EXEC @iHr = sp_OAMethod @iObject, 'send',null,@data

while @State<>4
begin
exec sp_oagetproperty @iObject, 'readyState', @State output
end

EXEC @iHr = sp_OAGetProperty @iObject, 'responseText',@retVal OUT

print @retVal

EXEC sp_OADestroy @iObject

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация