www.webdeveloper.com
Results 1 to 2 of 2

Thread: ADO Connectivity & View ASP Web Page

Hybrid View

  1. #1
    Join Date
    Aug 2005
    Posts
    24

    ADO Connectivity & View ASP Web Page

    Whenever I try to view my asp web page I keep getting this error message from microsoft i.e. referefncing my code:

    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="Connections/HCMAP.asp" -->
    <%
    Dim MeritPrinciple
    Dim MeritPrinciple_numRows
    Set MeritPrinciple=Server.CreateObject("ADODB.Recordset")
    MeritPrinciple.ActiveConnection=MM_HCMAP_STRING
    MeritPrinciple.Source="SELECT * FROM [Merit Principle Registration]"
    MeritPrinciple.CursorType = 0
    MeritPrinciple.CursorLocation = 2
    MeritPrinciple.LockType = 1
    MeritPrinciple.OPen()
    MeritPrinciple_NumRows = 0
    %>

    <%
    MeritPrinciple.Close()
    Set MeritPrinciple = Nothing
    %>

    for some reason it keeps referring to this particular part of the code

    MeritPrinciple.ActiveConnection=MM_HCMAP_STRING

    Can someone help me please.

  2. #2
    Join Date
    Aug 2005
    Posts
    51
    From the looks of it you're passing it the connection string rather than a connection object.

    Code:
    Dim objConn
    set objConn = server.createObject("ADODB.Connection")
    objConn.open( MM_HCMAP_STRING )
    
    MeritPrinciple.ActiveConnection = objConn

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles