Cloud bees, create db's tables - cloudbees

After I've done developing my web site using Hibernate and Struts2, now I want to put it on Cloudbees hoster, the problem is that I don't know how to create my data base's tables?!!
I used the method shown in this video to create my tables: http://vimeo.com/33445098 But it doesn't work!!
It shows how to connect to my server by using MySQL WorkBench, when I created new Server instance the connection couldn't be established, although I used the appropriate informations.
Thank very much :)

After days of looking around on the web I found this, it's very useful
http://www.youtube.com/watch?v=oWE6s_FQBwA

Related

Which software/framework to use to create App for Call Calibration for Quality Dept

I'm not sure if this is the right place to ask this question. If not, please direct me to the right place.
We used to have an application that was created using VB and Microsoft Access. It was an application to score calls from Agents and would then run a few calculations and grade those agents based on a few algorithms.
We replicated all that Access data onto SQL but for some reason, we were just not able to connect the VB application to the SQL Database instead. The application was also outdated and we needed a change.
Can anyone suggest software/framework that can be used to create a new application with an ability to connect to a SQL database?
EDIT: We have a Microsoft Office 365 subscription. I was thinking of using PowerApps. I've never used it before. Does anyone think this could help serve my purpose?
I have extensive experience of using PowerApps to create applications connected to SQL Server (in my case Azure SQL Database), and am mostly satisfied.
There are some constraints, but not major. Please see these posts for some further information.
I would suggest PowerApps if you have Office365.

Add tables to the database on cloudbees or run .sql file for database in cloudbees

I have an AppFuse struts 2 app. I am trying to deploy it on cloudbees. I have created a database and bound it with the DB but I am not sure how to add tables to the database on cloudbees. Is there a way I can run .sql script on database created in cloudbees?
Also when I try to run the app using link it gives error Requested resource not available. I am guessing its because of lack of DB . Can anyone help me on adding tables and data to DB? and also execute the app smoothly on cloudbees?
Thanks a ton for your help.
You can add the tables and populate the data using different ways. You have here an article which explains you how to do it.
From your application, using Spring, you can use something like this. You need to figure it out for other frameworks.
<!-- Database initializer. If any of the script fails, the initialization stops. -->
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="${jdbc.initLocation}"/>
<jdbc:script location="${jdbc.dataLocation}"/>
</jdbc:initialize-database>
If you plan to use a MySQL client, then you should take a look at this, which explains it step by step.
Regarding how to deploy and to bind a Tomcat 7 app with your database, you can take a look at this blog post.
You can find info about all the containers we support here.

Directly perform SQL queries from iPhone to an online server

I'm a newbie and tend to do a simple iOS applications.
The mission is making an app that does the registeration for a person and then upload that data to an online server.
In detail, I want to insert, delete, update data directly to online server.
Would anyone show me what I have to do with (tool, library...)?
I have worked with SQlite to make a local database for the iPhone and it worked well, now it is about dealing with an online server.
For performing remote request there are two ways:
1) https://github.com/smhuang426/MySqueakQl - this is "basic" implementation for remote access to DB. http://www.karlkraft.com/index.php/2010/09/17/mysql-for-iphone-and-osx/ - more advanced, in articles you may some instructions how use this framework. In this case you use SQL C API and you can write your own special classes. Example: http://blog.iosplace.com/?p=30 , http://zetcode.com/tutorials/mysqlcapitutorial/ and description of C API http://dev.mysql.com/doc/refman/5.0/en/c-api-function-overview.html
2) PHP script that posted on online server, you use async ASIHTTP (or ordinary NSRequest) that send to this script, and script works directly with sql DB on tis server. Example ( iOS no communication between iPhone app and MySQL database via PHP). In this case you achieved more security, but also there some limitations like decrease of app's speed and server must supply PHP.
Good luck!
What you need is some kind of remote API available which you will use to interface the iPhone application and say, a MySQL database.

querying database in android

I am building an android app and I have an SQL database stored on a server. I need to either pull the database into android or query the database and have it return information from the tables. I have searched all over the internet but I haven't found anything that explains how to connect to the server from android. How can I do this?
You can't query database in a server from android directly. You have to write PHP scripts to query database from server. You have to keep the php scripts in a web server. And from android application you have to get the data from the php page.
I don't think there is a reasonably simple way to 'pull' the database or connect to it using some soft of ODBC connection. And I don't think it would be wise to use it even if possible.
I believe the best way to solve your problem would be to implement some sort of REST API interface to your database and fetch data as needed.
actually, despite gypsicoder's answer and several "how to"s on the internet, there is a way to connect/query an SQL database from android
you just have to download the corresponding JDCB. for mysql: http://dev.mysql.com/usingmysql/java/
then you just use the java.sql interfaces/classes to do stuff (mysql has a reference manual at above link)

How to manipulate SQL Azure database through pure REST calls

I am an iPhone developer. For one of my clients I am supposed to access their database stored in SQL Azure.
I know that there is an Objective C SDK. I have downloaded it and ran the NetFilx example successfully. But of course my client's account is password protected. Also as of now the Objective C SDK seems to provide only read support. But I will need to write to the database too. So I guess that I will have to use REST based calls to update the database.
My problem is that I cannot figure out what will be the URL of the REST services for the SQL Azure Database and how the authentication will work. I tried searching the net but all the examples seems to show how to connect through .Net, Java or PHP (and other supported languages). Nobody seems to talk about pure REST calls.
I can successfully connect to the database using following command:
sqlcmd -UUsername#Server -PPassword -Stcp:server.database.windows.net -dDBName
If such is the connection command, can any of the Gurus out there help me figure out, what should be the URLs to access this DB through pure REST calls and how the authentication will take place.
Any help is greatly appreciated. Thanks in advance.
Pritam.
What you need is the OData interface to SQL Azure. Currently, SQL Azure only supports TDS protocal, which will require a library to use. However, if you put the OData interface in front of SQL Azure, you can call to SQL Azure via REST.
More information
http://www.odata.org/blog/got-sql-azure-then-youve-got-odata/