<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[My Visual Database — Need Help]]></title>
		<link>https://myvisualdatabase.com/forum/viewtopic.php?id=6848</link>
		<atom:link href="https://myvisualdatabase.com/forum/extern.php?action=feed&amp;tid=6848&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Need Help.]]></description>
		<lastBuildDate>Sun, 25 Apr 2021 07:13:03 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Need Help]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=40827#p40827</link>
			<description><![CDATA[<p>The authoritative message <img src="https://myvisualdatabase.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (Drovlesutedy)]]></author>
			<pubDate>Sun, 25 Apr 2021 07:13:03 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=40827#p40827</guid>
		</item>
		<item>
			<title><![CDATA[Re: Need Help]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=37697#p37697</link>
			<description><![CDATA[<p>Thanks to all to guide.</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Fri, 07 Aug 2020 04:28:08 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=37697#p37697</guid>
		</item>
		<item>
			<title><![CDATA[Re: Need Help]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=37648#p37648</link>
			<description><![CDATA[<p>Yes, you can add multiple &quot;and&quot; after a &quot;where&quot; but you might also need to use a &quot;or&quot; if the results are not what you expected.</p>]]></description>
			<author><![CDATA[null@example.com (tcoton)]]></author>
			<pubDate>Fri, 31 Jul 2020 22:47:29 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=37648#p37648</guid>
		</item>
		<item>
			<title><![CDATA[Re: Need Help]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=37643#p37643</link>
			<description><![CDATA[<p>Hi ehwager,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Thank you to guide. Now it work perfectly. Would you like to explain statement? <br />Can we use two ands for example where id = 25 and Date(date1).....</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Fri, 31 Jul 2020 18:20:54 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=37643#p37643</guid>
		</item>
		<item>
			<title><![CDATA[Re: Need Help]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=37633#p37633</link>
			<description><![CDATA[<p>The difficulty is to select a date range before even loading the form, so I guess, you were looking for a snippet to implement within existing forms.</p><p>I spent some time trying to get something working and it works if you add some components to your form, without your project, we can only give you hints.</p><p>I added two components:</p><p>- one label to display the result - could be an Edit box too<br />- one button to trigger the search with no action</p><p>Here is the working script (tested multiple times with success):</p><p>procedure Form1_Button2_OnClick (Sender: TObject; var Cancel: boolean);</p><div class="codebox"><pre><code>begin

  form1.Label1.Caption:= SQLExecute(&#039;Select Sum(svalue) from Sale where sdate between &#039;+form1.DateTimePicker1.sqlDate+&#039; and &#039;+form1.DateTimePicker2.sqlDate+&#039;&#039;);
end;</code></pre></div><p>Edited the first sentence to sound more positive.</p>]]></description>
			<author><![CDATA[null@example.com (tcoton)]]></author>
			<pubDate>Thu, 30 Jul 2020 18:05:30 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=37633#p37633</guid>
		</item>
		<item>
			<title><![CDATA[Re: Need Help]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=37632#p37632</link>
			<description><![CDATA[<p>My apology. I see two errors in my statement. Change the second formatter to &#039;YYYY-MM-DD&#039;. I was missing the 4th Y and it should be single quotes around it.</p>]]></description>
			<author><![CDATA[null@example.com (ehwagner)]]></author>
			<pubDate>Thu, 30 Jul 2020 16:38:09 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=37632#p37632</guid>
		</item>
		<item>
			<title><![CDATA[Re: Need Help]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=37631#p37631</link>
			<description><![CDATA[<p>check it out<br /></p><div class="quotebox"><blockquote><p>form1.edit1.Text:= SQLExecute(&#039;Select Sum(svalue) from Sale where sdate &gt;= &#039;+form1.datetimepicker1.sqldatetime+&#039; and sdate &lt;=&#039;+form1.datetimepicker2.sqldatetime+&#039; &#039;);</p></blockquote></div><p>if not works then change <br />sqldatetime to datetime</p>]]></description>
			<author><![CDATA[null@example.com (blackpearl8534)]]></author>
			<pubDate>Thu, 30 Jul 2020 15:24:23 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=37631#p37631</guid>
		</item>
		<item>
			<title><![CDATA[Re: Need Help]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=37622#p37622</link>
			<description><![CDATA[<p>hi ehwagner<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Thank to reply,&nbsp; I put your typed statement but now cursor blink on last part of statement&nbsp; &#039;&quot;&#039;); It is not working.<br />Last semi coln ; is blue not red means there is error</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Thu, 30 Jul 2020 05:45:13 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=37622#p37622</guid>
		</item>
		<item>
			<title><![CDATA[Re: Need Help]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=37618#p37618</link>
			<description><![CDATA[<p>unforgettable,<br />Dates in databases are stored in the YYYY-MM-DD format so you need to reformat your datetimepickers in that format.</p><br /><div class="codebox"><pre><code>form1.Edit1.Text:= SQLExecute(&#039;Select Sum(svalue) from Sale Where Date(Date1) &gt;= &quot;&#039; + FormatDateTime(&#039;YYYY-MM-DD&#039;,Sale.datetimepicker1.DateTime) + &#039;&quot; and Date(Date1) &lt;= &quot;&#039; + FormatDateTime(&#039;YYY-MM-DD&#039;&#039;,Sale.datetimepicker2.DateTime) + &#039;&quot;&#039;);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (ehwagner)]]></author>
			<pubDate>Thu, 30 Jul 2020 03:34:24 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=37618#p37618</guid>
		</item>
		<item>
			<title><![CDATA[Re: Need Help]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=37613#p37613</link>
			<description><![CDATA[<p>I am trying to use following statement but it also giving above error message.</p><p>form1.Edit1.Text:= SQLExecute(&#039;Select Sum(svalue) from Sale Where&#039; + &#039;Date(Date1) &gt;= &quot;&#039; + FormatDateTime(&#039;dd-mm-yyyy&#039;,Sale.datetimepicker1.DateTime)<br />&nbsp; &nbsp; &nbsp; &nbsp;+ &#039;&quot; and Date(Date1) &lt;= &quot;&#039; + FormatDateTime(&#039;dd-mm-yyyy&#039;,Sale.datetimepicker2.DateTime));</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Wed, 29 Jul 2020 19:52:46 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=37613#p37613</guid>
		</item>
		<item>
			<title><![CDATA[Re: Need Help]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=37612#p37612</link>
			<description><![CDATA[<p>It give an error message<br />near &quot;{&quot;: syntax error<br />Script:<br />SQLExecute</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Wed, 29 Jul 2020 19:27:11 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=37612#p37612</guid>
		</item>
		<item>
			<title><![CDATA[Re: Need Help]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=37608#p37608</link>
			<description><![CDATA[<p>How about this?</p><div class="codebox"><pre><code>form1.edit1.Text:= SQLExecute(&#039;Select Sum(svalue) from Sale where sdate between {datetimepicker1} and {datetimepicker2}&#039;;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (tcoton)]]></author>
			<pubDate>Wed, 29 Jul 2020 15:30:25 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=37608#p37608</guid>
		</item>
		<item>
			<title><![CDATA[Need Help]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=37606#p37606</link>
			<description><![CDATA[<p>Hi friends,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; I am facing a problem. Any one who guide me? Problem is:<br /> I have made a project. Suppose it has a form1, a editbox two date time pickers and a table name Sale having svalue currency field, a date sdate field and a item text field. I want to get svalue on editbox. I use this statement which works very will<br /> procedure form1_OnShow (Sender: TObject; Action: string);<br />begin<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; form1.edit1.Text:= SQLExecute(&#039;Select Sum(svalue) from Sale&#039;);<br />end;<br />but I want to get svalue for specific period or date. How can I write statement which will give my required result.<br />Thank in advance.</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Wed, 29 Jul 2020 10:10:06 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=37606#p37606</guid>
		</item>
	</channel>
</rss>
