Normal
0
false
false
false
EN-US
X-NONE
X-NONE
MicrosoftInternetExplorer4
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
Hi! I am facing problem in INSERT statement of SQL 2005 express. Actually I
want to save data from one table to other two tables using SQL statement. I
want to do something like that, when I will press Create button from DataGride
Column. The data of that row of that Registration table will insert in some
other table like Account and Directory. I have tried but I cannot do it. Please
help me.
<%@ Page Language="C#"
MasterPageFile="~/Admin.master" AutoEventWireup="true"
CodeFile="AControlAccounts.aspx.cs" Inherits="Default2"
Title="Untitled Page" %><asp:Content ID="Content1"
ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server"><table><tr><td style="width:
713px"></td></tr><tr><td style="width:
713px"> </td></tr>
<asp:TemplateField HeaderText="Delete"><ItemTemplate><asp:LinkButton
ID="Delete" runat="server" OnClientClick="return
confirm ('Are you sure, you want to delete the record?');"
CommandName="Delete" Font-Bold="true" Font-Size="Small">
Delete</asp:LinkButton></ItemTemplate></asp:TemplateField></Columns>
<HeaderStyle BackColor="#E0E0E0" Wrap="False"
/></asp:GridView> <asp:SqlDataSource
ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:connectionString
%>"
SelectCommand="SELECT [RegId], [UserName], [Password], [FullName],
[EMail], [City], [Country] FROM
[Registration]"
DeleteCommand="DELETE FROM Registration WHERE (RegId = @RegId)"
<InsertParameters>
<asp arameter Name="RegId"
/>
</InsertParameters> </asp:SqlDataSource>
</td></tr><tr><td
style="width: 713px"> <asp:Button
ID="Button1" runat="server" OnClick="Button1_Click"
SkinID="button" Text="Cancel"
/></td></tr></table>
Enter your message below
Sign in or Join us (it's free).