//擷取檔案夾的路徑 private void button8_Click(object sender, EventArgs e) { this.comboBox1.Items.Clear(); ArrayList list = new ArrayList(); this.getChirDir(@"C:\bbb", ref list); for (int i = 0; i <
批量替換當前資料庫中資料----普通格式DECLARE @T VARCHAR(255),@C VARCHAR(255) --聲明兩個變數DECLARE Table_Cursor CURSOR FOR --聲明遊標Select a.name,b.name FROM sysobjects a,syscolumns b --系統對象表與欄位表Where a.id=b.id AND a.xtype='u' AND (b.xtype=99 or b.xtype=35 or b.xtype=231 or
代碼Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->public static IList <T> FillList <T>(System.Data.IDataReader reader) { IList <T> lst= new List <T>();
更改記錄(更新已存在的記錄資料) Update 表名 Set欄位名=值,欄位名=值 Where 條件運算式 and 條件運算式注意:1,Update 後面不要加*號2,必須指定條件運算式,否則,整個欄位中的值將會全部被改掉3,要更改的欄位用 欄位名=欄位值 的方式,更改多欄位中間用','號隔開如:update 點單表 Set房台名稱='天津',酒水名稱='Haha' Where 房台名稱='重慶' and 酒水名稱='水果聖代' DoubleCat
uses IdGlobal; procedure TdjhyForm.SpeedButton2Click(Sender: TObject); var sfilename:string; function BlobContentTostring(const Filename:string):string; begin with Tfilestream.Create(filename,fmopenread) do try
例子table1結構如下id intname varchar(50)declare @id intdeclare @name varchar(50)declare cursor1 cursor for --定義遊標cursor1select * from table1 --使用遊標的對象(跟據需要填入select文)open cursor1 --開啟遊標fetch next from cursor1