IBM Worklight - How to connect to SQL server [closed] - sql

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I have a SQL server with 1 database and i want to connect to it from my Worklight app and get data.
How can I do that? I've tried with HTTP adapter but where to put userid and password to access the sql server?

HTTP adapters are not meant for connecting to a SQL backend server... for that purpose you should use SQL adapters. There is a training module for it. There is also a sample application. Please don't go straight to the sample - read the training module first.
You will find out that you need to place the database username and password as well as the URL to it, in the adapter's XML file, like the following.
Note that there are more configurations to do before this will work:
Create a database, its table(s) and set its user permissions
Place the SQL Connector driver (in Eclipse >> Worklight project\server\lib folder)
Make sure to read the training module, where this is all explained.
<dataSourceDefinition>
<driverClass>com.mysql.jdbc.Driver</driverClass>
<url>jdbc:mysql://localhost:3306/mydb</url>
<user>myUsername</user>
<password>myPassword</password>
</dataSourceDefinition>
To better understand Worklight, study the IBM-provided training materials.

Related

Linking iOS application to database [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Needed some advice as i am writing my first iOS application,
1. what is the best way(simplest) to link an app to a database and does the database have to be SQLite (the databse will be external ie. linked via the internet)? i have used mySQL before in MAMP,
I have read up on other post and they suggest complicated methods like via JSON etc, please provide a simple way and a book/guide/web site that could teach me your suggested method would be much appreciated too :)
SQLite is one of them.
However if your requirement is to share the database, you can go with mySQL or even Oracle etc.
JSON, xml are the tools that will help you to make a client server application.
Useful link:
http://jainmarket.blogspot.in/2009/05/iphone-sdk-tutorial-reading-data-from.html
SQLite is generally used for a local database (aka, on the device itself) through CoreData. But it seems like you have a remote MySQL database you want to connect to.
You should build some API that your iOS app talks to to get data from a database. Typically this is done over http which generates JSON in whatever server language of your choice (eg - python, ruby, php, etc).
For the iOS side, you'll probably use Apple's builtin features: NSURLConnection and NSJSONSerialization.

iPad application with remote database [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
How can we implement iPad application that retrieve or store data from remote data source(Mysql). Are there any classes associate to achieve our requirement
If you are retrieving a remote database, then I would recommend creating a wrapper for your DB using a server-side language like PHP to serve the request from your application, just like it serves an AJAX client request.
In your iOS, you have to create a NSURL instance and request your PHP application for data. Now, for returning the data you can use your own format or standards like JSON or XML. There are numerous public JSON/XML parsers available for iOS!
How do you want to handle the delay of using a radio connection? You might want to consider using a json connection and a server application instead

How do I connect to a sql database through sql developer? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
So, I have a .sql file that I have downloaded and was wondering how I connect to it via sql developer which I have also downloaded. Do I need to create a connection with hostname and port etc? can I just connect to a file manually/directly or something?
Also, can anyone recommend a good database to practice/learn on for a beginner? Should I just download oracle 11g and play around with that?
Thanks.
You cannot connect to a .sql file because it is not a database. Oracle runs as a server in its own right. If you do not already have access to a server then you will need to get one.
Fortunately, Oracle publishes a server you can use free of charge that will help get you into the swing of things. Have a look at Oracle Lite
I think you might find it quite a challenge getting yourself set up with a development environment but if you are patient and determined you can get there. Once you have a server to play with you can start to experiment with Sql, which is the language you use to interrogate the database.
Best of luck.
You'll need the SID as well as the ip address and port number (typically 1521) that tns listener is listening on.
Once you've connected, you'll be able to run your sql file against that database.
And yes, it would be a good idea to have a good understanding of Oracle before wandering off blindly into the world of database access (.sql files, for example)

Difference between openrowset,Linked server,Opendatasource [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
Difference between openrowset,Linked server,Opendatasource and openquery in sql server
You don't say what you're trying to do or how your confused but briefly:
Linked servers allows you to connect to another instance of SQL Server running on a different machine.
OPENROWSET is an alternative method to accessing tables in a linked server and is an ad hoc method of accessing remote data using OLE DB.
OPENDATASOURCE allows you to connect with using a linked server name.
Take a look on MSDN or SQLServer Central, there are some good summaries and examples on there.

How to save code samples/snippet in SQL Server? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
Is it possible to save code samples/snippets in SQL Server 2005?
Actually I want to maintain the font style and all of code, provided by user on website same as in stackoverflow we can provide code samples along with question.
Which data type should I use and what html control should i use to receive value from user?
I don't want to create a separate file to save code samples.
Thanks in advance
If you're using SQL Server Management Studio, you can use one of the often overlooked features : the Template Explorer:
As you can see from my screenshot, you can tap into a vast array of pre-defined scripts and templates, and you can create your own folders and templates, too - and use them (also share them in your team).