Results 1 to 5 of 5

Thread: VB Scripts??

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2000
    Location
    MN, USA
    Posts
    25

    Question

    Can someone explain to me how a visual basic script works? Is it an .exe? How is it different from a VB program? How would I go about making one? Thank you for your time!

    Daniel K.

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    Here's MY opinion:

    VB script is basically an interpeted language.

    It is executed by a scripting engine.

    for server-side VB Script it is part of the Web server

    for client-side it's part of interner explorer.

    you can also have just script files on your pc which are executed by IE5 engine.

    This was the basis of the recent 'love-bug' email 'virus'

    VB script is a cut-down version of VB.

    How would I go about making one?
    For client-side web pages , don't bother, use Javascript instead it's .... better!

    for serverside, you'll need to install PWS (personal web server) downloadable free of charge from Microsoft's web sites.

    any way, just search the internet for examples
    http://www.irt.org is as god a starting point as any.

    Good luck!


    If you have any problems just ask us lot!


    Mark
    -------------------

  3. #3
    Addicted Member
    Join Date
    May 2000
    Location
    Grand Rapids, MI
    Posts
    231
    if you know what scripting is, its nothing more than that, like Javascript is to Netscape(you cant run VBscript on IE), in Web Programming(writing Active Server PAges) I use VBScript heavily on the serverside, but I write Javascript on the client side(or no client side scripts if possible) for max compatibility. a scripting language can be useful, but it cant exactly be compiled, and its not idea if you are looking to make desktop applications.
    -Karl Blessing aka kb244{fastHACK}
    [email protected]

  4. #4

    Post Example

    Heres A Simple Example -

    <HTML>
    <BODY>
    <SCRIPT LANGUAGE-"VBScript">
    Sub Form_Onload
    Dim MB
    MB = MsgBox("Hello This Is A Example!",0,"Example")
    End Sub
    </SCRIPT>
    </BODY>
    </HTML>
    I Think I Might Dont Know The Answer To That One...

  5. #5
    Addicted Member
    Join Date
    May 2000
    Location
    Grand Rapids, MI
    Posts
    231
    And heres an example of server-side script

    <%@Language=VBscript%>
    <HTML>
    <BODY>
    <%
    Dim RS
    Dim Conn

    Set RS = Server.CreateObject("ADODB.Recordset")
    Set Conn = Server.CreateObject("ADODB.Connection")

    Conn.Open "SomeDSN", "sa", ""
    RS.Open "Select * From SomeTable", Conn, 3, 1
    Response.Write "<Table>" & VbCrlf
    if not RS.EOF then
    RS.MoveFirst
    while not RS.EOF
    Response.Write vbtab & "<TR>" & vbCrLf
    for each Field in RS.Fields
    Responce.Write vbtab & vbtab & "<TD>" & RS(Field.Name) & "</TD>" & vbcrlf
    next
    Response.Write vbtab & "</TR>" & vbcrlf
    RS.MoveNext
    wend
    Response.Write "</Table>" & vbcrlf
    RS.Close
    set RS = nothing
    end if
    Conn.Close
    set Conn = nothing
    %>
    </BODY>
    </HTML>

    this will look like on the client machine

    <HTML>
    <BODY>
    <TABLE>
    <TR>
    <TD> Row1:Field1 </TD>
    ...
    </TABLE>
    </BODY>
    </HTML>
    -Karl Blessing aka kb244{fastHACK}
    [email protected]

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