Wednesday, November 11, 2020

Digi-Key Double Quotes Bug

On or about 11/09/2020 Digi-Key starting displaying double quotes "" in the Size / Dimension and Height fields. 

click on image to view


As shown below Parts converts single quotes and double quotes to in (for inches) 




Example Digi-Key Link: https://www.digikey.com/en/products/detail/hammond-manufacturing/1455K1202/460165

Notes:

Importing and exporting CSV data files with quote characters can cause problems.

Quotes are used to qualify (enclose) strings along with delimiters (field separators) i.e. tab or comma characters in CSV data files.

Tip: Use Part's Excel Import and Export features to avoid CSV file related issues.

That's it !


Monday, October 19, 2020

Create and Connect to a MySQL Database with Amazon RDS

A cloud hosted MySQL database enables remote team members to create and share a centralized Altium database library.

How to Create a MySQL Database – Amazon Web Services

Inbound Traffic Rule

IPv4, MySQL/Aurora, TCP, 3306, 0.0.0.0/0

Importing data into a MySQL DB instance

Amazon AWS > MySQL has an inactive connection time out. 

This timeout is set in the online AWS account for the database.

That's it !

Saturday, October 17, 2020

Filter - SQL Query

The Filter - Search Records dialog uses AND criteria and asterisk wildcards.

The SQL Query Dialog can be used to create complex custom SQL searches or examine the SQL search syntax that was created using in the Filter - Search Records form..

Copy and Paste one the examples below to the Parts SQL Query form.  Edit the query statement as needed then select Run SQL Query to filter the Parts table.

SELECT *
FROM parts
WHERE parts.[Lib Report] <> ''
ORDER BY parts.[Lib Report];

SELECT *
FROM parts
WHERE parts.Part_Type="Resistor" OR parts.Part_Type="Capacitor" OR parts.Part_Type="Inductor";

SELECT *
FROM parts
WHERE parts.[Lib Report] Like '*'
ORDER BY parts.[Lib Report];

SELECT * 
FROM parts
WHERE ID >= 30015;

SELECT *
FROM parts
WHERE ID BETWEEN 30015 AND 30022;

SELECT *
FROM parts
WHERE parts.[Updated By] LIKE 'rclemmons' AND parts.ID BETWEEN 30015 AND 30022
ORDER BY parts.ID;

SELECT *
FROM parts
WHERE parts.[Updated By] LIKE 'rclemmons' AND parts.[Updated_Date] LIKE '*2020-10-19*'
ORDER BY parts.[ID], parts.[Updated By], parts.[Updated_Date];

SELECT *
FROM parts
WHERE Updated_Date >= '2020-10-16' AND Updated_Date <= '2021-11-16'
ORDER By parts.[Updated_Date];

SELECT *
FROM parts
WHERE parts.[Created By] = 'rclemmons' AND parts.Value = '1K'
ORDER BY parts.ID;

MS Access Examples using Brackets and Quotes: (Librarian Only)

UPDATE Parts SET Parts.[Supplier 1] = "";
UPDATE parts SET Parts.[Supplier 1] = 'DigiKey';

UPDATE parts SET parts.[Supplier 1] = 'DigiKey' WHERE parts.[Supplier 1] is NULL;
UPDATE parts SET parts.[Supplier 1] = 'DigiKey' WHERE parts.[Supplier 1] = 'Digi-Key';

DELETE FROM parts WHERE ID = 30512;
INSERT INTO parts (ID) VALUES (30512);

Select * FROM parts WHERE Sorted_Value IS NULL;
UPDATE parts SET Sorted_Value = 0

'Delete All Records in the Parts Table ! ! ! Warning ! ! !
DELETE FROM parts;

MySQL Syntax with `accent characters and Single Quotes` : (Librarian Only)

'Delete All Records in the Parts Table ! ! ! Warning ! ! !
TRUNCATE parts.parts

UPDATE parts SET `Symbol Ref` = `Library Ref` WHERE `Symbol Ref` <> `Library Ref`;

UPDATE parts SET `Supplier 1` = ''
UPDATE parts SET `Supplier 1` = '' WHERE `Supplier 1` = 'DigiKey';
UPDATE parts SET `Supplier 1` = 'DigiKey' WHERE `Supplier 1` = '';

UPDATE parts SET `Supplier 1` = NULL
UPDATE parts SET `Supplier 1` = NULL WHERE `Supplier 1` = 'DigiKey';
UPDATE parts SET `Supplier 1` = 'DigiKey' WHERE `Supplier 1` IS NULL;

UPDATE parts SET `Supplier 1` = 'DigiKey' WHERE `Supplier 1` = 'Digi-Key';

'Adjust LIMIT equal to Row Count
UPDATE parts SET Sorted_Value = 0 WHERE Sorted_Value IS Null LIMIT 10000;

That's It !

Wednesday, October 7, 2020

MySQL ODBC Driver:

These instructions assume you have installed MySQL locally or you are connecting to a cloud hosted MySQL database. 

And you have created the Parts schemas and tables in the MySQL database. 

Note if are using a hosted MySQL solution then Download MySQL Workbench

You must have a MySQL user account with the appropriate permissions.

Install ODBC Drivers for MySQL and Altium:

Then try Connecting to your MySQL database again.



Jan 2024 - Recommended MySQL Configuration for Local Area Networks















As of 9/17/2023

For MySQL 8.0 use ODBC Driver 8.00.32.00 or Older !

MySQL ODBC Drivers (newer than 8.00.32.00) are NOT compatible with Office 365  and Access 16, please install MySQL ODBC driver 8.00.32.00 or an older version of MySQL ODBC driver 8.xx.xx.xx.

After completing the above steps.

In Altium create a *.DBLIB library that is linked to the MySQL parts database.


If Altium fails to connect  . . .

Then try Connecting to your MySQL database again.

Troubleshooting ODBC Connections:

In the Windows Search Box enter ODBC

Open ODBC x64 and select the Drivers Tab

Verify the MySQL the ODBC 8.x ANSI Driver is installed

Tip: 

Select the Archives Tab to locate older versions of MySQL ODBC Drivers.











Contact Parts if you have questions or need technical support.

That's It !

Tuesday, September 29, 2020

LOAD DATA for MySQL

Load Data can be used to send bulk records from a CSV file to a MySQL table.

The first step is to dump the database records to a utf-8 *.CSV file.

sql - exporting text file with utf-8 encoding in ms access - Stack Overflow

Then use MySQL Load Data. . .

What is LOAD DATA and how does it work | MySQL Server Blog

For Load Data Errors see:

MySQL LOAD DATA LOCAL INFILE on WINDOWS not WORKING - Stack Overflow

Useful MySQL Workbench Query Statements













SET GLOBAL local_infile = 1;
show variables like '%secure_file_priv%';
show variables like 'local_infile';

Pipes are safer than commas or semi-colons

Remote Server
LOAD DATA INFILE 'file'
IGNORE INTO TABLE table
CHARACTER SET UTF8
FIELDS TERMINATED BY '|'
OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'

Local Server

LOAD DATA LOCAL INFILE "file" INTO TABLE tblName CHARACTER SET UTF8 COLUMNS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '"';

Other options not shown above include:  Ignore duplicates.

That's it !

Thursday, April 16, 2020

Bill of Material - BOM Part Numbers with Leading Zeros

Leading zeros can be dropped from Mfr Part Numbers in Excel if the part number is numeric and the cells in the Excel worksheet column are formatted as General, which is the default format in Excel. To preserve the leading zeros format the cells in the Excel template as text.

Example:  Molex P/N 0039281043

Try the Generic XLS File Format to preserve leading zeros in part numbers. 

You can find example BOM templates in the Parts Download.



That's it !

Altium - Working from Home and using VPN

To speed up placing parts in your schematic from the Components Panel . . .

If you see pricing and stock then you have Parts Providers enabled.



Preferences >  System > Network Activity > UnCheck Parts Providers.



That's it !