Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8712

Re: issue with data connectors

$
0
0

Don,

 

thank you very much for your response! Let me try and elaborate some more on the process, I didn't want to write too much off the bat so people wouldn't get scared away.

THe reason I'm using FoxPro is because our accounting and manufacturing software uses FoxPro tables to read/write the data to/from. The temp table is only for reading data, no writing happens to it.

I have thought about using SQL Express, especially since I already have a database established for my Portal that tracks users and page visits. I was just hoping that there would be a way to use the current setup without any major modifications.

I'm not quite sure how I would go about putting the FoxPro data into a SQL database. The FoxPro exe runs on page load, creating the table and then the report reads from that table. I'm afraid that if I add another step of putting the data from the FoxPro table into the SQL database, the report would take extremely long to load. I could use some guidance on what the best practice would be to achieve putting the data directlly into SQL. Here is the code of the FoxPro exe that creates the table:

 

Close All

Set Excl Off

Use

F:\TIW\KOKAC\immaster In 0


Set TABLEVALIDATE To

0


Use

F:\TIW\KOKAC\imstock In 0


Set TABLEVALIDATE To

0


Use

F:\TIW\KOKWS\Somater In 0


Set TABLEVALIDATE To

0


Use

F:\TIW\KOKWS\soheader In 0


Set TABLEVALIDATE To

0


Use

F:\TIW\KOKWS\Bmrev In 0


Set TABLEVALIDATE To

0


Use

F:\TIW\KOKWS\bmsl In 0


Set TABLEVALIDATE To

0


Use

F:\TIW\KOKWS\Soroute In 0


Set TABLEVALIDATE To

0


Select

soheader.partno As Item,;

soheader.sono

As sono,;

soheader.rev

As sorev,;

soheader.sqty

As sqty,;

soheader.need_date

As needdate,;

soheader.priority,;

soheader.salesno,;

soheader.crea_date,;

soheader.start_date,;

soheader.remark1,;

soheader.remark2,;

soheader.instr1,;

soheader.instr2,;

soheader.plandate,;

soheader.rev,;

soheader.fgloc,;

soheader.mtlloc,;

soheader.solineno,;

soheader.Userid,;

soheader.part_desc,;

Soroute.opno

As routeopno,;

Soroute.loadcenter,;

Soroute.Descrip

As Routedes,;

immaster.misc04

As lottrack,;

immaster.upccode

As upccode;

FROMsoheader Inner Join Soroute On soheader.sono = Soroute.sono;

LEFT Join immaster On soheader.partno = immaster.Item;

Into Cursor c1


Select

c1.*,;

Somater.partno

As partno,;

STR(Asc(Somater.Phanref),3)As Phanref,;

STR(Asc(Somater.Phanid),3)As Phanid,;

VAL(Somater.qty_assy) As qty_assy,;

VAL(Somater.qty_aloc) As qty_aloc,;

Somater.Delmark

As Delmark;

FROM c1 Left Join Somater On c1.sono = Somater.sono And c1.routeopno = Somater.opno;

INTO Cursor c2


Select

c2.*,;

immaster.Descrip

As Descrip,;

immaster.stockum

As stockum,;

immaster.misc04

As misc04,;

immaster.lotstat

As lotstat;

FROM c2 Left Join immaster On c2.partno = immaster.Item;

Into Cursor c3


Select

c3.*,;

imstock.lonhand

As lotqty,;

imstock.locid

As lotloc,;

imstock.lot

As lotnum;

FROM c3 Left Join imstock On imstock.Item = c3.partno AND c3.mtlloc = imstock.locid;

Into Cursor c4

 

Select

c4.*, Iif(Empty(Bmrev.fgparent), Bmrev.itemparent, Bmrev.fgparent ) As fg;

FROM c4 Left Join Bmrev On c4.Item + c4.sorev = Bmrev.itemparent + Bmrev.rev;

into Cursor C5


Select

C5.*, bmsl.findno, bmsl.scrpad;

FROM C5 Left Join bmsl On C5.fg + C5.partno + C5.sorev = bmsl.itemparent + bmsl.itemchild + bmsl.rev;

INTO Cursor C6


If File

("C:\Temp\itemprojimstock.DBF" )

Delete File ("C:\Temp\itemprojimstock.DBF")

Endif


Copy To

"C:\Temp\itemprojimstock.DBF" Type Fox2x


Select

immaster

Use


Select

imstock

Use


Select

Somater

Use


Select

soheader

Use


Select

Bmrev

Use


Select

bmsl

Use


Select

Soroute

Use

 

Thanks again for the help, it is much appreciated!

 

Chris


Viewing all articles
Browse latest Browse all 8712

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>