Where do DAC objects live (in Classic ASP)?

139 views Asked by At

I have taken over a departing programmer's Classic ASP object, and I'm trying to debug some DAC code. The trouble is I don't really understand what DAC is or how it works -- and I can't find were the DAC code "lives".

Here's the individual line of code:

set runObj = server.CreateObject("DAC.clsDb_container")

We use SQL Server, and I looked in Enterprise Manager under Stored Procedures and User-Defined functions, but I don't see anything named clsDB_container.

Any suggestions where I can find the code for this DAC object?

The full code in context:

FUNCTION getNewGUID
    Dim runCON, runObj, runCMD

    DebugWrite( "<BEGIN> iRoutines.asp|getNewGUID (a) GUID=" & GUID & " dealernum=" & dealernum )

    set runObj = server.CreateObject("DAC.clsDb_container")   
    if not runObj.run_query("EXEC sproc_createGUID") then
      traperror(runObj.DB_ErrStr)
    else
        GUID = replace(runObj.get_by_ordinal(0),"-","")
        dealernum_len = trim(cstr(len(dealernum)))
        set runObj = nothing
    end if
    getNewGUID = dealernum_len & dealernum & GUID
    DebugWrite( "<END> iRoutines.asp|getNewGUID (b) getNewGUID=" & getNewGUID & " dealernum=" & dealernum )
END FUNCTION
2

There are 2 answers

0
Oded On BEST ANSWER

This looks like a custom COM object that was written as a data access layer for the site.

The name of the object would be DAC.clsDb_container and lives in a DLL somewhere on the web server.

It is not standard - you will need to look for (I am guessing here) the VB6 or Delphi code that created it if you want to be enlightened further.

1
Dee On

if all you need is a GUID then you could do this

<%

Function createGuid()

Set TypeLib = Server.CreateObject("Scriptlet.TypeLib")

dim tg : tg = TypeLib.Guid

createGuid = left(tg, len(tg)-2)

Set TypeLib = Nothing

End Function

%>