<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for Martin&#039;s MYSQL Blog</title>
	<atom:link href="http://pirringers.com/mysqlblog/?feed=comments-rss2" rel="self" type="application/rss+xml" />
	<link>http://pirringers.com/mysqlblog</link>
	<description>VFP -&#62; MYSQL migration</description>
	<lastBuildDate>Thu, 17 Nov 2011 14:57:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Transferring VFP Table Structures to MYSQL by Rainer R. Greim</title>
		<link>http://pirringers.com/mysqlblog/?p=17&#038;cpage=1#comment-602</link>
		<dc:creator>Rainer R. Greim</dc:creator>
		<pubDate>Thu, 17 Nov 2011 14:57:28 +0000</pubDate>
		<guid isPermaLink="false">http://pirringers.com/mysqlblog/?p=17#comment-602</guid>
		<description>Hi Martin,
great postings thx for that.
Im also migrating my vfp container to other backends. And I was searching and trying tools for that.
But there is a easier way.

Get a Omnis 5 Standard Edition for MySQL ( http://www.Tigerlogic.com)
Get the ODBC-driver for FoxpPro
Setup a ODBC-DSN for your Foxpro db
Start Omnis and setup 2 sessions in the session manager
Session 1: odbc to the vfp dsn
Session 2: to the Mysql db via MySQL Dam see also : http://www.tigerlogic.com/tigerlogic/omnis/technotes/tnsq0012.jsp
Then open both sessions
Now drag the vfp tables to the MySql session and do some finetuning
Example memo fields shout be varchar, byte a...
Index on deleted will not run, delete...


RRG
http://www.greimconsulting.de/node/116</description>
		<content:encoded><![CDATA[<p>Hi Martin,<br />
great postings thx for that.<br />
Im also migrating my vfp container to other backends. And I was searching and trying tools for that.<br />
But there is a easier way.</p>
<p>Get a Omnis 5 Standard Edition for MySQL ( <a href="http://www.Tigerlogic.com)" rel="nofollow">http://www.Tigerlogic.com)</a><br />
Get the ODBC-driver for FoxpPro<br />
Setup a ODBC-DSN for your Foxpro db<br />
Start Omnis and setup 2 sessions in the session manager<br />
Session 1: odbc to the vfp dsn<br />
Session 2: to the Mysql db via MySQL Dam see also : <a href="http://www.tigerlogic.com/tigerlogic/omnis/technotes/tnsq0012.jsp" rel="nofollow">http://www.tigerlogic.com/tigerlogic/omnis/technotes/tnsq0012.jsp</a><br />
Then open both sessions<br />
Now drag the vfp tables to the MySql session and do some finetuning<br />
Example memo fields shout be varchar, byte a&#8230;<br />
Index on deleted will not run, delete&#8230;</p>
<p>RRG<br />
<a href="http://www.greimconsulting.de/node/116" rel="nofollow">http://www.greimconsulting.de/node/116</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Converting and optimizing SQL Statements by George</title>
		<link>http://pirringers.com/mysqlblog/?p=32&#038;cpage=1#comment-595</link>
		<dc:creator>George</dc:creator>
		<pubDate>Mon, 07 Nov 2011 09:18:30 +0000</pubDate>
		<guid isPermaLink="false">http://pirringers.com/mysqlblog/?p=32#comment-595</guid>
		<description>Why is this query giving a error message ? 

select 1 where exists (select * from tablename where condition) 

If I use 
select 1 From table name1 where exists(select * from tablename2 where condition) 
IT&#039;S WORKING but this doesn&#039;t help. 

I don&#039;t want a FROM in the first part of the query because I&#039;m importing these from VFP where they are accepted and it&#039;s impossible to change them all. 

I&#039;m using ANSI mode. Could this be the problem ? 

Thanks.</description>
		<content:encoded><![CDATA[<p>Why is this query giving a error message ? </p>
<p>select 1 where exists (select * from tablename where condition) </p>
<p>If I use<br />
select 1 From table name1 where exists(select * from tablename2 where condition)<br />
IT&#8217;S WORKING but this doesn&#8217;t help. </p>
<p>I don&#8217;t want a FROM in the first part of the query because I&#8217;m importing these from VFP where they are accepted and it&#8217;s impossible to change them all. </p>
<p>I&#8217;m using ANSI mode. Could this be the problem ? </p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using MYSQL to maintain the VFP frontend. by Susana</title>
		<link>http://pirringers.com/mysqlblog/?p=59&#038;cpage=1#comment-328</link>
		<dc:creator>Susana</dc:creator>
		<pubDate>Wed, 06 Oct 2010 23:33:38 +0000</pubDate>
		<guid isPermaLink="false">http://pirringers.com/mysqlblog/?p=59#comment-328</guid>
		<description>I have 4 connections created from a class as objects. Every connection open a database. My problem is the fact that I lost connection to one server for some reason, which I have no idea what it is. It could be working fine for days and then I had a lot of problems for the lost connection. I read in some pages about it and I found it was the error 1466. I read that I can test the connection so I used:

        oException = SQLGETPROP(lnHandleGeneral, &quot;Asynchronous&quot;)
        oException = SQLSETPROP(lnHandleGeneral, &quot;Datasource&quot;)  

But I that creates me more errors and I can&#039;t force the connection again... What should I do?</description>
		<content:encoded><![CDATA[<p>I have 4 connections created from a class as objects. Every connection open a database. My problem is the fact that I lost connection to one server for some reason, which I have no idea what it is. It could be working fine for days and then I had a lot of problems for the lost connection. I read in some pages about it and I found it was the error 1466. I read that I can test the connection so I used:</p>
<p>        oException = SQLGETPROP(lnHandleGeneral, &#8220;Asynchronous&#8221;)<br />
        oException = SQLSETPROP(lnHandleGeneral, &#8220;Datasource&#8221;)  </p>
<p>But I that creates me more errors and I can&#8217;t force the connection again&#8230; What should I do?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on First Contact &#8211; VFP/MYSQL interaction by Raymond L.</title>
		<link>http://pirringers.com/mysqlblog/?p=11&#038;cpage=1#comment-327</link>
		<dc:creator>Raymond L.</dc:creator>
		<pubDate>Sat, 02 Oct 2010 05:02:56 +0000</pubDate>
		<guid isPermaLink="false">http://pirringers.com/mysqlblog/?p=11#comment-327</guid>
		<description>Looks like the error checking function&#039;s code above got mangled.  Basically, check value returned by SQLSTRINGCONNECT.  If less than 1, there&#039;s an error.  Use AERROR() function to retrieve an array that includes error details.  Look up AERROR in VFP&#039;s help file for some guidance there if you need it.  Once you have that information you can pass it on to the user, and exit.</description>
		<content:encoded><![CDATA[<p>Looks like the error checking function&#8217;s code above got mangled.  Basically, check value returned by SQLSTRINGCONNECT.  If less than 1, there&#8217;s an error.  Use AERROR() function to retrieve an array that includes error details.  Look up AERROR in VFP&#8217;s help file for some guidance there if you need it.  Once you have that information you can pass it on to the user, and exit.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on First Contact &#8211; VFP/MYSQL interaction by Raymond L.</title>
		<link>http://pirringers.com/mysqlblog/?p=11&#038;cpage=1#comment-326</link>
		<dc:creator>Raymond L.</dc:creator>
		<pubDate>Sat, 02 Oct 2010 04:57:28 +0000</pubDate>
		<guid isPermaLink="false">http://pirringers.com/mysqlblog/?p=11#comment-326</guid>
		<description>I was fumbling with this myself, and found excellent information about the various ODBC command options you can use with MySQL here:
http://dev.mysql.com/doc/refman/5.0/en/connector-odbc-configuration-connection-parameters.html

You can use DSN-less connections by setting up and storing a connection string such as:
m.cConnStr = &quot;Driver={MySQL ODBC 5.1 Driver};Server=www.yourserver.com;Port=3306;Database=yourdatabase;User=yourmysqluser;Password=yourmysqlpassword;Option=67108864&quot;

and the last parameter, &quot;Option&quot; you would set to a number that is the sum of the values of each option you want to enable (enumerated on the above link).

Once you have your SQL connection string correct and including the options you want, simply pass that connection string to VFP&#039;s SQLSTRINGCONNECT function like so:
m.iMySQL = SQLSTRINGCONNECT(m.cConnStr,.t.)

As long as the value returned by SQLSTRINGCONNECT is greater than 0, you are successful, and can use that return value as your &quot;connection handle&quot; for subsequent interactions w/MySQL in your VFP program.  If you get a return value of 0 (or less?), you should retrieve the error message.  I do it like this:

m.iMySQL = SQLSTRINGCONNECT(m.cConnStr,.t.)
IF m.iMySQL  0
		m.iErrorNo = aSQLError[1,1]
		m.cErrorMsg = aSQLError[1,3]
		MESSAGEBOX(&quot;SQL Error #&quot; + ALLTRIM(STR(m.iErrorNo)) + &quot;:&quot; + CHR(13) + CHR(10) + CHR(13)+CHR(10) + m.cErrorMsg, 16, &#039;SQL Error&#039;)
	ENDIF
	RETURN (m.iCnt &gt; 0)
ENDFUNC</description>
		<content:encoded><![CDATA[<p>I was fumbling with this myself, and found excellent information about the various ODBC command options you can use with MySQL here:<br />
<a href="http://dev.mysql.com/doc/refman/5.0/en/connector-odbc-configuration-connection-parameters.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.0/en/connector-odbc-configuration-connection-parameters.html</a></p>
<p>You can use DSN-less connections by setting up and storing a connection string such as:<br />
m.cConnStr = &#8220;Driver={MySQL ODBC 5.1 Driver};Server=www.yourserver.com;Port=3306;Database=yourdatabase;User=yourmysqluser;Password=yourmysqlpassword;Option=67108864&#8243;</p>
<p>and the last parameter, &#8220;Option&#8221; you would set to a number that is the sum of the values of each option you want to enable (enumerated on the above link).</p>
<p>Once you have your SQL connection string correct and including the options you want, simply pass that connection string to VFP&#8217;s SQLSTRINGCONNECT function like so:<br />
m.iMySQL = SQLSTRINGCONNECT(m.cConnStr,.t.)</p>
<p>As long as the value returned by SQLSTRINGCONNECT is greater than 0, you are successful, and can use that return value as your &#8220;connection handle&#8221; for subsequent interactions w/MySQL in your VFP program.  If you get a return value of 0 (or less?), you should retrieve the error message.  I do it like this:</p>
<p>m.iMySQL = SQLSTRINGCONNECT(m.cConnStr,.t.)<br />
IF m.iMySQL  0<br />
		m.iErrorNo = aSQLError[1,1]<br />
		m.cErrorMsg = aSQLError[1,3]<br />
		MESSAGEBOX(&#8220;SQL Error #&#8221; + ALLTRIM(STR(m.iErrorNo)) + &#8220;:&#8221; + CHR(13) + CHR(10) + CHR(13)+CHR(10) + m.cErrorMsg, 16, &#8216;SQL Error&#8217;)<br />
	ENDIF<br />
	RETURN (m.iCnt &gt; 0)<br />
ENDFUNC</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Outgrowing Visual Foxpro by admin</title>
		<link>http://pirringers.com/mysqlblog/?p=3&#038;cpage=1#comment-323</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 20 Aug 2010 13:05:12 +0000</pubDate>
		<guid isPermaLink="false">http://pirringers.com/mysqlblog/?p=3#comment-323</guid>
		<description>if you use sqlexec or sqlprepare you are limited to 256 characters. To work around it put the statement into a string first likes

sql = &quot;Update ....&quot;
Sqlprepare(test, sql) 

etc</description>
		<content:encoded><![CDATA[<p>if you use sqlexec or sqlprepare you are limited to 256 characters. To work around it put the statement into a string first likes</p>
<p>sql = &#8220;Update &#8230;.&#8221;<br />
Sqlprepare(test, sql) </p>
<p>etc</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Outgrowing Visual Foxpro by jmason</title>
		<link>http://pirringers.com/mysqlblog/?p=3&#038;cpage=1#comment-314</link>
		<dc:creator>jmason</dc:creator>
		<pubDate>Wed, 26 May 2010 19:12:44 +0000</pubDate>
		<guid isPermaLink="false">http://pirringers.com/mysqlblog/?p=3#comment-314</guid>
		<description>Admin (large state agency) created new policy that all would use only MS Office for all tasks.  No more FoxPro!
I explained that all the systems I had written would not translate to ACCESS.
No matter, they said:  just rewrite everything.
I said, &quot;You dumb bastards rewrite it all, if you ever learn to write.&quot;  Then went to another agency offering 50% better pay to do less analysis.
They sent some chump over 6 months later to get my help on a massive yearly report... I LAUGHED for a WHILE.</description>
		<content:encoded><![CDATA[<p>Admin (large state agency) created new policy that all would use only MS Office for all tasks.  No more FoxPro!<br />
I explained that all the systems I had written would not translate to ACCESS.<br />
No matter, they said:  just rewrite everything.<br />
I said, &#8220;You dumb bastards rewrite it all, if you ever learn to write.&#8221;  Then went to another agency offering 50% better pay to do less analysis.<br />
They sent some chump over 6 months later to get my help on a massive yearly report&#8230; I LAUGHED for a WHILE.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Outgrowing Visual Foxpro by admin</title>
		<link>http://pirringers.com/mysqlblog/?p=3&#038;cpage=1#comment-310</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 11 May 2010 10:49:31 +0000</pubDate>
		<guid isPermaLink="false">http://pirringers.com/mysqlblog/?p=3#comment-310</guid>
		<description>Difficult to say w/o seeing the rest

try
 	= AERROR(la_err)

And then examinge the arra - it should give you a better answer on what the error is. Could be as simple as a mismatched variable.

I do not use sqlprepare. I use straight passthrough. That Way I can better control the SQL.</description>
		<content:encoded><![CDATA[<p>Difficult to say w/o seeing the rest</p>
<p>try<br />
 	= AERROR(la_err)</p>
<p>And then examinge the arra &#8211; it should give you a better answer on what the error is. Could be as simple as a mismatched variable.</p>
<p>I do not use sqlprepare. I use straight passthrough. That Way I can better control the SQL.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Outgrowing Visual Foxpro by hansem</title>
		<link>http://pirringers.com/mysqlblog/?p=3&#038;cpage=1#comment-309</link>
		<dc:creator>hansem</dc:creator>
		<pubDate>Tue, 11 May 2010 03:12:37 +0000</pubDate>
		<guid isPermaLink="false">http://pirringers.com/mysqlblog/?p=3#comment-309</guid>
		<description>if I used foxpro database there&#039;re no limit column when I save the records more than 50 column but if I used mysql server to save from foxpro there are limit column and then show warning &quot;command contain unrecognized phrase/keyword&quot; like code below :
 		SQLEXEC(test,&quot;LOCK TABLE LocalOnLine.vouchers WRITE&quot;)
		SQLPREPARE(test,&quot;UPDATE LocalOnLine.vouchers SET division=?v_dv,agent=?v_ag,guide=?v_gd,invoice=?v_iv,month=?v_mt,years=?v_yr,voucher=?v_vc,;	bill=?v_vl,cgroup=?v_gr,client=?v_cl,client1=?v_c1,client2=?v_c2,remarks=?v_rk WHERE month=?v_mt and years=?v_yr and voucher=?v_vc and totalrp+totalus&gt;0&quot;)
		server=SQLEXEC(test)
		SQLEXEC(test,&quot;UNLOCK TABLE&quot;)
		
		IF server&lt;0
			MESSAGEBOX(&#039;Update voucher &#039;+v_vc+&#039; &#039;+v_vd+&#039; &#039;+ALLTRIM(v_nm)+&#039; failed&#039;,16,&#039;Warning&#039;)
		ENDIF

what wrong with my code above and there are limit column to save from foxpro to mysql server ?

please help me, what can I do to resolve that trouble.</description>
		<content:encoded><![CDATA[<p>if I used foxpro database there&#8217;re no limit column when I save the records more than 50 column but if I used mysql server to save from foxpro there are limit column and then show warning &#8220;command contain unrecognized phrase/keyword&#8221; like code below :<br />
 		SQLEXEC(test,&#8221;LOCK TABLE LocalOnLine.vouchers WRITE&#8221;)<br />
		SQLPREPARE(test,&#8221;UPDATE LocalOnLine.vouchers SET division=?v_dv,agent=?v_ag,guide=?v_gd,invoice=?v_iv,month=?v_mt,years=?v_yr,voucher=?v_vc,;	bill=?v_vl,cgroup=?v_gr,client=?v_cl,client1=?v_c1,client2=?v_c2,remarks=?v_rk WHERE month=?v_mt and years=?v_yr and voucher=?v_vc and totalrp+totalus&gt;0&#8243;)<br />
		server=SQLEXEC(test)<br />
		SQLEXEC(test,&#8221;UNLOCK TABLE&#8221;)</p>
<p>		IF server&lt;0<br />
			MESSAGEBOX(&#039;Update voucher &#039;+v_vc+&#039; &#039;+v_vd+&#039; &#039;+ALLTRIM(v_nm)+&#039; failed&#039;,16,&#039;Warning&#039;)<br />
		ENDIF</p>
<p>what wrong with my code above and there are limit column to save from foxpro to mysql server ?</p>
<p>please help me, what can I do to resolve that trouble.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Transferring VFP Table Structures to MYSQL by Elvir</title>
		<link>http://pirringers.com/mysqlblog/?p=17&#038;cpage=1#comment-308</link>
		<dc:creator>Elvir</dc:creator>
		<pubDate>Sat, 08 May 2010 10:07:25 +0000</pubDate>
		<guid isPermaLink="false">http://pirringers.com/mysqlblog/?p=17#comment-308</guid>
		<description>Good article. I like this . In meantime I did similar app in order to solve this transition. Keep posting.</description>
		<content:encoded><![CDATA[<p>Good article. I like this . In meantime I did similar app in order to solve this transition. Keep posting.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

