做新闻发布时,这样一句话
今天做学生信息录入
其实我原本想这样呢.
然后我突然想起还要做信息修改
快哭了~~~~~
INSERT INTO [HICCDS7].[dbo].[News] ([NewsTitle] ,[NewsContent] ,[NewsType] ,[NewsPublisher] ,[NewsTime]) VALUES ('" + _NewsTitle + "' ,'" + _NewsContent + "' ,'" + _NewsType + "' ,'" + _NewsPublisher + "' ,'" + _NewsTime + "')
就好使了今天做学生信息录入
INSERT INTO [HICCDS7].[dbo].[StdudentBasic_Inf] ([UserName] ,[Pwd] ,[StudentName] ,[Gender] ,[Birthday] ,[SNational] ,[PoliticalBackground] ,[Duty] ,[Hostels] ,[Grade] ,[Professional],[Classes],[Rankings],[EnglishGrading],[ComputerGrading],[Health],[Number],[IContact],[FamilyContact],[Province],[City],[Towns],[Village],[WhereCome],[WhenToPartySchool],[WhenPositive],[WhenToParty],[Introducer],[Award],[Sanctions],[RelativesCall1],[RelativesName1],[RelativesGender1],[RelativesBackground1],[RelativesDuty1],[RelativesCall2],[RelativesName2],[RelativesGender2],[RelativesBackground2],[RelativesDuty2],[RelativesCall3],[RelativesName3],[RelativesGender3],[RelativesBackground3],[RelativesDuaty3],[RelativesCall4],[RelativesName4],[RelativesGender4],[RelativesBackground4],[RelativesDuty4],[Introduction],[CounselorsViews])VALUES('" + TextBox16.Text + "','" + TextBox16.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "','" + TextBox7.Text + "','" + TextBox8.Text + "','" + TextBox9.Text + "','" + TextBox10.Text + "','" + TextBox11.Text + "','" + TextBox12.Text + "','" + TextBox13.Text + "','" + TextBox14.Text + "','" + TextBox15.Text + "','" + TextBox16.Text + "','" + TextBox17.Text + "','" + TextBox18.Text + "','" + TextBox19.Text + "','" + TextBox20.Text + "','" + TextBox21.Text + "','" + TextBox22.Text + "','" + TextBox23.Text + "','" + TextBox24.Text + "','" + TextBox25.Text + "','" + TextBox26.Text + "','" + TextBox27.Text + "','" + TextBox28.Text + "','" + TextBox29.Text + "','" + TextBox30.Text + "','" + TextBox31.Text + "','" + TextBox32.Text + "','" + TextBox33.Text + "','" + TextBox34.Text + "','" + TextBox35.Text + "','" + TextBox36.Text + "','" + TextBox37.Text + "','" + TextBox38.Text + "','" + TextBox39.Text + "','" + TextBox40.Text + "','" + TextBox41.Text + "','" + TextBox42.Text + "','" + TextBox43.Text + "','" + TextBox44.Text + "','" + TextBox45.Text + "','" + TextBox46.Text + "','" + TextBox47.Text + "','" + TextBox48.Text + "','" + TextBox49.Text + "','" + TextBox50.Text + "','" + TextBox51 + "'" + ")
用了这样的代码搞定~~~~~其实我原本想这样呢.
string q = "";
int a = 2;
for (; a < 50; a++)
{
q = q + "'" + "+" + "TextBox" + a + ".Text+" + "'"+",";
}
但没实现.int a = 2;
for (; a < 50; a++)
{
q = q + "'" + "+" + "TextBox" + a + ".Text+" + "'"+",";
}
然后我突然想起还要做信息修改
快哭了~~~~~