<%@ Page Language="VB" AutoEventWireup="false"%>
<%@ Import Namespace="System.Data.SqlClient" %>
<html>
<body>
Here comes the data!<br />
<%
Dim connect As New SqlConnection( _
"Server=mycomp;UID=sa;password=password01;database=Dummies")
connect.Open()
Dim cmd As New SqlCommand( _
"select nameid from names where first_name ='Jeff'", _
connect)
Dim id As Int32
id = cmd.ExecuteScalar()
connect.Close()
Response.Write(id)
%>
<br />How about that?<br />
</body>
</html>
|