PlanB
10-18-2000, 11:30 AM
Has anyone used active scripting (vbscript) in an SQL server 7 job?
I've tried looking for samples in microsofts online documentation and other places on the web and I can't seem to find anything useful.
All I need is a sample of how to retrieve a simple record set and the rest I can take from there.
Any help will be greatly appreciated.
crideout
10-26-2000, 08:37 AM
I think this is what your looking for:
Set wrkjet = CreateWorkspace("", "admin", "", dbUseJet)
Set dbaeroplan = wrkjet.OpenDatabase("aeroplan", _
dbDriverNoPrompt, False, _
"odbc:database = AEROPLAN; uid=sa;pwd=; dsn= aeroplan")
Set rspoints = dbaeroplan.OpenRecordset("POINTS", dbOpenDynaset)
niktesla
10-26-2000, 06:37 PM
Set objConn = Server.CreateObject("ADODB.Connection")
objconn.Open "DSN=QDS", "sa", ""
'Create and ADODB Command Object
Set objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConn
objCommand.CommandType = adCmdStoredProc
objCommand.CommandText = "insert_credit_granting_data"
'Create and set parameters
'sCredEid
objCommand.Parameters.Append objCommand.CreateParameter _
( "sCredEid", adVarChar, adParamInputOutput, 50 )
'Set the Parameters
objCommand.Parameters ("sCredEid") = Request.Item ("hidCredEid")
objCommand.Execute
sCredEid = objCommand( "sCredEid")
Brian T. Wiehoff
Flamelord
11-02-2000, 03:12 PM
I think that you are better off compiling a DLL in VB that does any processing then just putting this in the Job:
Dim obj
Set obj = Server.CreateObject("ActiveXServer.Class")
obj.DoWork()
Set obj=Nothing