|
-
October 3rd, 2001, 05:33 AM
#1
Visual basic scripts
hi,
i'm already pretty familiar with VB. Now i would like to make a web site which makes connection to SQL7. I would like to do this with VB Script. The site would be on an IIS server. i have no experience with web enabled programming.
Can anybody give me suggestions, help me on how to do this??
Thanx
-
October 3rd, 2001, 06:15 AM
#2
Re: Visual basic scripts
hi !
you can use vbscript to build web applications on iis, in fact ASP uses it !!
For connecting to SQL server, you can use ADO, and some functions like "CreateObject, etc. " for creating connection objects,recordset objects, etc.
Hope, this might help you in going ahead !! An example code for Access 2000 follows this message, ( this is not full and clean source )
lavinder
<html>
<head>
<script language=vbscript>
function dodo()
dim con,rs
set con=createobject("ADODB.Connection")
con.provider="Microsft.Jet.OLEDB.4.0"
con.open "d:\test.mdb"
set rs=createobject("ADODB.Recordset"0
rs.open "select * from emp",con,2,3
do while not rs.eof
document.write rs.fields(0)
rs.movenext
loop
rs.close
con.close
set rs=nothing
set con=nothing
end function
</script>
.....
-
October 3rd, 2001, 06:38 AM
#3
Re: Visual basic scripts
Thanx for youre reply. I have a few other questions:
1) How do you link a script to something like a button? (i'm using frontpage)
2) can i first create my script with VB and then intigrate it in my webpage? (are the commands the same?)
Thanx in advance
-
October 4th, 2001, 03:44 AM
#4
Re: Visual basic scripts
linking to a button is simple and same as in vb,
just write the event on which you want to execute the function e.g.
<input type=button onclick="dodo()" value="ClickMe">
Vbscript and Visual basic language are syntactically same !!
You can create your script in VB also, try creating DHTML application ( in vb 6.0 ), as project type.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|