Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ppuar
Starting Member
28 Posts |
Posted - 2001-11-05 : 14:29:06
|
| I have the following stored procedure CREATE PROC icsDNSLookup @IPAddress varchar(255), @HostName varchar(1000) = null outputasBEGIN declare @object int exec sp_OACreate 'WebResolve.WebResolve', @object out exec sp_OASetProperty @object, 'Host', '192.168.0.73' exec sp_OAMethod @object, 'Resolve' exec sp_OAGetProperty @object, 'Host', @HostName out exec sp_OADestroy @object end GOGRANT EXECUTE ON icsDNSLookup TO publicgo----------------------------------------When I run the following command in sql query tool, the stored procedure works and resolves my ip address declare @temp varchar(255) exec icsDNSLookup '192.168.0.73', @HostName = @temp output print @temp result - www.google.comHowever if I run this proc from ASP it returns the ip address back?What am I doing wrong?p |
|
|
|
|
|