asp/VBscript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • plumpnation
    New Member
    • Sep 2006
    • 16

    #1

    asp/VBscript

    Hello happy campers,

    gotta another question for the grey matter that you all share.

    In the script below, what is "YOUR_DSN"? How can I find out my DSN?

    How can you describe it in laymans, and what is a good example?

    As always, thankyou.


    <%@ LANGUAGE="VBSCR IPT" %>

    <%

    Set MyConn = Server.CreateOb ject("ADODB.Con nection")

    MyConn.Open "YOUR_DSN"

    SQL_query = "SELECT * FROM your_table WHERE your_field LIKE '%abc%';"

    Set RS = MyConn.Execute( SQL_query)

    %>

    <HTML>

    <HEAD>

    <TITLE>Docume nt Title</TITLE>

    </HEAD>

    <BASEFONT FACE="arial">

    <BODY>



    <p><b><% Response.Write SQL_query %></b></p>



    <%while not RS.eof%>

    <%=RS("FIELD1") %>&nbsp;<%=RS(" FIELD2")%>&nbsp ;<%=RS("FIELD3" )%><br>

    <%RS.MoveNext %>

    <%wend%>



    <%

    RS.Close

    MyConn.Close

    </BODY>


    </HTML>
  • plumpnation
    New Member
    • Sep 2006
    • 16

    #2
    plus,


    how do you get your code in a neat little box with scroll bars on this forum?

    is it the same on most forums?

    Comment

    Working...