Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2012
    Posts
    1

    Unanswered: newbie needs help

    Hi

    I am designing a property website and am have designed a database in access 2010 and saved it as a mdb format and am trying to connect to it and display the data

    I am using asp to connect to it but is not working

    The coding is below

    Code:
    <html>	<head>
    	<title>Retrieve data from database </title>
    	</head>
    	<body>
    	
    	<%
    	' Database connection - remember to specify the path to your database'
    
    
    	Set Conn = Server.CreateObject("ADODB.Connection")
    	DSN = "DRIVER = {Microsoft Access Driver (*. mdb)}; "
    	DSN = DSN & "DBQ=" & Server.MapPath ("/cgi-bin/listofproperties.mdb")
    
    
    	Conn.Open DSN
    	
    	' Close the database connection
    	Conn.Close
    	Set Conn = Nothing
    	%>
    	</body>
    	</html>
    could really need the help

    Thank you in advance

    Ian

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    I am using asp to connect to it but is not working
    probably best to ask this in the ASP section then
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    I am using asp to connect to it but is not working
    isn't very helpful to anyone trying to diagnose what is going wrong
    i'd suggest you display the value of DSN prior to trying to open the connection
    but I suspect its going to be
    DSN = DSN & "DBQ=" & Server.MapPath ("/cgi-bin/listofproperties.mdb")

    DSN = DSN & "DBQ=" & Server.MapPath & "/cgi-bin/listofproperties.mdb" or similar
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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