<?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 — Can I run a sql query in a script]]></title>
		<link>https://myvisualdatabase.com/forum/viewtopic.php?id=449</link>
		<atom:link href="https://myvisualdatabase.com/forum/extern.php?action=feed&amp;tid=449&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Can I run a sql query in a script.]]></description>
		<lastBuildDate>Fri, 12 Sep 2014 02:11:34 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Can I run a sql query in a script]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=2227#p2227</link>
			<description><![CDATA[<p>Thank you!</p>]]></description>
			<author><![CDATA[null@example.com (timlitw)]]></author>
			<pubDate>Fri, 12 Sep 2014 02:11:34 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=2227#p2227</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can I run a sql query in a script]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=2226#p2226</link>
			<description><![CDATA[<p>Please, change <br />FillAContainer.dotinspDate.Text := Cdotdate; <br />to<br />FillAContainer.dotinspDate.DateTime := SQLDateTimeToDateTime(Cdotdate);</p>]]></description>
			<author><![CDATA[null@example.com (DriveSoft)]]></author>
			<pubDate>Thu, 11 Sep 2014 21:44:30 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=2226#p2226</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can I run a sql query in a script]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=2225#p2225</link>
			<description><![CDATA[<p>It is working very good except for a date field - I am trying to figure out if it is a data type or what the problem is</p><p>I get an error Undeclared identifier &#039;Text&#039; at 32:37&nbsp; which is</p><p>var<br />&nbsp; &nbsp;Ccapacity, Ctare, Cdotdate: string;</p><p>begin<br />&nbsp; &nbsp; &nbsp;Ccapacity := SQLExecute(&#039;SELECT ContainerCapacity FROM Containers WHERE id=&#039; + IntToStr(FillAContainer.Containerid.dbItemID) );<br />&nbsp; &nbsp; &nbsp;Ctare := SQLExecute(&#039;SELECT ContainerEmpty FROM Containers WHERE id=&#039; + IntToStr(FillAContainer.Containerid.dbItemID) );<br />&nbsp; &nbsp; &nbsp;Cdotdate := SQLExecute(&#039;SELECT DOTInspDate FROM Containers WHERE id=&#039; + IntToStr(FillAContainer.Containerid.dbItemID) );</p><p>&nbsp; &nbsp; &nbsp;FillAContainer.contcapacity.Text := Ccapacity;<br />&nbsp; &nbsp; &nbsp;FillAContainer.prodTare.Text := Ctare;<br />&nbsp; &nbsp; &nbsp;FillAContainer.dotinspDate.<strong>Text </strong>:= Cdotdate;<br />end;</p>]]></description>
			<author><![CDATA[null@example.com (timlitw)]]></author>
			<pubDate>Thu, 11 Sep 2014 21:41:58 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=2225#p2225</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can I run a sql query in a script]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=2224#p2224</link>
			<description><![CDATA[<p>thank you very much!</p>]]></description>
			<author><![CDATA[null@example.com (timlitw)]]></author>
			<pubDate>Thu, 11 Sep 2014 19:24:09 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=2224#p2224</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can I run a sql query in a script]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=2222#p2222</link>
			<description><![CDATA[<p>You should use function SQLExecute (&#039;SQL query here&#039;);<br />but using SQLExecute you can get only one value from database.</p><p>example:<br /></p><div class="codebox"><pre><code>procedure Form1_ComboBox1_OnChange (Sender: string);
var
    Value1, Value2, Value3: string;
begin
    Value1 := SQLExecute(&#039;SELECT field1 FROM table WHERE id=&#039; + IntToStr(Form1.ComboBox1.dbItemID) );
    Value2 := SQLExecute(&#039;SELECT field2 FROM table WHERE id=&#039; + IntToStr(Form1.ComboBox1.dbItemID) );
    Value3 := SQLExecute(&#039;SELECT field3 FROM table WHERE id=&#039; + IntToStr(Form1.ComboBox1.dbItemID) );

    Form1.Edit1.Text := Value1;
    Form1.Edit2.Text := Value2;
    Form1.Edit3.Text := Value3;
end;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (DriveSoft)]]></author>
			<pubDate>Thu, 11 Sep 2014 19:14:30 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=2222#p2222</guid>
		</item>
		<item>
			<title><![CDATA[Can I run a sql query in a script]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=2221#p2221</link>
			<description><![CDATA[<p>for example:</p><p>in my form I want to do an onchange on a combobox<br />it should run a sql query on that table to get the whole row from the database into an array, then write those to the correct fields in the form. </p><p>I can set a variable and do math on it and then put the results in the fields already so I really just need to figure out how to get the database row that matches the value seleced in the combobox so I can get the values that I need to manipulate into the script.</p>]]></description>
			<author><![CDATA[null@example.com (timlitw)]]></author>
			<pubDate>Thu, 11 Sep 2014 19:07:47 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=2221#p2221</guid>
		</item>
	</channel>
</rss>
