Announcement

Collapse
No announcement yet.

DbLib using MySql not operating properly

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DbLib using MySql not operating properly

    Hello All,
    I have a MySql Db, populated and working,,,,, mostly. I find that I cannot use the Filter line in the Library pane when trying to add a component to a schematic. Anything typed into the Filter line is ignored. However, if I point at a flat library (SchLib) the filter works just fine. Is there a specific column needed in my Db tables? Flat libraries have a Column name called "Component Name", my Db does not contain this column, I did manually add it to one of my tables and placed a copy of what is in the Library Ref fields into it, but still no filter operation.
    I have watched my network traffic using Wireshark, capturing the MySql packets and find only this vague message repeated numbers of times. "Expert Info (Warning/Undecoded): FIXME - dissector is incomplete." If I don't attempt using the filter, I have no errors or other issues. So I feel my connection scheme is fine.
    I feel that a required field is not present in the Db, that the Filter is looking for.
    I have found little at Altium that explains what are required fields for a Db, and no help regarding the use of MySql. I have also opened a service call on this subject with Altium support, but have not gotten any feedback as of yet. Thought I would look around and found this forum. There seems to be some knowledge here. Any ideas anyone?
    TIA,
    Jim

  • #2
    Try right mouse button on one of the library column names and press "Select Columns". Try to select some columns and try it again.

    Do not forget to use star character in front of the string you are looking for e.g. "*0805"


    Click image for larger version

Name:	select columns.png
Views:	314
Size:	18.0 KB
ID:	4818

    Comment


    • #3
      Robert,
      Yes I can add/remove columns. Even adding them all doesn't help. According to Altium, if you drag a column to the left most position, that's the column that the Filter will search through. No matter which column I move left-most, it errors with the listing shown below. This is showing the error after I typed in the filter *DIO-* , yet as you can see in the second screenshot, the first part has that same beginning in it's name

      Error
      EOleException error executing
      Select * From 'Diodes' 'Library Ref' LIKE '%DIO-%'
      Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

      In the above error, the Select, LIKE and % are MySql commands. The % is MySql's equivalent of *
      So my Db, is reporting back to Altium that it can't do, or find something. When this error box appears, the MySql packet capture I get is listed above in my original post.

      Without anything filled into the Filter I get the listing of parts. All data present, as I would expect.

      This third screen shot shows an integrated library selected, with my typing 1.0uf into the filter. It dwindles the list of parts right down to only those.
      This is what won't work if I'm pointing at a Db library table. As you can see there is a "Component Name" column left-most. I want to find out if there is a Altium system variable that is mapped to this column. Then I can add that column to my Db and it should work. I think. So far I've had no luck in finding it.

      Like I said, I do have an open support case with Altium on this, but they have yet to respond.
      When they do and we come up with a solution, I will be sure to post back the solution.
      In the mean time, if you have any ideas, I'd be glad to try them.
      Thanks,
      Jim

      Comment


      • #4
        Robert evidently I didn't post the above correctly. none of my screen shots are visible.

        Comment


        • #5
          To attach files, I normally use the "sheet" button on the right side (in front of the A and SMILE buttons) and then "Upload Attachment". However, I am not sure if I will be able to help with this issue

          Comment


          • #6
            Old post, but I ran into the same problem.
            This is the reason it fails. Altium has a syntax error in their query string. They are missing the 'Where' keyword. I filed a bug against 17.0.11, but I don't have any expectation it will be fixed.

            mysql> Select * From `resistor - chip` `Description` LIKE '%0402%' OR `Value` LIKE
            '%0402%' OR `Manufacturer` LIKE '%0402%';

            mysql> Select * From `resistor - chip` `Description` LIKE '%0402%' OR `Value` LIKE
            -> '%0402%' OR `Manufacturer` LIKE '%0402%';
            ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIKE '%0402%' OR `Value` LIKE
            '%0402%' OR `Manufacturer` LIKE '%0402%'' at line 1


            ----
            This is what Altium SHOULD send. Notice the addition of the word 'Where'. Query results a result.

            mysql> Select * From `resistor - chip` Where `Description` LIKE '%0402%' OR `Value` LIKE
            '%0402%' OR `Manufacturer` LIKE '%0402%';

            mysql> Select * From `resistor - chip` Where `Description` LIKE '%0402%' OR `Value` LIKE
            -> '%0402%' OR `Manufacturer` LIKE '%0402%';

            | 1 | 10k | =Value | ERJ-2RKF1002X | Panasonic Electronic Components | RES SMD 10K OHM 1% 1/10W 0402 | Digi-Key | P10.0KLTR-ND | RES 0402/1005 | Footprints/Passives.PcbLib | Resistor | Symbols/Passives.SchLib | Datasheet | http://industrial.panasonic.com/www-...2RKF1002X+7+WW | Digikey listing | http://digikey.com/product-detail/en...KLTR-ND/192073 | | | -55C ~ 155C | 100ppm/C | 1% | 0.1W, 1/10W | | | RES 0402/1005 RF | Passives.PcbLib | | | 0.0043 | Thick Film | 0402 (1005 Metric) |

            1 row in set (0.00 sec)


            I was hoping to write a TCP proxy server to intercept this bad query, fix it, and then forward it on to the MySQL server. Unfortunately the syntax error seems to be caught by the ODBC driver, and no packet is actually transmitted in this case. (The query text was read from the error dialog box.)

            Comment


            • #7
              WOW! Thanks for sharing this!

              Comment

              Working...
              X