DB view Media library

You have a question or need an advice about how to do something? Ask it here!
User avatar
dukedl
Posts: 9
Joined: 17 Apr 2012 13:31
DB view Media library

Post by dukedl »

Hello

i'm trying to connect ProppFrexx ONAIR system with my table view. We already have existing DAS system in use wich has mysql database and media files on same server.
I created table view with 1000 records.

Code: Select all

create view propp as
select 
dasaudio.IZVAJALEC AS ARTIST,
dasaudio.NASLOV AS TITLE,
dasaudio.PATH AS LOCATION,
dasaudio.PATH AS FILENAME
from
dasaudio 
limit 1000
on my win xp pro i installed mysql odbc connector and succesfully created link to server/database.
In ProppFrexx ONAIR i created new media library (Location: DB:DSN=propp/propp/) and when i click Test button, everything is ok.

But unfortunately, ProppFrexx ONAIR does not fetch data from server - number of records stays at [0]

Am i missing anything? Thank you.

if i reopen the program, the media library says BROKEN and it has yellow triangle next to it.
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: DB view Media library

Post by radio42 »

A new version v3.0.10.34 is available containing the above optimizations.
So please "Check for Updates..." (which can be don in the help menu at the top right of the main window when clicking on the blue help question mark icon).
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: DB view Media library

Post by radio42 »

How did you test that?
Note, that the number of records are not refreshed automatically in the list - as such they do not switch automatically from [0] to another value.
Try to reselect an entry (even the same) in your media lib dialog or close the dialog (wait for some time) and open the dialog again.
To do a propper test, you can also close the 'Media Library' dialog after adding the new media lib entry by clicking OK and then:
- wait for a couple of seconds (depending on DB speed maybe 30 seconds)
- click on the Open Button's arrow and select the Media Lib from the popup menu "Media Libraryies".
This should open a new playlist window containing the fetched data.

If there are still [0] records found... here are some more questions:

a) when using the 'Test' button in the database connection dialog, what does it exactly return/show?
Note, that the 'Test' just tests the DB connection, but doesn't fetch or validate any data.

b) did you make sure, that the user you are using to connect in your database (in your DNS definition) has all propper rights to execute/select the 'view'?

c) when you make a simple 'select * from propp' from within your MySql DB (e.g. via MySQL Workbench) does the view return propper data?

d) what is the exact content of your 'dasaudio.PATH' column?
Does this contain a fully qualified path and filename to the physical audio file, e.g. "C:\My Music\test.mp3"?
Or what does it exactly contain?

Also note, that you only need one of the LOCATION or FILENAME columns - defining them both doesn't make much sense, but should be a real issue whatsoever.
User avatar
dukedl
Posts: 9
Joined: 17 Apr 2012 13:31
Re: DB view Media library

Post by dukedl »

radio42 wrote: If there are still [0] records found... here are some more questions:

a) when using the 'Test' button in the database connection dialog, what does it exactly return/show?
Note, that the 'Test' just tests the DB connection, but doesn't fetch or validate any data.

Image

b) did you make sure, that the user you are using to connect in your database (in your DNS definition) has all propper rights to execute/select the 'view'?
c) when you make a simple 'select * from propp' from within your MySql DB (e.g. via MySQL Workbench) does the view return propper data?

- yes, when i connect with HeidiSQL with the credentials provided in ODBC connector i can see the data.

d) what is the exact content of your 'dasaudio.PATH' column?
Does this contain a fully qualified path and filename to the physical audio file, e.g. "C:\My Music\test.mp3"?
Or what does it exactly contain?

Image


Also note, that you only need one of the LOCATION or FILENAME columns - defining them both doesn't make much sense, but should be a real issue whatsoever.
User avatar
dukedl
Posts: 9
Joined: 17 Apr 2012 13:31
Re: DB view Media library

Post by dukedl »

thank you for your time and help.
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: DB view Media library

Post by radio42 »

OKi,

here is a small test application you might use: ProppFrexx DBTester

Please unzip the file to e.g. your current ProppFrexx installation folder or to any other empty folder.
Then start the "ProppFrexx DBTester.exe"...
Fill out your 'Connect String', 'Table Name' and 'Base Directory' - just as in the regular ProppFrexx ONAIR Database Connection dialog.
And then click on the 'Test' button.
The test output will be provided below...please submit that back to me (e.g. PM me, post it here or send it via eMail).

THX
User avatar
dukedl
Posts: 9
Joined: 17 Apr 2012 13:31
Re: DB view Media library

Post by dukedl »

Code: Select all

Error: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
   at System.Data.DataTable.EnableConstraints()
   at System.Data.DataTable.set_EnforceConstraints(Boolean value)
   at System.Data.DataTable.EndLoadData()
   at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
   at System.Data.Common.DataAdapter.Fill(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
   at System.Data.Common.LoadAdapter.FillFromReader(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
   at System.Data.DataTable.Load(IDataReader reader, LoadOption loadOption, FillErrorEventHandler errorHandler)
   at System.Data.DataTable.Load(IDataReader reader)
   at ProppFrexx.ProppFrexx_DBTester.TestDB()
hmmm, i guess the view does not work as it should?
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: DB view Media library

Post by radio42 »

Really strange - looks all good and as I made a similar test here all worked fine.
I guess I'll have to send you a test app to see what is going wrong on your side.
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: DB view Media library

Post by radio42 »

So that looks like your table (on which is the view is based on) already violates some unique contrains.
Actually early versions of MySQL allowed NULL values to be present within 'primary key' or 'not-null' resp. multiple NULL values within 'unique' columns.

I assume the "dasaudio.PATH" column might be defined as 'unique' within your origin database table and as such has a unique-contraint on it?!

Currently ProppFrexx automatically uses those 'contraints' as defined in the underlying DB and assumes that they are 'valid' - which seems to be not the case for your table.

Let me prepare a new version of the Test-Application to see, if I can tackle around that problem...
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: DB view Media library

Post by radio42 »

Here is a new version:

So please redownload: ProppFrexx DBTester

It changes the behavious and ignores any constrains by reading the plain data.
If that test is successfull - I might provide an update of ProppFrexx ONAIR by tomorrow which includes the same behaviour.

Post Reply