CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2000
    Location
    Belgium, Bruges
    Posts
    146

    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


  2. #2
    Join Date
    Oct 2001
    Posts
    5

    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>
    .....




  3. #3
    Join Date
    May 2000
    Location
    Belgium, Bruges
    Posts
    146

    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


  4. #4
    Join Date
    Oct 2001
    Posts
    5

    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
  •  





Click Here to Expand Forum to Full Width

Featured