<?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 — Inserting file paths into a mySQL table]]></title>
		<link>https://myvisualdatabase.com/forum/viewtopic.php?id=7279</link>
		<atom:link href="https://myvisualdatabase.com/forum/extern.php?action=feed&amp;tid=7279&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Inserting file paths into a mySQL table.]]></description>
		<lastBuildDate>Sun, 17 Jan 2021 01:21:56 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Inserting file paths into a mySQL table]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=39764#p39764</link>
			<description><![CDATA[<p>I&#039;m playing around converting my SQLite database into a mySQL one.</p><p>I&#039;ve hit a problem where in SQLite I store the file path to some text documents in a field, to be recovered later in a tablegrid and then can be double clicked to pen the document. This works.</p><br /><p>However, mySql strips the back slashes from the text (probably because \ is a reserved character in mySql).</p><p>I assume I&#039;m going to have to use&nbsp; ReplaceStr(filePath, \, <img src="https://myvisualdatabase.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /> along with code&nbsp; &nbsp;along the lines of </p><br /><div class="codebox"><pre><code>var

fPath : string;
delimPath : string
begin
     fPath:=ExtractFilePath(ArrayOfFiles[0]);
     fPath:= fPath + ExtractFileName(ArrayOfFiles[0]);
     
     frmAddDatasheet.DBFile1.dbFileName := ReplaceStr(fPath, &#039;\&#039;,&#039;:&#039;);
end;</code></pre></div><p>My main question is, will using Save Record set to DBFile1&nbsp; contain the altered path, and when loading the tablegrid&nbsp; how do I intercept the value in the field - would I use a calculated field and use the REPLACE statement or somehow perhaps combine ReplaceString with a dbSQL statement?</p><br /><p>Has anyone needed to do this with a mySQL/Maria database already?</p><p>I should mention, I&#039;ve tried using a stored procedure in the DB, but I&#039;m not sure how to call it from within MVD and while it works in mySQL Workbench to store the the file path, I&#039;m unsure how to persuade MySQl to perform the opposite function.</p>]]></description>
			<author><![CDATA[null@example.com (CDB)]]></author>
			<pubDate>Sun, 17 Jan 2021 01:21:56 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=39764#p39764</guid>
		</item>
	</channel>
</rss>
