All,
This are the first few lines of my first program to run on my home desktop running IIS 7 and SQL Server 2005.
The name of the database is datest and the table name is Tho_tho.
I get a compile error: "Compiler Error Message: BC30451: Name 'Tho_tho' is not declared" at the highlighted and underlined line.
Can someone help me with this rather silly mistake I seem to be making?
Thanks in advance.
SP
<%@ Import Namespace="System.Data.OleDb" %>
<script runat="server">
sub Page_Load
dim dbconn,sql,dbcomm,dbread
dbconn=New OleDbConnection("Server=PE-PC\MSSMLBIZ;Database=datest;Integrated Security=true")
dbconn.Open()
sql="SELECT * FROM Tho_tho"
dbcomm=New OleDbCommand(sql,dbconn)
dbread=dbcomm.ExecuteReader()
Tho_tho.DataSource=dbread
Tho_tho.DataBind()
dbread.Close()
dbconn.Close()
end sub
</script>
------------------------