Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. COM
  4. COM running twice

COM running twice

Scheduled Pinned Locked Moved COM
databasehelpcomsysadminquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gavin_Mannion
    wrote on last edited by
    #1

    Hi All, I have a simple ASP page that connects to a COM Component to add some data to my Database, it works 100% apart from the fact that it runs it twice? Is this a known problem or could someone explain how I can stop this. Here is the code from my ASP Page

    AppMonitor = Server.CreateObject("AppMonitor.LoginDetails").InitialLogin
    (Application("cdscConnection"), gstrAccountName, Session.SessionID, stest)

    and the actual component

    Public Function InitialLogin( _
    ByVal ConnectionString As String, _
    ByVal AccountName As String, _
    ByVal SessionID As String, _
    ByRef stest As Variant _
    ) As Long
    Dim UserID As String
    UserID = "sa"
    Dim Password As String
    Password = ""
    Dim sql As String
    sql = "EXEC cdsc_TBTrace 0, '" & Replace(AccountName, "'", "''") & "', " & SessionID
    On Error GoTo ErrorHandler
    Set cn = New ADODB.Connection
    cn.Open (ConnectionString)
    cn.Execute (sql)
    stest = "Success"
    cn.Close
    ErrorHandler:
    With Err
    stest = Err.Description & "
    " & Err.Number
    End With
    End Function

    Thanks, Gavin

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups