sql怎样插入数据啊
好奇怪,我在我的电脑上作的一个简单的留言板,留言成功,一切正常,于是我就把它弄到服务器上去,结果什么现象都没有,不管用不用存储过程在我电脑上都正确而服务器总是没有反应
ConnectionStringSettings setting = System.Configuration.ConfigurationManager.ConnectionStrings["masterConnectionString"];
SqlConnection conn = new SqlConnection(setting.ConnectionString);
conn.Open();
SqlCommand cmd = new SqlCommand("insert into talk (text) values (@text)", conn);
//cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@text", SqlDbType.NVarChar);
cmd.Parameters["@text"].Value = this.content1.Value;
cmd.ExecuteNonQuery();
conn.Close();
this.content1.Value = "";
就连最后一句this.content1.Value = "";清空留言框都不执行了,不报错,
从我的测试数据看,连接也就没问题了,就如这个画面一样,我点了 确认留言 后,还是这副画面
Connection String是否正确呢?
从你的描述看可能这个过程没有执行,单步跟踪看下
file:///C:/Documents%20and%20Settings/Administrator/桌面/QQ截图未命名.jpg
应该是你的连接字符不对了,单步跟踪下
恩,同意4楼的看法
应该检
相关问答:
with adod_dict do
begin
close;
commandtext:='select bgqxcode,count(*) wjsl from wscl_wsda_file where wjnd=:tnd group by bgqxcode'; ......
我EXCEL中一个单元格的数据如 "2009-01","8949-232"
将这个数据粘贴到PL/SQL中的一个表中后,数据确是成为了 2009-01,8949-232 ,把所有的""都没了,
如何弄呢?请大家试 ......
sql2005
select *from v_ddxx where d_sfsc='0' and (g_ssbm='1001' or g_ssbm='1002') and (xxf>0 and xxfwzf <>0 ),执行速度慢的要死,但是如果把(xxf>0 and ......
小弟最近遇到一个问题,要求得出哪个班级的教师待遇最高,把同一个班级的教师待遇合计起来
班级表 教师表
班级ID & ......