<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title>www.ritlabs.com [Topic: How can TB macro access database data?]</title>
		<link>http://www.ritlabs.com</link>
		<description>New posts in How can TB macro access database data? of  forum at www.ritlabs.com [www.ritlabs.com]</description>
		<language>en</language>
		<docs>http://backend.userland.com/rss2</docs>
		<lastBuildDateTag>Fri, 22 Jul 2011 16:10:34 +0300</lastBuildDateTag>		<item>
			<title>How can TB macro access database data?</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic3725/message33834/">How can TB macro access database data?</a></b> <i>as title</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			<br />====quote====<br />luci excell wrote:<br />Hello,<br /><noindex><a href="http://szumi.one.pl/thebat/SQL/" target="_blank" rel="nofollow">http://szumi.one.pl/thebat/SQL/</a></noindex> is not Online anymore.. <br /><noindex><a href="http://nobat.ru" target="_blank" rel="nofollow">http://nobat.ru</a></noindex> too. From where i can find SQLPlugin.tbp &nbsp; <br /><br />please help ..<br />=============<br /><br />I've found this link:<br /><noindex><a href="http://www.findthatfile.com/search-338454-hRAR/winrar-winzip-download-sqlplugin01-rar.htm" target="_blank" rel="nofollow">http://www.findthatfile.com/search-338454-hRAR/winrar-winzip-download-sqlplugin01-rar.htm</a></noindex> <br />
			<i>22 July 2011 16:10:34, <a href="http://www.ritlabs.com/en/forums/">K_S</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic3725/message33834/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic3725/message33834/</guid>
			<pubDate>Fri, 22 Jul 2011 16:10:34 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>How can TB macro access database data?</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic3725/message33766/">How can TB macro access database data?</a></b> <i>as title</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			Hello,<br /><noindex><a href="http://szumi.one.pl/thebat/SQL/" target="_blank" rel="nofollow">http://szumi.one.pl/thebat/SQL/</a></noindex> is not Online anymore.. <br /><noindex><a href="http://nobat.ru" target="_blank" rel="nofollow">http://nobat.ru</a></noindex> too. From where i can find SQLPlugin.tbp <img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_sad.gif" border="0" data-code=":(" data-definition="SD" alt=":(" style="width:16px;height:16px;" title="" class="bx-smile" /> <br /><br />please help .. <br />
			<i>06 July 2011 21:18:39, <a href="http://www.ritlabs.com/en/forums/">luci excell</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic3725/message33766/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic3725/message33766/</guid>
			<pubDate>Wed, 06 Jul 2011 21:18:39 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>How can TB macro access database data?</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic3725/message19886/">How can TB macro access database data?</a></b> <i>as title</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			First, You must to install ODBC driver for your database (for MySql <noindex><a href="http://dev.mysql.com/downloads/connector/odbc/3.51.html" target="_blank" rel="nofollow">http://dev.mysql.com/downloads/connector/odbc/3.51.html</a></noindex>). Then You should use program %SystemRoot%\system32\odbcad32.exe (part of Microsoft Data Access Components) to quick and easy configuration of DNS to Your DB.<br /><br />Then create a quick template (for example named 'ini') with a macro<br />
====code====
<pre>
%SQLBuildConnectionString
</pre>
=============
<br />and run this template (create a new message, type <I>ini</I> and press ctrl+space). Now choose a 'Microsoft OLE DB Provider for ODBC Services'. With other databases You must to choose other method (for MS Access it's 'Microsoft.Jet.OLEDB.4.0').<br /><br />Now click on button 'Dalej' ('Next') and go to the <B>'Polaczenie'</B> ('Connection'):<br />1. 'Okresl źrуdło danych' ('characterize data source')<br />- 'uzyj nazwy źrуdła danych' - 'use the name of data source' (user DSN created in odbcad32.exe)<br />- 'uzyj ciagu polaczenia' – 'use the connection tring' - Button ‘Konstruuj’ (Construct): there You can choose or create 'File DSN' ('plikowe źrуdło danych') or 'Computer DSN', the best option is to use a odbcad32.exe to creating and then simply choosing what You want.<br /><br />2. 'Wprowadz informacje o logowaniu do serwera' ('input information about login')<br />- 'Nazwa uzytkownika' (username)<br />- 'Haslo' (password)<br />'Puste haslo' (empty password) 'Zezwalaj na zapisywanie hasla' (allow to save the password)<br /><br />3. 'Wprowadz poczatkowy katalog do uzycia' (input start directory for use).<br /><br />Button 'Testuj polaczenie' ('Test the connection'); use it <img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_smile.gif" border="0" data-code=":-)" data-definition="SD" alt=":-)" style="width:16px;height:16px;" title="" class="bx-smile" /><br /><br /><B>'Zaawansowane'</B> ('Advanced') - there are options:<br />'ustawienia sieciowe' ('network settings'): 'poziom personifikacji' ('personalize level') and 'poziom ochrony' ('protection level')<br /><br /><B>'Inne'</B> ('Others'): 'Limit czasu polaczenia' ('limit of a connection time'), 'uprawnienia dostepu' ('access rights')<br /><br /><B>'Wszystkie'</B> ('All'): there You can manually edit all settings.<br /><br />Click 'OK' and You will get a ‘connection string’: for example<br />
====code====
<pre>
Provider=MSDASQL.1;Persist Security Info=False;Data Source=The Bat test
</pre>
=============
<br />Copy this string somewhere, will be used in the next templates.<br /><br />Now You should have access to Your database. You have two macros:<br />
====code====
<pre>
%SQLQuery("ConnectionString", "SQL_Query")
</pre>
=============
<br />returns dataset in lines, with data divided by commas<br />
====code====
<pre>
%SQLCommand("SQL_Connection_String", "SQL_Command")
</pre>
=============
<br />returns nothing.<br /><br />for example<br />
====code====
<pre>
%_connstr="Provider=MSDASQL.1;Persist Security Info=False;Data Source=The Bat test"%-
%_query="SELECT * FROM mytable"%-
%SQLQuery(%_connstr, %_query)%-
</pre>
=============
<br /><br />If You have the connection and tested some templates (SELECT email FROM users WHERE email=’test@mail.com’ etc) You could start to create a machine for Your four points<br /><I>1. TB checks in DB by SQL if the e-mail is known.</I><br />%SQLQuery. Template in a filter? Template executed by script on Your server?<br /><I>2. If not send an e-mail with a link to the web form</I><br />Template could create mail for sending (/MAIL)<br /><I>3. Web form sends CSV or XML record</I><br /><I>4. TB adds record to the DB</I><br />Very complicated filter with giant template and macro %SQLCommand - hard, but possible.<br /><br />Sorry for my ungrammatic English <br />
			<i>21 October 2007 19:48:04, <a href="http://www.ritlabs.com/en/forums/">K_S</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic3725/message19886/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic3725/message19886/</guid>
			<pubDate>Sun, 21 Oct 2007 19:48:04 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>How can TB macro access database data?</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic3725/message19654/">How can TB macro access database data?</a></b> <i>as title</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			Hello K_S & List<br /><br />In the days of SPAM I want to write a program which connects to my local CRM DB and to a web form. <br /><br />1. TB checks in DB by SQL if the e-mail is known. <br />2. If not send an e-mail with a link to the web form<br />3. Web form sends CSV or XML record <br />4. TB adds record to the DB<br /><br /><br />So <noindex><a href="http://szumi.one.pl/theba­t/SQL/" target="_blank" rel="nofollow">http://szumi.one.pl/theba­t/SQL/</a></noindex> sounds very helpfull. <br /><br />Any experiences, English manual? Thanks for some input. <br />
			<i>05 October 2007 16:23:49, <a href="http://www.ritlabs.com/en/forums/">Christian Hauser</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic3725/message19654/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic3725/message19654/</guid>
			<pubDate>Fri, 05 Oct 2007 16:23:49 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>How can TB macro access database data?</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic3725/message14471/">How can TB macro access database data?</a></b> <i>as title</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			<br />====quote====<br />cy cheung writes:<br />Can TB do it? Write a reply macro that extract incoming email data and use it to access database server(such as Mysql) to extract data information? Then the result return back to TB to complete the reply mail?<br />=============<br /><br />Perhaps SQL-plugin <noindex><a href="http://szumi.one.pl/thebat/SQL/" target="_blank" rel="nofollow">http://szumi.one.pl/thebat/SQL/</a></noindex> will help You. <br />
			<i>29 October 2006 14:33:10, <a href="http://www.ritlabs.com/en/forums/">K_S</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic3725/message14471/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic3725/message14471/</guid>
			<pubDate>Sun, 29 Oct 2006 14:33:10 +0200</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>How can TB macro access database data?</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic3725/message14462/">How can TB macro access database data?</a></b> <i>as title</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			Thank you your valuable reply. &nbsp;I will try it! <img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_redface.gif" border="0" data-code=":oops:" data-definition="SD" alt=":oops:" style="width:16px;height:16px;" title="" class="bx-smile" /> &nbsp; <br />
			<i>28 October 2006 06:16:29, <a href="http://www.ritlabs.com/en/forums/">cy cheung</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic3725/message14462/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic3725/message14462/</guid>
			<pubDate>Sat, 28 Oct 2006 06:16:29 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>How can TB macro access database data?</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic3725/message14455/">How can TB macro access database data?</a></b> <i>as title</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			AFAIK TB can't access database servers, nor are there any capable plugins available that I know of.<br /><br />However when you've got a command line driven tool that 's able to access your database and to place the output in a file, it's possible to make TB start it from a filter and place the output in a reply. <br />
			<i>27 October 2006 19:27:17, <a href="http://www.ritlabs.com/en/forums/">Roelof Otten</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic3725/message14455/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic3725/message14455/</guid>
			<pubDate>Fri, 27 Oct 2006 19:27:17 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>How can TB macro access database data?</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic3725/message14453/">How can TB macro access database data?</a></b> <i>as title</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			&nbsp; Can TB do it? &nbsp;Write a reply macro that extract incoming email data and use it to access database server(such as Mysql) to extract data information? &nbsp;Then the result return back to TB to complete the reply mail?<br /><br />e.g. Passing eBay item number 8246789415 as parameter in order to connect database server to extract the date of the item shipped? &nbsp;e.g. It returns "10/21/2006" back to the reply mail content.<br /><br />If it can't, any third party Plug-in program can do it? &nbsp;Thank you your help!<br /> <br />
			<i>27 October 2006 18:29:49, <a href="http://www.ritlabs.com/en/forums/">cy cheung</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic3725/message14453/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic3725/message14453/</guid>
			<pubDate>Fri, 27 Oct 2006 18:29:49 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
	</channel>
</rss>
