PDA

Click to See Complete Forum and Search --> : VB Scripts??


Kiegs219
Jun 28th, 2000, 04:14 AM
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.

Mark Sreeves
Jun 28th, 2000, 05:57 AM
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!

kb244
Jun 28th, 2000, 06:00 AM
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.

crazymarc
Jun 28th, 2000, 07:15 AM
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>

kb244
Jun 28th, 2000, 07:40 AM
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>