Hi friends how are you?
I'm a begginer with ASP and HTML programs.
So bellow is my test code, where I put a button and a little vbscript for him.
The page load ok, but when I click on the button called "cmdpesquisa" I get a script error message like:
object need: Server
What is going on???
I'm using Win2K pro with IIS (native), and DreamWherer Ultradev.
Very Thanks.
<input type="button" name="cmdpesquisa" value="Pesquisa" onclick="P">
<script language="VbScript">
Sub P()
Dim vCod
Dim Cn
Dim Rs
Set Cn = Server.CreateObject("ADODB.Connection"
Set Rs = Server.CreateObject("ADODB.RecordSet"
Cn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=Danilo;Data Source=DEMO01"
Cn.ConnectionTimeOut = 50
vCod = Request.frmDados("txtcodigo"
Rs.Open "Select Nome From Teste Where Codigo = " & vCod & ""
If Not Rs.EOF() Then
frmDados.txtnome.value = Rs("Nome"
Else
Msgbox "Nenhum Registro Encontrado !!!"
End If
Rs.Close
Cn.Close
Set Cn = Nothing
Set Rs = Nothing
End Sub
</script>