<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Yes Walter I will when I get a chance.</span></div><div><span></span>&nbsp;</div><div><span>Mondays are bad because of payroll and production meetings.</span></div><div><span></span>&nbsp;</div><div><span>Probably tomorrow.</span></div><div><span></span>&nbsp;</div><div><span>Rick</span></div><div><span></span>&nbsp;</div><div><br></div>  <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <div style="margin: 5px 0px; padding: 0px; border: 1px solid rgb(204, 204, 204); height: 0px; line-height: 0; font-size: 0px;" class="hr" contentEditable="false" readonly="true"></div>  <font size="2" face="Arial"> <b><span style="font-weight: bold;">From:</span></b> Walter D Vaughan Jr
 &lt;wvaughan@steelerubber.com&gt;<br> <b><span style="font-weight: bold;">To:</span></b> filePro Mailing List &lt;filepro-list@lists.celestial.com&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Monday, April 15, 2013 12:43 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> RE: Sample fpODBC process<br> </font> </div> <div class="y_msg_container"><br>
&gt; -----Original Message-----<br>&gt; From: filepro-list-bounces+wvaughan=<a href="mailto:steelerubber.com@lists.celestial.com" ymailto="mailto:steelerubber.com@lists.celestial.com">steelerubber.com@lists.celestial.com</a><br>&gt; [mailto:filepro-list-<br>&gt; bounces+wvaughan=<a href="mailto:steelerubber.com@lists.celestial.com" ymailto="mailto:steelerubber.com@lists.celestial.com">steelerubber.com@lists.celestial.com</a>] On Behalf Of<br>&gt; Richard Hane<br>&gt; Sent: Monday, April 15, 2013 1:31 PM<br>&gt; To: Jay Ashworth<br>&gt; Cc: file Pro Mailing List<br>&gt; Subject: Re: Sample fpODBC process<br>&gt; <br>&gt; Jay,<br>&gt; <br>&gt; I have attached the prc process called getbom.prc<br><br>[Walter D Vaughan Jr] <br>Can you attach it in ASCII encoded .prc or did the scrubbing kill it?<br><br><br>&gt; <br>&gt; Just create a 1 field file called ctrl.&nbsp; Field is 1,*<br>&gt; <br>&gt; Hope this helps.<br>&gt; <br>&gt; Rick<br>&gt; <br>&gt; <br>&gt;
 <br>&gt; ________________________________<br>&gt;&nbsp; From: Jay Ashworth &lt;<a href="mailto:jra@baylink.com" ymailto="mailto:jra@baylink.com">jra@baylink.com</a>&gt;<br>&gt; To: Richard Hane &lt;<a href="mailto:yoresoft@sbcglobal.net" ymailto="mailto:yoresoft@sbcglobal.net">yoresoft@sbcglobal.net</a>&gt;<br>&gt; Sent: Sunday, April 14, 2013 10:55 PM<br>&gt; Subject: Re: Sample fpODBC process<br>&gt; <br>&gt; <br>&gt; Any chance you could repost that, and just include the source code<br>&gt; file (the raw file with colon separators) that people could use/edit<br>&gt; without having to rekey it all? :-)<br>&gt; <br>&gt; ----- Original Message -----<br>&gt; &gt; From: "Richard Hane" &lt;<a href="mailto:yoresoft@sbcglobal.net" ymailto="mailto:yoresoft@sbcglobal.net">yoresoft@sbcglobal.net</a>&gt;<br>&gt; &gt; To: "file Pro Mailing List" &lt;<a href="mailto:filepro-list@lists.celestial.com"
 ymailto="mailto:filepro-list@lists.celestial.com">filepro-list@lists.celestial.com</a>&gt;<br>&gt; &gt; Sent: Saturday, April 13, 2013 9:55:01 AM<br>&gt; &gt; Subject: Sample fpODBC process<br>&gt; &gt; To all those who requested that I post a sample of my ODBC processing,<br>&gt; &gt; here it is.<br>&gt; &gt;<br>&gt; &gt; Couple of things to note:<br>&gt; &gt; 1. I run all my processing from a 1 field 1 file called 'ctrl'.<br>&gt; &gt; 2. This sample as well as all of my ODBC processing is using the 'Low<br>&gt; &gt; Level' method.<br>&gt; &gt; 3. I am reading data from a program written in MS SQL Server. I write<br>&gt; &gt; nothing to the SQL database.<br>&gt; &gt; 4. If have set up my odbc data source as 'DSN=fp-sqlserver'. This is<br>&gt; &gt; set up as a 'user' not a 'system' data source as I want to limit who<br>&gt; &gt; can use it. The choice is yours. A word of caution here. If you are<br>&gt; &gt; working on a workstation that is Windows 7
 but running under a virtual<br>&gt; &gt; XP mode (like I do) make sure you set up the 'user' data source under<br>&gt; &gt; the XP mode NOT the Win7 mode.<br>&gt; &gt; 5. In the processing below the SQL table is called 'PST' and I am<br>&gt; &gt; writing to a filepro file called 'BOM'. As you may guess this copies<br>&gt; &gt; the full Bill Of Material file from PST to BOM. 78K records in less<br>&gt; &gt; than a minute.<br>&gt; &gt;<br>&gt; &gt; Finally, this is a simple 1 SQL table to 1 fp file with a rather<br>&gt; &gt; simple Where condition.<br>&gt; &gt;<br>&gt; &gt; I wanted to post one I am working on now which is a complex 3 table, 3<br>&gt; &gt; INNER JOIN with heavy 3 statement Where condition. However, I am<br>&gt; &gt; having some real problems in how filePro handle INNER JOINS and<br>&gt; &gt; multiple tables. I just don't get the 'AS' 'FROM' filePro statement I<br>&gt; &gt; found in the help files. I will be sending this to the list
 and<br>&gt; &gt; fpsupport to see if they can set me straight.<br>&gt; &gt;<br>&gt; &gt; So far I have written 7 processes like the one below. Once you get the<br>&gt; &gt; format and structure it is simple and the processing speed fast.<br>&gt; &gt;<br>&gt; &gt; With all that said here is the table. I'll answer any questions you<br>&gt; &gt; may have.<br>&gt; &gt;<br>&gt; &gt; Rick Hane<br>&gt; &gt; Controller<br>&gt; &gt; Deluxe Stitcher Company Inc<br>&gt; &gt; http://www.deluxestitcher.com/<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; LABEL D E F I N E P R O C E S S I N G 5.0.15R9<br>&gt; &gt;<br>&gt; ──────────────────────────────────────────────────────────<br>&gt; ──────────────────────<br>&gt; &gt; 1 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: declare
 connection(8,.0,g) ◄<br>&gt; &gt; 2 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: declare tablename(20,,g) ◄<br>&gt; &gt; 3 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: declare queryname(8,.0,g) ◄<br>&gt; &gt; 4 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: declare recordset(5,.0,g) ◄<br>&gt; &gt; 5 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: declare myquery(250,*,g) ◄<br>&gt; &gt; 6 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: declare stemp(250,*,g) ◄<br>&gt; &gt; 7 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: connection = new ODBC_CONNECTION("DSN=fp-sqlserver;") ◄<br>&gt; &gt; 8 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: connection le "0" ◄<br>&gt; &gt; Then: show "@Cannot not open a
 connection to "&lt;connection ◄<br>&gt; &gt; 9 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: connection le "0" ◄<br>&gt; &gt; Then: msgbox "Last ODBC error:\n" &amp; @odbcerror["1"] &amp; @odbcerror["2"]<br>&gt; &gt; ◄<br>&gt; &gt; 10 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: tablename = "PST" ◄<br>&gt; &gt; 11 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: stemp="Select PST_ParentItemID," ◄<br>&gt; &gt; 12 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: stemp=stemp&lt;"PST_CompItemID," ◄<br>&gt; &gt; 13 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: stemp=stemp&lt;"PST_QtyPerAssy," ◄<br>&gt; &gt; 14 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: stemp=stemp&lt;"PST_EffStartDate" ◄<br>&gt; &gt; 15 ------- - - - - - - - - - - - - - - -
 -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: stemp=stemp&lt;"from"&lt;tablename ◄<br>&gt; &gt; 16 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: stemp=stemp&lt;"WHERE PST_EffStopDate is Null" ◄<br>&gt; &gt; 17 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: recordset = new ODBC(connection, stemp) ◄<br>&gt; &gt; 18 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: odbc recordset query stemp ◄<br>&gt; &gt; 19 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: n(3,.0)=@odbc.recordset["0"]; r(5,.0)="1" ◄<br>&gt; &gt; 20 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: odbc recordset getfirst ◄<br>&gt; &gt; 21 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; setfld ◄ If: ◄<br>&gt; &gt; Then: a(20,*)=@odbc.recordset ("PST_ParentItemID") ◄<br>&gt; &gt; 22 ------- -
 - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: show "Processing Record"&lt;r&lt;"Part"&lt;a{"" ◄<br>&gt; &gt; 23 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: b(20,*)=@odbc.recordset ("PST_CompItemID") ◄<br>&gt; &gt; 24 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: q(9,.4)=@odbc.recordset ("PST_QtyPerAssy") ◄<br>&gt; &gt; 25 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: d(10,mdyy/)=@odbc.recordset ("PST_EffStartDate") ◄<br>&gt; &gt; 26 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: r=r+"1" ◄<br>&gt; &gt; 27 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: gosub sendit ◄<br>&gt; &gt; 28 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: @odbc.recordset.eof ne "1" ◄<br>&gt; &gt; Then: odbc recordset getnext; goto setfld
 ◄<br>&gt; &gt; 29 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: end ◄<br>&gt; &gt; 30 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; sendit ◄ If: a eq "" ◄<br>&gt; &gt; Then: return ◄<br>&gt; &gt; 31 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: lookup miv = bom r=free -e ◄<br>&gt; &gt; 32 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: miv(1)=a;miv(2)=b;miv(3)=q;miv(4)=d ◄<br>&gt; &gt; 33 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: write miv ◄<br>&gt; &gt; 34 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; Then: return ◄<br>&gt; &gt; 35 ------- - - - - - - - - - - - - - - - -<br>&gt; &gt; ◄ If: ◄<br>&gt; &gt; -------------- next part --------------<br>&gt; &gt; An HTML attachment was scrubbed...<br>&gt; &gt; URL:<br>&gt; &gt; <a
 href="http://mailman.celestial.com/pipermail/filepro-" target="_blank">http://mailman.celestial.com/pipermail/filepro-</a><br>&gt; list/attachments/20130413/c032e05d/attachment.html<br>&gt; &gt; _______________________________________________<br>&gt; &gt; Filepro-list mailing list<br>&gt; &gt; <a href="mailto:Filepro-list@lists.celestial.com" ymailto="mailto:Filepro-list@lists.celestial.com">Filepro-list@lists.celestial.com</a><br>&gt; &gt; Subscribe/Unsubscribe/Subscription Changes<br>&gt; &gt; <a href="http://mailman.celestial.com/mailman/listinfo/filepro-list" target="_blank">http://mailman.celestial.com/mailman/listinfo/filepro-list</a><br>&gt; <br>&gt; --<br>&gt; Jay R. Ashworth&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Baylink&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:jra@baylink.com" ymailto="mailto:jra@baylink.com">jra@baylink.com</a><br>&gt; Designer&nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  The Things I Think&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  RFC 2100<br>&gt; Ashworth &amp; Associates&nbsp; &nbsp; <a href="http://baylink.pitas.com/" target="_blank">http://baylink.pitas.com/</a>&nbsp; &nbsp; &nbsp; &nbsp;  2000 Land Rover DII<br>&gt; St Petersburg FL USA&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  #natog&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +1 727 647 1274<br>&gt; -------------- next part --------------<br>&gt; An HTML attachment was scrubbed...<br>&gt; URL: <a href="http://mailman.celestial.com/pipermail/filepro-" target="_blank">http://mailman.celestial.com/pipermail/filepro-</a><br>&gt; list/attachments/20130415/09f9dbaa/attachment.html<br>&gt; -------------- next part --------------<br>&gt; A non-text attachment was scrubbed...<br>&gt; Name: getbom.prc<br>&gt; Type: application/octet-stream<br>&gt;
 Size: 1220 bytes<br>&gt; Desc: not available<br>&gt; Url : <a href="http://mailman.celestial.com/pipermail/filepro-" target="_blank">http://mailman.celestial.com/pipermail/filepro-</a><br>&gt; list/attachments/20130415/09f9dbaa/attachment.obj<br>&gt; _______________________________________________<br>&gt; Filepro-list mailing list<br>&gt; <a href="mailto:Filepro-list@lists.celestial.com" ymailto="mailto:Filepro-list@lists.celestial.com">Filepro-list@lists.celestial.com</a><br>&gt; Subscribe/Unsubscribe/Subscription Changes<br>&gt; <a href="http://mailman.celestial.com/mailman/listinfo/filepro-list" target="_blank">http://mailman.celestial.com/mailman/listinfo/filepro-list</a><br><br>_______________________________________________<br>Filepro-list mailing list<br><a href="mailto:Filepro-list@lists.celestial.com" ymailto="mailto:Filepro-list@lists.celestial.com">Filepro-list@lists.celestial.com</a><br>Subscribe/Unsubscribe/Subscription Changes<br><a
 href="http://mailman.celestial.com/mailman/listinfo/filepro-list" target="_blank">http://mailman.celestial.com/mailman/listinfo/filepro-list</a><br><br><br></div> </div> </div>  </div></body></html>