<?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 on: ASP: Look up / translation script</title>
	<atom:link href="http://www.scriptygoddess.com/archives/2004/11/10/asp-look-up-translation-script/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scriptygoddess.com/archives/2004/11/10/asp-look-up-translation-script/</link>
	<description></description>
	<lastBuildDate>Wed, 01 Sep 2010 23:07:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Jennifer</title>
		<link>http://www.scriptygoddess.com/archives/2004/11/10/asp-look-up-translation-script/comment-page-1/#comment-13527</link>
		<dc:creator>Jennifer</dc:creator>
		<pubDate>Mon, 06 Dec 2004 14:13:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2004/11/10/asp-look-up-translation-script/#comment-13527</guid>
		<description>(note to self - and others dealing with this issue too) With some additional help from Marcus, I was able to get it to select specific columns - as well as fix some continuing issues with the fields being cast as numbers - when I needed it cast as a string (leading zeros get stripped when it casts the field as a number)

The trick was creating a Schema.ini file in the same directory as the csv file. There I could set the column names (and call those column names from my asp file) as well as set the length and type of the fields. &lt;a href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcjetschema_ini_file.asp&quot;&gt;More info on Schema.ini files here.&lt;/a&gt;

Thank you Marcus!!!!</description>
		<content:encoded><![CDATA[<p>(note to self &#8211; and others dealing with this issue too) With some additional help from Marcus, I was able to get it to select specific columns &#8211; as well as fix some continuing issues with the fields being cast as numbers &#8211; when I needed it cast as a string (leading zeros get stripped when it casts the field as a number)</p>
<p>The trick was creating a Schema.ini file in the same directory as the csv file. There I could set the column names (and call those column names from my asp file) as well as set the length and type of the fields. <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcjetschema_ini_file.asp">More info on Schema.ini files here.</a></p>
<p>Thank you Marcus!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jennifer</title>
		<link>http://www.scriptygoddess.com/archives/2004/11/10/asp-look-up-translation-script/comment-page-1/#comment-13311</link>
		<dc:creator>Jennifer</dc:creator>
		<pubDate>Tue, 16 Nov 2004 20:11:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2004/11/10/asp-look-up-translation-script/#comment-13311</guid>
		<description>I still couldn&#039;t get it to select a specific row based on a &quot;WHERE x=y&quot;... I ended up using a simpler connection script I found &lt;a href=&quot;http://www.eggheadcafe.com/articles/20020108.asp&quot;&gt;here&lt;/a&gt;

and then, instead of spitting out all the data - I just did

if rs(3) = &quot;243&quot; then
(PRINT THE LINE...)
end if

And actually, ran into some complications because the data in the rs(x) was assumed to be a number, and I was comparing it to a (number-)string. So in order to &quot;convert&quot; the rs(x) into a STRING, I had to do this:

Dim strNum
strNum = rs(3) &amp; &quot;&quot;

then I could do this:

if strNum = &quot;1234&quot; then
(PRINT LINE)
end if

Probably not terrible efficient technically - but thankfully the csv isn&#039;t terribly huge, so iterating through each line doesn&#039;t take more than a blink of an eye. :)</description>
		<content:encoded><![CDATA[<p>I still couldn&#039;t get it to select a specific row based on a &#034;WHERE x=y&#034;&#8230; I ended up using a simpler connection script I found <a href="http://www.eggheadcafe.com/articles/20020108.asp">here</a></p>
<p>and then, instead of spitting out all the data &#8211; I just did</p>
<p>if rs(3) = &#034;243&#034; then<br />
(PRINT THE LINE&#8230;)<br />
end if</p>
<p>And actually, ran into some complications because the data in the rs(x) was assumed to be a number, and I was comparing it to a (number-)string. So in order to &#034;convert&#034; the rs(x) into a STRING, I had to do this:</p>
<p>Dim strNum<br />
strNum = rs(3) &amp; &#034;&#034;</p>
<p>then I could do this:</p>
<p>if strNum = &#034;1234&#034; then<br />
(PRINT LINE)<br />
end if</p>
<p>Probably not terrible efficient technically &#8211; but thankfully the csv isn&#039;t terribly huge, so iterating through each line doesn&#039;t take more than a blink of an eye. <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcus</title>
		<link>http://www.scriptygoddess.com/archives/2004/11/10/asp-look-up-translation-script/comment-page-1/#comment-13294</link>
		<dc:creator>Marcus</dc:creator>
		<pubDate>Sat, 13 Nov 2004 20:17:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2004/11/10/asp-look-up-translation-script/#comment-13294</guid>
		<description>I re-sent the email. There&#039;s also an article &lt;a href=&quot;http://www.devarticles.com/index2.php?option=content&amp;task=view&amp;id=705&amp;pop=1&amp;page=0&amp;hide_js=1&quot;&gt;here&lt;/a&gt;. Even though that one&#039;s for Java, the text driver stuff is the same.</description>
		<content:encoded><![CDATA[<p>I re-sent the email. There&#039;s also an article <a href="http://www.devarticles.com/index2.php?option=content&#038;task=view&#038;id=705&#038;pop=1&#038;page=0&#038;hide_js=1">here</a>. Even though that one&#039;s for Java, the text driver stuff is the same.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jennifer</title>
		<link>http://www.scriptygoddess.com/archives/2004/11/10/asp-look-up-translation-script/comment-page-1/#comment-13290</link>
		<dc:creator>Jennifer</dc:creator>
		<pubDate>Fri, 12 Nov 2004 20:59:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2004/11/10/asp-look-up-translation-script/#comment-13290</guid>
		<description>Marcus - no I didn&#039;t get your email. :( I couldn&#039;t get this to work - because the only thing I was able to do was SELECT * from csvfile.csv ... I couldn&#039;t seem to get it to select a single row of data using a &quot;WHERE field = &#039;value&#039;&quot;... it just didn&#039;t seem to recognize the field names... If you know of a way to do that - PLEASE email me!!! :D
scripty at scriptygoddess dot com</description>
		<content:encoded><![CDATA[<p>Marcus &#8211; no I didn&#039;t get your email. <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  I couldn&#039;t get this to work &#8211; because the only thing I was able to do was SELECT * from csvfile.csv &#8230; I couldn&#039;t seem to get it to select a single row of data using a &#034;WHERE field = &#039;value&#039;&#034;&#8230; it just didn&#039;t seem to recognize the field names&#8230; If you know of a way to do that &#8211; PLEASE email me!!! <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
scripty at scriptygoddess dot com</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcus</title>
		<link>http://www.scriptygoddess.com/archives/2004/11/10/asp-look-up-translation-script/comment-page-1/#comment-13289</link>
		<dc:creator>Marcus</dc:creator>
		<pubDate>Fri, 12 Nov 2004 20:33:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2004/11/10/asp-look-up-translation-script/#comment-13289</guid>
		<description>Just inquiring whether you got my email reply and if the Text Driver query method worked for ya.</description>
		<content:encoded><![CDATA[<p>Just inquiring whether you got my email reply and if the Text Driver query method worked for ya.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcus</title>
		<link>http://www.scriptygoddess.com/archives/2004/11/10/asp-look-up-translation-script/comment-page-1/#comment-13279</link>
		<dc:creator>Marcus</dc:creator>
		<pubDate>Wed, 10 Nov 2004 16:10:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2004/11/10/asp-look-up-translation-script/#comment-13279</guid>
		<description>Depending on how long the lookup list is going to be, you could always save the excel file in a CSV format and use ADODB and the text driver (&quot;Driver={Microsoft Text Driver (*.txt; *.csv)}&quot;) and even run a normal sql query on it. I.e. &quot;SELECT thetext, thenumber FROM lookupfile.csv WHERE thetext = &#039;text_you_entered&#039;&quot;. I used this for a few simple web sites where clients wanted to display their inventory and update it with ease. They just upload a new CSV file to the web server.</description>
		<content:encoded><![CDATA[<p>Depending on how long the lookup list is going to be, you could always save the excel file in a CSV format and use ADODB and the text driver (&#034;Driver={Microsoft Text Driver (*.txt; *.csv)}&#034;) and even run a normal sql query on it. I.e. &#034;SELECT thetext, thenumber FROM lookupfile.csv WHERE thetext = &#039;text_you_entered&#039;&#034;. I used this for a few simple web sites where clients wanted to display their inventory and update it with ease. They just upload a new CSV file to the web server.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.350 seconds -->
