p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Databases (http://p2p.wrox.com/forumdisplay.php?f=62)
-   -   Calling a Function within an MS SQL Statement (http://p2p.wrox.com/showthread.php?t=3499)

flyin September 4th, 2003 03:28 PM

Calling a Function within an MS SQL Statement
I am currently finding a solution to a problem i have and i was hoping the great minds of the forums could help. The problem goes as fallows: I am wondering if there is a way to access a function called getUserPoints() stored in a COM object within an MS SQL Statement. For instance,
in a programming manner i want to do something like this:
"Update [table] Set Points = " & getUserPoints(param1, param2) & " WHERE ID=9". I know you can do this with PL/SQL, but is there a solution for MS SQL????

mpicton September 4th, 2003 03:48 PM

what sort of function?
MS SQL function?

flyin September 4th, 2003 04:05 PM

Well, the COM OBJECT is written in VB 6.0. I believe you can do this with an MS SQL Function, but i want to do my functionality within a com object written in visual basic. thanks for replying so quickly![8D]

pgtips September 5th, 2003 03:10 AM

Take a look in SQL Server BOL at stored procs beginning sp_OA..., especially sp_OACreate and sp_OAMethod. They allow you to create COM objects and call methods, properties. Watch out for the permissions you need to run these though.

All times are GMT -4. The time now is 07:51 AM.

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