Using .Net to create files in SQL

Valued Contributor
Valued Contributor

Hello all,

 

I've written a VB6 program that accomplishes the following:

 

I take a text file output from our MRP system with lines such as:

 

0 * B190165006 00 * 00 * CLUTCH,WIRE CARRIER,225-II BRAIDER * *

1 * 00048159 00 * 03 * FITTING,OIL HOLE COVER * 1 *

1 * 00050793 00 * 00 * SPRING,COMP .03WIRE DIA .18OD .69LG * 1 *

1 * 00104292 00 * 00 * PIN,DOWEL .187 X 5/8 * 1 *

1 * 00104492 00 * 00 * PIN,DOWEL .187 X 5/8 * 2 *

0 * B190291001 00 * 04 * ROLLER,POLY,SHUTTLE,225-II BRAIDER * *

1 * 00904146 00 * 00 * BRG,NEEDLE .50ID .69OD .63LG * 1 *

1 * B102011004 00 * 04 * ROLLER,TRACK "SELL B1-90291-1" * 1 *

 

I import these files into an Access database table. The fields represent:

 

BOM Level Part Number Revision Description Quantity

 

The asterisks are delimiters.

 

Once I have my Access table populated, I run my VB6 program. The first create a background instance of SE.

 

Now I open my RecordSet and iterate through. By seeing Level 0, I know to create a new Assembly. By using the next fields, I know the Part Number, Revision Level, Description and quantity. I use these fields to create a "shell" assembly in SE. This "shell" assembly is exactly as our MRP system. Once I come upon another BOM Level 0, I save all current documents and then create a new assembly and go on from there. In some cases, I may have created an Assembly as a Child componenet of another assembly. In this case, I open the existing assembly. If it is already populated with Childrem I go on, etc.

 

My question is this: Is this possible to do this same functionality directly with .Net and/or SharePoint/SQL? As you can imagine, the VB6 program works flawlessly, but it takes a considerable amount of time, bandwith, etc.

 

Thanks in Advance,

 

- Bill Ledbetter

 

Posted by: Bill Ledbetter
Post date: 3/28/2006 9:54:32 AM

3 REPLIES

RE: Using .Net to create files in SQL

Valued Contributor
Valued Contributor

Bill,

 

If you can do it in VB6, you can do it better in VB.NET. That's a biased opinion but it's how I feel.

 

Question: Is the file formation from your MRP set in stone?

 

Here's what I'd do in .NET:

- Generate an XML document from your MRP input.

- Use ADO.NET to read the XML document as a DataSet. *Bet you can't do that with VB6 ;-)

- Simply recode your VB6 SE functionality in VB.NET.

 

I would totally take Access out of the picture. With .NET, you can do everything in memory w/o a physical db. Much faster. I don't see where Insight / SQL would help in this situation.

 

BTW, if you're thinking about learning VB.NET, you should consider attending PLM World this year. I'll be presenting a full day of Solid Edge .NET programming.

 

HTH

 

Posted by: Jason Newell
Post date: 3/28/2006 10:03:28 AM

RE: Using .Net to create files in SQL

Valued Contributor
Valued Contributor

Jason,

 

Thanks for the reply. My real question I guess is:

 

Is this possible just by create records in the SQL table without starting an instance of Solid Edge?

 

I'm thinking it isn't.

 

Thanks,

 

Bill

 

Posted by: Bill Ledbetter
Post date: 3/29/2006 12:23:14 AM

RE: Using .Net to create files in SQL

Valued Contributor
Valued Contributor

You can store the data in SQL but you obviously can't create your skeleton assemblies without having Solid Edge running.

 

Posted by: Jason Newell
Post date: 3/29/2006 6:22:25 AM