解决方案 »
- .net 连接NT2008上的DB2 V9.7.0.2 提示未在本地计算机上注册“IBMDADB2.1”提供程序
- C#随机数动态添加到数组中
- C#窗体大小调整
- 如何动态获得对象的属性值
- 請教datagrid的問題,同時使用兩個為什麼一個功能不全啊?
- C#发布文件
- 想把4张 长20000px 宽20000px 的图片合成为一张大图该怎么做啊,好像photoshop最大只能生成30000px的图像?
- 如何设置所有控件的字体
- 添加记录后,如何将添加的记录变成当前的记录?
- asp.net网站内存大小
- C# 代码解释
- bit类型的IfAdmin不管true还是false绑定到GridView显示皆为0!!
str_state = "SELECT hwid,联系方式,冷藏车车牌号,货物温度 FROM 冷藏车 WHERE hwid='"+TextBox1.Text+"'";
所以老是提示在逗号附近有语法错误。但是我改成adsa.Fill(adds)后,还是提示逗号附近语法错误。
执行后,提示:
Error source:.net sqlclient data provider
error message:error converting data type varchar to bigint
set quoted_identifier on
set arithabort off
set numeric_roundabort off
set ansi_warnings on
set ansi_padding on
set ansi_nulls on
set concat_null_yields_null on
set cursor_close_on_commit off
set implicit_transactions off
set language us_english
set dateformat mdy
set datefirst 7
set transaction isolation level read committed以上是使用profiler抓到的内容,希望能提供更多信息
单独执行SQL语句,没有错误啊!
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.Source Error:
Line 36: // sqlda.Fill(ds, "冷藏车");
Line 37: sqlda.Fill(ds);
Line 38: if (ds.Tables["冷藏车"].Rows.Count > 0)
Line 39: {
Line 40: GridView1.DataSource = ds;
Line 37: sqlda.Fill(ds);
Line 38: if (ds.Tables["冷藏车"].Rows.Count > 0)兄弟你把 // sqlda.Fill(ds, "冷藏车");这句注释了下面还指定ds.Tables["冷藏车"],不会报错么,你先看下MSDN上面的adapter的用法哦