Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have embedded my CDF in facebook.The data for the CDF should be taken from facebook server or my server dynamically.I tried out but its not working in dynamic code iam not able to access the data at all from both servers.Now i have the doubt is it possible to access data for the CDF from external databases.

share|improve this question
    
Take a look at blog about Mathematica Enterprise Edition. image1, image2 –  Vitaliy Kaurov Dec 30 '13 at 9:58
1  
I think that it is fairly clear that a standalone CDF can Import data (you would need Enterprise Mathematica for DatabaseLink). The relevant part is likely about embedding. Can an embedded CDF access a database given that the plugin is sandboxed? I'm 99.9% sure that it can't, but haven't tested. Enterprise signing will not have any effect at all on the sandboxing here as far as I'm aware. –  KAI Dec 30 '13 at 18:27
add comment

1 Answer

It is possible to access data via Import even in a (nonenterprise) .cdf. It must be a publicly available website (i.e., no login or passwords), and there may be other restrictions. In any case, here is code some that does the import:

imageNames = {"http://www.massmurdermedia.tv/images/TV%20Test%20Pattern%2007.jpg", 
              "http://www.testpattern.com.au/site_images/testpattern_main.gif"};
Manipulate[Import[imageNames[[i]]], {i, 1, Length[imageNames], 1, 
      ControlType -> PopupMenu}, SynchronousUpdating -> False, SaveDefinitions -> True]

Copy this and save as .cdf standalone. When you open it, you will be able to read in the two images from the internet (internet connection required). I don't know if this will work embedded in Facebook. If it doesn't then you can be pretty sure that no kind of Importing will work in that context. If it does, then you can just mimic this for the data in your application.

share|improve this answer
    
The above code works when i embed it in Facebook.It imports images from a webpage.But when i take data from database it was protected[Its not a open url].When it was protected it will not take the datas from that[missing the connection string].And i want the data to be dynamic in the sense it should be refreshed and display data from the server as soon as the data in the database was updated.I tried [Dynamic Refresh] and [timer] for auto refresh.both are not working.The CDF getting hanged up in the FB page whenever i use this in the code. –  Bt Ambrishraman Dec 31 '13 at 8:23
    
Then if you want to use the .cdf's for this, you are going to have to work the problem from the other end: how can you get the data written into a form and into a location that the .cdf can read? –  bill s Dec 31 '13 at 12:45
    
Thank you for your kind help. –  Bt Ambrishraman Jan 2 at 5:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.