Hi,
I am creating a page where i need to include a table from a sql database. So i connected to the server and entered my query. However, when I open up the corresponding web page, I receive an error that states that the table name does not match with the table name used in the query. However, I re-checked and ensured that I entered the correct table name and correct fields. I still get the error though.
The table name is T_C_Activity_Types
Here is the code:
"
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open = ConnectionString("IS")
DB = Request.QueryString("DB")
returnField = Request.QueryString("returnField")
stmt = "SELECT T_C_Activity_Types.id, T_C_Activity_Types.ActivityType" &_
"FROM T_C_Activity_Types" &_
"ORDER BY T_C_Activity_Types.id"
'Response.Write stmt
Set oRs = oConn.Execute(stmt)
%>
<body style="margin:0px">
<form name="form1">
<table style="width:100%">
<tr>
<th colspan=4>Activity Type Table
<tr>
<th colspan=4><input class="mainButton" type="button" value="Done" onclick="window.close();">
<input type="hidden" value="<%= returnField %>" name="returnField">
<tr class='rowHeader'>
<th>ID
<th>Activity Type
<%
Dim rowNum
rowNum = 0
WHILE NOT oRs.EOF
Response.Write "<td>"& oRs("id")
Response.Write "<td>"& oRs("ActivityType")
'rowNum = (rowNum + 1) Mod 2
oRs.MoveNext
WEND
%>
"
Can someone let me know what the problem is?...Thx
I am creating a page where i need to include a table from a sql database. So i connected to the server and entered my query. However, when I open up the corresponding web page, I receive an error that states that the table name does not match with the table name used in the query. However, I re-checked and ensured that I entered the correct table name and correct fields. I still get the error though.
The table name is T_C_Activity_Types
Here is the code:
"
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open = ConnectionString("IS")
DB = Request.QueryString("DB")
returnField = Request.QueryString("returnField")
stmt = "SELECT T_C_Activity_Types.id, T_C_Activity_Types.ActivityType" &_
"FROM T_C_Activity_Types" &_
"ORDER BY T_C_Activity_Types.id"
'Response.Write stmt
Set oRs = oConn.Execute(stmt)
%>
<body style="margin:0px">
<form name="form1">
<table style="width:100%">
<tr>
<th colspan=4>Activity Type Table
<tr>
<th colspan=4><input class="mainButton" type="button" value="Done" onclick="window.close();">
<input type="hidden" value="<%= returnField %>" name="returnField">
<tr class='rowHeader'>
<th>ID
<th>Activity Type
<%
Dim rowNum
rowNum = 0
WHILE NOT oRs.EOF
Response.Write "<td>"& oRs("id")
Response.Write "<td>"& oRs("ActivityType")
'rowNum = (rowNum + 1) Mod 2
oRs.MoveNext
WEND
%>
"
Can someone let me know what the problem is?...Thx