NinetyNine's Treasure

| 积淀孕育创新 智慧创造价值|
posts - 76, comments - 181, trackbacks - 3, articles - 14

2007年12月6日

把一个按空格分割的字符串存储在一个ArrayList数组中
为什么不能绑定ListBox?

posted @ 2008-03-01 10:13 (NineTyNine) 阅读(117) | 评论 (4)编辑

我想在类库中使用Configuration
但我不知道该引用什么DLL文件?

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Text;
using System.IO;
using System.Security.Cryptography;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
是不是还缺少什么using命令?

posted @ 2008-03-01 10:08 (NineTyNine) 阅读(100) | 评论 (1)编辑

运行:regsvr32 scrrun.dll

posted @ 2008-01-24 10:26 (NineTyNine) 阅读(38) | 评论 (0)编辑

在SQL数据库中有个.ldf后缀的文件
这个文件有什么实质性的作用啊?
它能起到还原数据库的作用吗?

posted @ 2007-12-29 11:50 (NineTyNine) 阅读(341) | 评论 (0)编辑

操作时出现 Server 对象 错误 'ASP 0177 : 800401f3'  Server.CreateObject 失败的解决方法

一、系统没有开启FSO组件

系统没有开启FSO组件.
FSO组件的开启和关闭方法
Dll 文件的注册和注销:
在开始菜单运行
注消FSO组件:RegSvr32 /u %windir%\SYSTEM32\scrrun.dll
启用FSO命令:RegSvr32 %windir%\SYSTEM32\scrrun.dll  

二、多次注消、启动后还是出现错误,原因是没权限,不知道怎么造成的,下边提供解决方法

权限出现了问题,打开注册表加入权限!
在 开始-运行中敲入regedit,然后找到HKEY_CLASSES_ROOT\Scripting.FileSystemObject

右击权限,加入everyone,internet来宾帐号(IUSR...)用户确定,然后重新启动IIs即可搞定!

posted @ 2007-12-29 11:46 (NineTyNine) 阅读(197) | 评论 (0)编辑

存储过程是这么写的
CREATE PROCEDURE UpLoadFromBank

@b_num varchar(
20),
@money 
decimal,
@ssfd varchar(
20),
@time datetime
AS
update db_student 
set s_ssf=@money,s_ssfd=@ssfd,s_dayinup='1',s_qf='0' where 

s_num
=@b_num
update db_ruzhu 
set ruzhu_ynjf='已交',ruzhu_nfjf='',ruzhu_jftime=@time where 

ruzhu_num
=@b_num
insert into db_cruzhu

(cruzhu_num,cruzhu_area,cruzhu_nj,cruzhu_zsf,cruzhu_time,cruzhu_lou,cruzhu_leibie) 

select ruzhu_num,ruzhu_area,ruzhu_nianji,ruzhu_zsf,convert(varchar(
10),getdate

(),
120),ruzhu_gongyu,ruzhu_leibie from db_ruzhu where ruzhu_num=@b_num

GO

。Net中是这么写的
DataTable tablefuckT=(DataTable)Session["tableFuckT"];

            SqlConnection conn 
= operate_sql.createCon();
            conn.Open();
            SqlCommand cmd 
= new SqlCommand();
            cmd.Connection 
= conn;
            
            
            
int a=0;
            
foreach(DataRow dr in tablefuckT.Rows)
            
{
                a 
= a+1;
                
                
string b_num=dr["b_number"].ToString();
                
decimal money = Convert.ToDecimal(dr["b_money"]);
                Center.Help.Help.Money Mssf 
= new HbuHouse.Center.Help.Help.Money(money);
                
string ssfd = Mssf.ToString();
                
if(b_num!="")
                
{

                    cmd.CommandText 
= "UpLoadFromBank";
                    cmd.CommandType 
= CommandType.StoredProcedure;

                    cmd.Parameters.Add(
"@b_num",SqlDbType.VarChar,20);
                    cmd.Parameters[
"@b_num"].Value = "1";
                    cmd.Parameters.Add(
"@money",SqlDbType.Decimal);
                    cmd.Parameters[
"@money"].Value = money;
                    cmd.Parameters.Add(
"@ssfd",SqlDbType.VarChar,20);
                    cmd.Parameters[
"@ssfd"].Value = ssfd;
                    cmd.Parameters.Add(
"@time",SqlDbType.DateTime);
                    cmd.Parameters[
"@time"].Value = operate_admin.GetSystemDate().ToString();

                    cmd.ExecuteNonQuery();
                    cmd.Parameters.Clear();
                }


                
                
                
            }

            conn.Close();
            conn.Dispose();

请帮忙看看是哪里的问题?

posted @ 2007-12-23 20:44 (NineTyNine) 阅读(120) | 评论 (0)编辑

时间段数据若没必要不要使用类型:datetime
如果此字段为必填项则不必考虑,可使用datetime。
当把字段为datetime的数据装环为varchar时,时间中的横线会丢失。所以一定要谨慎。
但可以转换为sql_variant型

posted @ 2007-12-18 11:16 (NineTyNine) 阅读(282) | 评论 (0)编辑

如果你的参数添加是在循环体内完成的,
第2次时就会重复添加,此时触发参数过多异常

解决方法1,参数在循环体外添加,for内部只赋值和取返回值
解决方法2,每次循环清空参数Parameters.Clear();

posted @ 2007-12-18 11:04 (NineTyNine) 阅读(226) | 评论 (0)编辑

如果panel的visible初始设置为false,但当在代码中将panel的visible设为true,panel中的控件却不可见,还需要把该控件的visible设为true才可以。而有的控件却没有问题
这是为什么啊?
该怎么避免阿?

posted @ 2007-12-08 22:52 (NineTyNine) 阅读(142) | 评论 (1)编辑

为什么在使用.net中会出现事件丢失的情况?
比如Button的单击事件,有时候就会出现事件丢失,但事件的代码在.cs文件中仍然存在。
为什么啊?
怎么才能避免?

posted @ 2007-12-08 22:45 (NineTyNine) 阅读(127) | 评论 (1)编辑

DBNULL和String.Empty和""
使用这三个有什么区别?

posted @ 2007-12-06 12:42 (NineTyNine) 阅读(180) | 评论 (1)编辑

在SQL server中的数据类型,谁能帮我详细的讲一下。
binary
image
sql_variant
timestamp
uniqueidentifier
这些类型都是怎么回事啊?

varchar nchar 有什么区别啊?

还有长度是怎么回事啊?

posted @ 2007-12-06 12:30 (NineTyNine) 阅读(109) | 评论 (0)编辑