1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help with asp and install instructions, please

Discussion in 'C#' started by chrisj, Oct 28, 2007.

  1. #1
    I am trying to follow some install instructions in regard to asp & MSSQL. Can you tell me if I've commented correctly?

    Instructions:
    "Step 5 - Changing the database connection string
    Once you have created the connection string , you should now replace the existing connection string in UManager with the one created by you. Follow the simple process below to replace it.

    Open the /umanager/ufolder/config.asp file
    The config.asp has both the options to connect to a SQL or Access database.
    Based on your selection of database replace the connection string with the one created by from step 4
    The config.asp file currently has a uncommented line that chooses MS ACCESS as the database. You can leave it as it is if you have choosen to use Microsoft Access and just replace the connection string with the one created by you.
    If you have choosen to use Microsoft SQL server, then comment the line that contains the Access connection string and the word MS ACCESS and uncomment the lines that contain the SQL connection string and the word MS SQL.
    Replace the SQL connection string in the config.asp file with the one created by you in Step 4"

    I've chosen MSSQL so I'll first show you the unmodified file and then show you the file as I modified it as per the way I've read these instructions. Can you tell me if you believe I've done it correctly? Thanks.
    (I've changed the name of the actual file for privacy purposes).

    Unmodified file:

    
    <%
    '=========================================
    'UManager Version 2.1
    'Copyright 2001 (C) XYZ
    'Config Module
    'For any help with modification to
    'this file contact support@xyz*&^*&^.com
    '=========================================
    
    	dim umconnstr, umdatabasetype, umpagewidth, umadminidentity, umversion, umpage
    
    	'For MicroSoft SQL Server 6.5 and above
    	'umconnstr = "Provider=SQLOLEDB; Data Source=200.###.100.8; Initial Catalog=um21test; User ID=sa; Password=sqlmaster;"
    	'umdatabasetype = "MS SQL"
    
    	'For MicroSoft Access Database 97 and above
    	'umconnstr = "Driver={Microsoft Access Driver (*.mdb)};DBQ="&server.MapPath("/usermanager/database/usermanagerdatabase.mdb") &";uid=;pwd=;"
    
    	umconnstr = "provider=Microsoft.Jet.OLEDB.4.0; Data Source ="&server.MapPath("/usermanager/database/urmanagerdatabase.mdb") &";" 
    	umdatabasetype = "MS ACCESS"
    
    	umpage = "/umanager/members/default.asp"
    	umpagewidth = "width=100%"
    	umadminidentity = "upgrade"
    	umversion = "2.1"
    %>
    Code (markup):

    File commented/modified as per the instructions?


    
    <%
    '=========================================
    'UManager Version 2.1
    'Copyright 2001 (C) XYZ
    'Config Module
    'For any help with modification to
    'this file contact support@xyz*&^*&^.com
    '=========================================
    
    	dim umconnstr, umdatabasetype, umpagewidth, umadminidentity, umversion, umpage
    
    	'For MicroSoft SQL Server 6.5 and above
    	'umconnstr = "Provider=SQLOLEDB; Data Source=myipaddess; Initial Catalog=um21test; User ID=myusername; Password=mypassword;"
    	'umdatabasetype = "MS SQL"
    
    	<%'For MicroSoft Access Database 97 and above%>
    	<%'umconnstr = "Driver={Microsoft Access Driver%> (*.mdb)};DBQ="&server.MapPath("/usermanager/database/usermanagerdatabase.mdb") &";uid=;pwd=;"%>
    
    	<%'umconnstr = "provider=Microsoft.Jet.OLEDB.4.0; Data Source ="&server.MapPath("/usermanager/database/urmanagerdatabase.mdb") &";" 
    	umdatabasetype = "MS ACCESS"%>
    
    	umpage = "/umanager/members/default.asp"
    	umpagewidth = "width=100%"
    	umadminidentity = "upgrade"
    	umversion = "2.1"
    %>
    Code (markup):
     
    chrisj, Oct 28, 2007 IP
  2. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Nope, not done it correctly.

    You have nested <% %> which simply wont help and most likely throw an error - to comment our a line you simply add a ' in front of it

    At the moment you havent got any db details - you need to remove the <% you have added, add a ' in front of the Access details and remove the ' from the sql ones like:

    
    <%
    '=========================================
    'UManager Version 2.1
    'Copyright 2001 (C) XYZ
    'Config Module
    'For any help with modification to
    'this file contact support@xyz*&^*&^.com
    '=========================================
    
    	dim umconnstr, umdatabasetype, umpagewidth, umadminidentity, umversion, umpage
    
    	'For MicroSoft SQL Server 6.5 and above
    	umconnstr = "Provider=SQLOLEDB; Data Source=myipaddess; Initial Catalog=um21test; User ID=myusername; Password=mypassword;"
    	umdatabasetype = "MS SQL"
    
    	'For MicroSoft Access Database 97 and above
    	'umconnstr = "Driver={Microsoft Access Driver (*.mdb)};DBQ="&server.MapPath("/usermanager/database/usermanagerdatabase.mdb") &";uid=;pwd=;"
    
    	'umconnstr = "provider=Microsoft.Jet.OLEDB.4.0; Data Source ="&server.MapPath("/usermanager/database/urmanagerdatabase.mdb") &";" 
    	'umdatabasetype = "MS ACCESS"
    
    	umpage = "/umanager/members/default.asp"
    	umpagewidth = "width=100%"
    	umadminidentity = "upgrade"
    	umversion = "2.1"
    %>
    
    Code (ASP):
     
    AstarothSolutions, Oct 29, 2007 IP