ASP VBScript commands

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rilonex
    New Member
    • Sep 2008
    • 3

    ASP VBScript commands

    hello ,
    i would really appreciate it if anyone can help me with the meaning of this commands:


    1. <form name ="form1" action = "add to database.asp" method

    2. %@language= "VBscript"%
    <% option explicit %>

    3. set connection = server creat object <"ADODB.connect ion">
    set.recordset

    4. sconnstring="PR OVIDER=microsof t.set.OLEDB.40" & "data source = " & server.mappath <"user.mdb">

    5. sconnstring = "PROVIDER = microsoft.set.O LEDB.40" & " data source =" & server .mappath <"user.mdb">
    set.recordset = nothing.

    6. execute the SQL
    connection.exec ute<SQL>
  • shweta123
    Recognized Expert Contributor
    • Nov 2006
    • 692

    #2
    Hi,

    Following is the meaning of the commands you have asked :

    1. <form name ="form1" action = "add to database.asp" method
    Answer :
    The form element creates a form for user input. A form can contain textfields, checkboxes, radio-buttons and more. Forms are used to pass user-data to a specified URL.

    Attributes specified with form tag :
    i> name : It specifies name of the form.
    ii> action attribute: It specifies the URL that defines where to send the data when the submit button is pushed

    2. %@language= "VBscript"%
    <% option explicit %>
    Answer:
    @language attribute specifies the language you are using on ASP page.
    option explicit specifies that the variables declaration is compulsory.

    3. set connection = server creat object <"ADODB.connect ion">
    Answer :
    To create a database connection object on the server using the ADO Database connection object


    4. sconnstring="PR OVIDER=microsof t.set.OLEDB.40" & "data source = " & server.mappath <"user.mdb">

    Answer :Above connectionstrin g is used to open a connection to the database.

    Following is the explanation for the connectionstrin g you have specified :
    1> Provider : It specifies type of driver we are using for accessing the database.
    2> Data Source :Path of your database file.
    3> Server.MapPath: returns the physical path of file to the script.


    5. execute the SQL
    connection.exec ute<SQL>
    Answer :
    execute method is used for executing the sql statement for given database.

    Comment

    Working...