写一个html页面,要求连接oracle9.2数据库,主机名是computer,数据库名字是dataBase,用户名和密码是123。
页面上有一个button按钮和一个text按钮,点击button按钮后,将数据库中stocc.emp中的第一行的currentdate字段显示在text中,请问怎么实现?
最好要有详尽的代码,刚接触啥都不懂,谢谢了,在线等

解决方案 »

  1.   

    hello world!google一下吧很多的,或到vb.net版块去问问.
      

  2.   

    hello world都是静态取值的吧,没有和数据库进行交互
      

  3.   

    Dim strCon: strCon = "Driver={Microsoft ODBC for Oracle}; " & _
                         "CONNECTSTRING=(DESCRIPTION=" & _
                         "(ADDRESS=(PROTOCOL=TCP)" & _
                         "(HOST=localhost)(PORT=11601))" & _
                         "(CONNECT_DATA=(SERVICE_NAME=AA))); uid=A;pwd=123;"                      Dim oCon: Set oCon = WScript.CreateObject("ADODB.Connection")
    Dim oRs: Set oRs = WScript.CreateObject("ADODB.Recordset")
    oCon.Open strCon
    Set oRs = oCon.Execute("update scott.emp set sal=22222 where empno='7844';")
    While Not oRs.EOF
    WSCript.Echo oRs.Fields(0).Value
    oRs.MoveNext
    Wend
    oCon.Close
    Set oRs = Nothing
    Set oCon = Nothing缺少对象WScript,这个怎么解决
      

  4.   

    function Tclick()
      Dim strCon: strCon = "Provider=MSDAORA;Data Source=OEMREP;User ID=system;Password=system"                     Dim oCon: Set oCon = CreateObject("ADODB.Connection")
    Dim oRs: Set oRs = CreateObject("ADODB.Recordset")
    oCon.Open strCon
    Set oRs = oCon.Execute("update scott.emp set sal=22222 where empno=7844")
    oCon.Close
    Set oRs = Nothing
    Set oCon = Nothing
    MsgBox "111"
    end function这个函数执行的时候,msgbox"111"已经执行到了,但是sql语句没有在数据库更新,请问为什么吗