Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

best database

Status
Not open for further replies.

dadamec

Technical User
Joined
Apr 9, 2001
Messages
2
Location
US
Hi, I'm after some advice.
I'm currently writting a vba to insert title block information into a cad/cam engineering detail drawing..Part of the programme inserts a material description and part number into the form. AT the moment I have a combo box with the materials and part number written into the code. Long a labourious task. Yuk.
I would much prefer to extract the information from a database list. My question is this what is the best database to create.. IE:- excel spead sheet or a simple text file .. any other sugestions??
eg of data (2 fields description and part number)
1,6mm Aluminium sheet 15-100326-00
 
I used a simple text list and the line input statement. The items in each line are separated by commas with a maximum of 30 items in this case. I also stored them in arrays so I could easily get them out of the combo by reading the item number at the start of each combo list line which was also the array number:
Open "c:\program files\myfolder\PartsList.txt" For Input As #1
Do While Not EOF(1) Or ListItem > 30
Input #1, Description1(ListItem)
Input #1, Description2(ListItem)
Input #1, PartNumber(ListItem)
If ListItem Then
MyComboBox.AddItem ListItem & " " & Description1(ListItem) & " " & Description2(ListItem)& " " & PartNumber(ListItem)
End If
ListItem = ListItem + 1
Loop
Close #1
 
For simplicity you can't beat reading from a text file like teddysmith said.

If your requirements get more complicated, I'd look at using an Access database (if only one user will be using the database at a time), or the MSDE (desktop version of SQL 7) if multi-user access is needed.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top