当前时间在SQL语句中用getdate()
解决方案 »
- 怎么保护类的对象属性不能在外部被修改?
- Oledb给参数赋值和连接打开的关系问题
- 遍历Ilist<string>,并用指定字符分隔开
- 如何引用ORACLE.ACCESS
- C/S结构 数据上报实现方式问题
- 请教vss问题
- 用C#写了一个模拟福利彩票双色球的选号程序,怎样实现当随机产生的6个蓝色号码出现重复号码就重新随机产生号码?
- c#有无html转义的函数 像php里的 把"转义为\"等
- C#能否将字符串解析成指令并执行,等同于JSCript中的eval()函数
- 好像是很老的问题了,但还是要问
- sqlDataReader取数据时怎样用字段名来表示
- 哪个有前途??(APS.NET,WINFORMS)
默认值那里设置成
getDate()么?
run Enterprise Manager, right click on your table and select "Design Table", select your column and add getdate() as the default value>>>有一个比较大的文件。希望在后面几个字符的位置插入一个比较小的字符串
use System.IO.FileStream class, call Seek(-n,SeekOrigin.End), n is an appropriate bytes you want to read out, and write out the bytes you want
2、
filename:文件名,iStr:在后面几个字符的地方。Wstr:要写的字符串。 void MyFileInsertOp(string filename,int iStr,string Wstr){
System.IO.FileStream FS=new System.IO.FileStream(filename,FileMode.OpenOrCreate,FileAccess.ReadWrite ) ;
System.IO.StreamReader SR=new System.IO.StreamReader (FS);
System.IO.StreamWriter SW=new System.IO.StreamWriter(FS);
string st="";
try{
FS.Seek (-iStr,SeekOrigin.End);
st=SR.ReadToEnd();
FS.Seek (-iStr,SeekOrigin.End);
SW.WriteLine(Wstr+st);
}
catch(Exception e){MessageBox.Show (e.ToString()); }
//SR.Close();
SW.Close();
FS.Close ();
}