当前时间在SQL语句中用getdate()

解决方案 »

  1.   

    如何在sql中使用?
    默认值那里设置成
    getDate()么?
      

  2.   

    >>>如何在sql中使用?默认值那里设置成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
      

  3.   

    1、getdate()也可以写在SQL语句中,这个时间是服务器的时间。
    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 ();
    }