<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>X-pack.org &#187; Database</title>
	<atom:link href="http://home.x-pack.org/category/free-source-code/delphi/database/feed/" rel="self" type="application/rss+xml" />
	<link>http://home.x-pack.org</link>
	<description>Download all you need here</description>
	<lastBuildDate>Fri, 18 May 2012 11:09:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>[ Delphi ] – Get the table version</title>
		<link>http://home.x-pack.org/delphi-get-the-table-version/</link>
		<comments>http://home.x-pack.org/delphi-get-the-table-version/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 03:36:13 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=445</guid>
		<description><![CDATA[function GetTableVersion(Table: TTable): Longint; var &#160;&#160;hCursor: hDBICur; &#160;&#160;DT:&#160;&#160;&#160;&#160;&#160;&#160;TBLFullDesc; begin &#160;&#160;Check(DbiOpenTableList(Table.DBHandle, True, False, &#160;&#160;&#160;&#160;PChar(Table.TableName), hCursor)); &#160;&#160;Check(DbiGetNextRecord(hCursor, dbiNOLOCK, @DT, nil)); &#160;&#160;Result := DT.tblExt.iRestrVersion; &#160;&#160;Check(DbiCloseCursor(hCursor)); end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-get-the-table-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Select a random data record</title>
		<link>http://home.x-pack.org/delphi-select-a-random-data-record/</link>
		<comments>http://home.x-pack.org/delphi-select-a-random-data-record/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 03:35:03 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=443</guid>
		<description><![CDATA[procedure TForm1.Button1Click(Sender: TObject); begin &#160;&#160;Randomize; &#160;&#160;Table1.First; &#160;&#160;Table1.MoveBy(Random(Table1.RecordCount)); end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-select-a-random-data-record/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Select all Fields in a TDBGrid</title>
		<link>http://home.x-pack.org/delphi-select-all-fields-in-a-tdbgrid/</link>
		<comments>http://home.x-pack.org/delphi-select-all-fields-in-a-tdbgrid/#comments</comments>
		<pubDate>Tue, 04 May 2010 03:33:52 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=441</guid>
		<description><![CDATA[function GridSelectAll(Grid: TDBGrid): Longint; begin &#160;&#160;Result := 0; &#160;&#160;Grid.SelectedRows.Clear; &#160;&#160;with Grid.DataSource.DataSet do &#160;&#160;begin &#160;&#160;&#160;&#160;First; &#160;&#160;&#160;&#160;DisableControls; &#160;&#160;&#160;&#160;try &#160;&#160;&#160;&#160;&#160;&#160;while not EOF do &#160;&#160;&#160;&#160;&#160;&#160;begin &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Grid.SelectedRows.CurrentRowSelected := True; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Inc(Result); &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Next; &#160;&#160;&#160;&#160;&#160;&#160;end; &#160;&#160;&#160;&#160;finally &#160;&#160;&#160;&#160;&#160;&#160;EnableControls; &#160;&#160;&#160;&#160;end; &#160;&#160;end; end; procedure TForm1.Button1Click(Sender: TObject); begin &#160;&#160;GridSelectAll(DBGrid1); end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-select-all-fields-in-a-tdbgrid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Color a TDBGrid</title>
		<link>http://home.x-pack.org/delphi-color-a-tdbgrid/</link>
		<comments>http://home.x-pack.org/delphi-color-a-tdbgrid/#comments</comments>
		<pubDate>Tue, 04 May 2010 03:32:36 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=438</guid>
		<description><![CDATA[procedure TForm1.ColorGrid(dbgIn: TDBGrid; qryIn: TQuery; const Rect: TRect; &#160;&#160;DataCol: Integer; Column: TColumn; &#160;&#160;State: TGridDrawState); var &#160;&#160;iValue: LongInt; begin &#160;&#160;if (DataCol = 0) then &#160;&#160;begin &#160;&#160;&#160;&#160;iValue := qryIn.FieldByName('HINWEIS_COLOR').AsInteger; &#160;&#160;&#160;&#160;case iValue of &#160;&#160;&#160;&#160;&#160;&#160;1: dbgIn.Canvas.Brush.Color := clGreen; &#160;&#160;&#160;&#160;&#160;&#160;2: dbgIn.Canvas.Brush.Color := clLime; &#160;&#160;&#160;&#160;&#160;&#160;3: dbgIn.Canvas.Brush.Color := clYellow; &#160;&#160;&#160;&#160;&#160;&#160;4: dbgIn.Canvas.Brush.Color := clRed; &#160;&#160;&#160;&#160;end; &#160;&#160;&#160;&#160;dbgIn.DefaultDrawColumnCell(Rect, DataCol, Column, State); &#160;&#160;end; end; procedure TForm1.DBGrid1DrawColumnCell(Sender:]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-color-a-tdbgrid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Create a table including an AutoInc field (ADO/MSSQL)</title>
		<link>http://home.x-pack.org/delphi-create-a-table-including-an-autoinc-field-adomssql/</link>
		<comments>http://home.x-pack.org/delphi-create-a-table-including-an-autoinc-field-adomssql/#comments</comments>
		<pubDate>Tue, 04 May 2010 03:28:01 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=430</guid>
		<description><![CDATA[uses AdoDB; var &#160;&#160;q: TAdoQuery; &#160;&#160;db: TAdoConnection; begin &#160;&#160;&#160;&#160;q := TADOQuery.Create(nil); &#160;&#160;&#160;&#160;q.Connection := db; &#160;&#160;&#160;&#160;q.Close; &#160;&#160;&#160;&#160;q.SQL.Clear; &#160;&#160;&#160;&#160;q.SQL.Add('Create Table TABLENAME (ID COUNTER PRIMARY KEY, MYTEXT1 String, MYTEXT2 String);'); &#160;&#160;&#160;&#160;q.Prepared := True; &#160;&#160;&#160;&#160;try &#160;&#160;&#160;&#160;&#160;&#160;q.ExecSQL; &#160;&#160;&#160;&#160;except end; &#160;&#160;&#160;&#160;q.Free; end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-create-a-table-including-an-autoinc-field-adomssql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Get Rid Of the Annoying SQL Wait Cursor</title>
		<link>http://home.x-pack.org/delphi-get-rid-of-the-annoying-sql-wait-cursor/</link>
		<comments>http://home.x-pack.org/delphi-get-rid-of-the-annoying-sql-wait-cursor/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 03:31:31 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=436</guid>
		<description><![CDATA[{ &#160;&#160;Simply place this one line of code in the OnCreate event of &#160;&#160;the form that is showing the annoying SQL Wait cursor... } procedure TForm1.FormCreate(Sender: TObject); begin &#160;&#160;Screen.Cursors[crSQLWait] := Screen.Cursors[crHourGlass]; end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-get-rid-of-the-annoying-sql-wait-cursor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Add a Row Number in your DBGrid</title>
		<link>http://home.x-pack.org/delphi-add-a-row-number-in-your-dbgrid/</link>
		<comments>http://home.x-pack.org/delphi-add-a-row-number-in-your-dbgrid/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 03:30:28 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=434</guid>
		<description><![CDATA[{ &#160;&#160;1. create new blank field in dbgrid &#160;&#160;2. rename the title with 'No:' &#160;&#160;3. put this code in OnDrawColumncell &#160;&#160;4. Now your Grid has a row number } procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; &#160;&#160;DataCol: Integer; Column: TColumn; State: TGridDrawState); begin &#160;&#160;if DataSource1.DataSet.RecNo &#62; 0 then &#160;&#160;begin &#160;&#160;&#160;&#160;if Column.Title.Caption = 'No:' then &#160;&#160;&#160;&#160;&#160;&#160;DBGrid1.Canvas.TextOut(Rect.Left +]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-add-a-row-number-in-your-dbgrid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Add field to table at runtime</title>
		<link>http://home.x-pack.org/delphi-add-field-to-table-at-runtime/</link>
		<comments>http://home.x-pack.org/delphi-add-field-to-table-at-runtime/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 03:28:57 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=432</guid>
		<description><![CDATA[procedure TForm1.Button1Click(Sender: TObject); var &#160;&#160;Field: TField; &#160;&#160;i: Integer; begin &#160;&#160;Table1.Active:=False; &#160;&#160;for i:=0 to Table1.FieldDefs.Count-1 do &#160;&#160;&#160;&#160;Field:=Table1.FieldDefs[i].CreateField(Table1); &#160;&#160;Field:=TStringField.Create(Table1); &#160;&#160;with Field do &#160;&#160;begin &#160;&#160;&#160;&#160;FieldName:='New Field'; &#160;&#160;&#160;&#160;Calculated:=True; &#160;&#160;&#160;&#160;DataSet:=Table1; &#160;&#160;end; &#160;&#160;Table1.Active:=True; end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-add-field-to-table-at-runtime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 21/43 queries in 0.053 seconds using disk: basic
Object Caching 538/583 objects using disk: basic

Served from: home.x-pack.org @ 2012-05-19 04:58:31 -->
