|
有3个表:caterogy(课程),字段:caterogyid,caterogyname,caterogydescription,viewcount,datetime,ohter(地址);depart(部门)表,字段:departid,departname,viewcount;category_in_depart表,字段:
departid,caterogyid,caterogyname,viewcount
现在要有管理员添加功能:
<tr><td style="height: 68px">院系名称</td>
<td style="height: 68px">
<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="AccessDataSource1"
DataTextField="departname" DataValueField="departid">
</asp:DropDownList>
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/videoplay.mdb"
SelectCommand="SELECT [departid], [departname] FROM [depart]"></asp:AccessDataSource>
</td>
</tr>
<tr>
<td>课程名称</td>
<td>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox></td></tr>
<tr><td>课程编号</td>
<td>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox></td></tr>
<tr><td>课程描述</td>
<td>
<asp:TextBox ID="TextBox3" runat="server" Height="62px" Width="168px"></asp:TextBox></td></tr>
<tr><td>地址</td>
<td>
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox></td></tr>
<tr><td>
<asp:Button ID="Button1" runat="server" Text="发表" OnClick="Button1_Click" /></td>
<td><asp:Label runat="server" ID="result"></asp:Label></td></tr>
就是说要把新的记录插到两个表中,写access的语句?
|
|