I have been trying to synchronize Drupal 7 user account with external DB. Can anyone suggest me best module to do so?
What are you using the external data for? You would most likely be writing your own module if you're trying to get custom DB output. The best way to deal with data from an external DB is to set it up in your settings.php file. Once you've done so you can actively switch to query the second database in any of your modules. Check this out for information - http://drupal.org/node/18429
Related
I would like to know if this scenario would be possible in any programming language combined with any database technology.
I would like to automatically save received pdf files that are attached in emails into a database. Is this possible? Is there any library or framework available to do so?
Yes, I would recommend using Google Apps Script for this. The approach you should follow is to use the GmailApp class (Documentation here) to get the messages you need, you can use methods like getInboxThreads() (Documentation), to retrieve the messages.
After you've found the message and retrieved the attachment (which you can do withgetAttachments() (Documentation)), you can use the JDBC Service to connect with external databases. The specifics here depend a lot on what database you want to connect with, but the documentation will lead you in the right direction.
I have implemented several custom modules which essentially bridge Drupal with some third party applications we build in house.
Now as my knowledge of Drupal grows I am curious to know whether or not it is possible to integrate my modules with Drupal VIEWS for reporting purposes.
My modules connect directly to several MySQL databases on an external server and perform queries and render those results within the context of Drupal.
What I would like to do, is use VIEWS somehow to SELECT and manipulate the query as a Drupal VIEW to avoid having to re-purpose the module queries each time a change is requested.
Basically, is it possible to expose the SQL tables in an external app to one which Drupal VIEWS can pick up? I have googled and found a few suggestions but no one seems to know for sure???
It seems drupal expects all content to be of it's own internal "content type" and thus connected to it's core "node" - is this an assumption VIEWS makes?
I don't want to export my third party data into Drupal "nodes, content types, etc" simply so VIEWS can effectively read and render the results.
Seems to me, this should be possible with a Drupal module bridging the gap somehow???
Cheers,
Alex
You could use data module http://drupal.org/project/data
It gives you option to use views on your custom tables. I hope this helps you.
I'm using Django + internal database(mysql).
but, I need to query to another external database(mysql).
In case, Can I make to model of external database?
The database is already exist. Only need to query..
Thank you.
I think you'll need to take a look at this documentation. It explain how to register multi databases and then query from them. https://docs.djangoproject.com/en/dev/topics/db/multi-db/
To be specific from which DB you query you can jump to this part of the docs https://docs.djangoproject.com/en/dev/topics/db/multi-db/#manually-selecting-a-database-for-a-queryset
I'm trying to build a web application using Orchard, but I have a page that saves data in a database. How can I connect to the database and save this data to it using Orchard?
Thanks
To pass the data to another database you need to be careful as your quite likely to end up with transaction errors.
Create a normal ADO connection using whatever method you would normally do to do it, and then wrap this in a supress transaction. This is because Orchard uses a per request transaction which means you will always be inside a transaction, this means that once you try to connect to a second database the connection will try to elevate to MSDTC, if this is okay then you dont need the suppress statement, but if you dont have this configured... then supress it.
It depends. What kind of data? Do you want to let Orchard take care of the data persistence or do you want to handle your own database?
If you want to handle it yourself, well, just do: it's just MVC.
If you want to let Orchard do it, the easiest is to handle that data as a content type and there are plenty of tutorials in the Orchard docs for that sort of thing.
Take a look at the Contact Form module in the gallery, it is a great reference.
http://orchardproject.net/gallery/List/Modules/Orchard.Module.CyberStride.Contacts
I'd like to know your approach/experiences when it's time to initially populate the Grails DB that will hold your app data. Assuming you have CSVs with data, is is "safer" to create a script (with whatever tool fits you) that:
1.-Generates the Bootstrap commands with the domain classes, run it in test or dev environment and then use the native db commands to export it to prod?
2.-Create the DB's insert script assuming GORM's version = 0 and incrementing manually the soon-to-be autogenerated IDs ?
My fear is that the second approach may lead to inconsistencies for hibernate will have the responsability for the IDs generation and there may be something else I'm missing.
Thanks in advance.
Take a look at this link. This allows you to run groovy scripts in the normal grails context giving you access to all grails features including GORM. I'm currently importing data from a legacy database and have found that writing a Groovy script using the Groovy SQL interface to pull out the data then putting that data in domain objects appears to be the easiest thing to do. Once you have the data imported you just use the commands specific to your database system to move that data to the production database.
Update:
Apparently the updated entry referenced from the blog entry I link to no longer exists. I was able to get this working using code at the following link which is also referenced in the comments.
http://pastie.org/180868
Finally it seems that the simplest solution is to consider that GORM as of the current release (1.2) uses a single sequence for all auto-generated ids. So considering this when creating whatever scripts you need (in the language of your preference) should suffice. I understand it's planned for 1.3 release that every table has its own sequence.