Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases 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
  #1 (permalink)  
Old September 4th, 2003, 03:28 PM
Authorized User
 
Join Date: Sep 2003
Location: , , .
Posts: 93
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to flyin
Default 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????
HELP PLEEEEASE!!!:D
  #2 (permalink)  
Old September 4th, 2003, 03:48 PM
Registered User
 
Join Date: Sep 2003
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

what sort of function?
MS SQL function?

  #3 (permalink)  
Old September 4th, 2003, 04:05 PM
Authorized User
 
Join Date: Sep 2003
Location: , , .
Posts: 93
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to flyin
Default

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!
  #4 (permalink)  
Old September 5th, 2003, 03:10 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

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.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling MS Access vba function via Excel Kourosha Excel VBA 0 December 31st, 2007 08:33 AM
convert a SQL Statement from MS Access to a SQL Corey Access 6 March 28th, 2007 12:33 PM
MS Access .mdb calling SQL server 2000 stored proc fazzou Access 6 September 8th, 2006 11:32 AM
Help writing SQL Statement/ .net code for function carswelljr Classic ASP Databases 2 August 24th, 2006 03:31 PM





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