new to asp need help filling in conn.asp file

Discussion in 'C#' started by scriptreseller, Jun 14, 2007.

  1. #1
    hi am new to asp trying to set up ehomes and am lost its not the same as php :confused:

    what do i need to put in to this code
    
    <%
    ' FileName="Connection_ado_conn_string.htm"
    ' Type="ADO" 
    ' DesigntimeType="ADO"
    ' HTTP="false"
    ' Catalog=""
    ' Schema=""
    Dim MM_conn_STRING,Title
    'MM_conn_STRING = "Driver={Microsoft Access Driver (*.mdb)};DBQ=c/news/database/enews.mdb"
    'MM_conn_STRING = "dsn=appconn;"
    
    Title= ""
    %>
    
    Code (markup):
    the help file is here http://homes.enthrallweb.us/help/

    i just carnt work it out any help would be gr8
     
    scriptreseller, Jun 14, 2007 IP
  2. educ8it

    educ8it Peon

    Messages:
    34
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Depends upon the connection type you are using.

    If you are gonna use a pathed connection string then you should change the path to match the location of your access database. Try putting
    <%
    Response.Write(Server.MapPath("./"))
    %>

    in a blank ASP file on the server. Running this will give you the absolute path to the folder containing your ASP file. Then just make this path relative to the database path (Remember to delete the file afterwards).

    The best method is to use a DSN which is often simple through a control panel. Then you simply substitute the name you give the database as follows:

    MM_conn_STRING = "dsn=database-name-here;"

    and just in-case you don't know, the apostrophe is a line-comment character - sorry if you already know this. So you only un-comment the line you need.

    Hope this helps.
     
    educ8it, Jun 14, 2007 IP
  3. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #3
    I do not advise using DSN because the scalability is no longer on your end... it's all based on the Hosting Server's abilities then.
     
    ccoonen, Jun 14, 2007 IP
  4. scriptreseller

    scriptreseller Active Member

    Messages:
    323
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    58
    #4
    Thanks I Will Try Out What You Said And Let You Know How It Gose
     
    scriptreseller, Jun 15, 2007 IP
  5. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #5
    cool, best of luck to you.
     
    ccoonen, Jun 15, 2007 IP