Results 1 to 2 of 2

Thread: Using SQL

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2000
    Location
    Ontario, Canada
    Posts
    61

    Using SQL

    Where do I put in SQL statements like INSERT and others when doing databases
    ---~^ Absalom ^~---

    There is nobody in the world who knows everything there is no one his/her workforce who knows everything what really makes the person smart is that he/she is not affraid to ask for help.

  2. #2
    Lively Member
    Join Date
    Jan 2001
    Posts
    118
    Sever side...

    <% %> (everything between them is server side.

    <% Option Explicit
    Dim Conn,Rs,SQL

    Set Conn = Server.createobject("ADODB.Connection") 'creates connection.
    Conn.open Connectionstring 'path to database.

    SQL = "Insert into table (Field1,Field2) values ('" & Val1 & "','" & Val2 & "')"
    Conn.execute SQL

    or

    SQL = "Select * from table"
    Set Rs = Conn.execute(SQL)



    %>

    <html>
    <% do while not rs.eof %>
    <%=rs("field1")%>
    <% rs.movenext
    loop%>


    </html>


    There is alot of ways doing this.

Posting Permissions

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



Click Here to Expand Forum to Full Width