how to connect Worklight 6.1 to DB2? - ibm-mobilefirst

I am developing a hybrid application which needs database connectivity to store and retrieve data.I am using IBM db2 database and worklight 6.1. I need the javascript code to connect to db2 so that I can enter information directly to the database from the apps UI and data from db2 should be displayed on the screen.(i.e.both side connectivity-->data retieval and storage in the database)

This is not specific to DB2.
What you really need to do is to read the SQL adapter training module, and learn how to send data to and retrieve data from - a database. Then you need to review the sample project provided in the same URL above.
You can also take a look at the following (after you read the training module). The concept is the same in nature, just for DB2...:
http://wpcertification.blogspot.co.il/2012/03/connecting-to-database-from-worklight.html

Related

How do I access netsuite data using SQL language

A company uses netsuites to make purchase orders and store sales information. The only way this company is able to access this information at the moment is through building netsuites reports
Is there a way SQL language could be written to access the netsuites data as some of the questions asked by the business need something a bit more complex than what netsuites reporting provides - and sound very easy using SQL language
I have experience in Oracle, mysql, and many other SQL languages so I would like to know how to set up a connection to the companies netsuites data so I can help write custom queries
Netsuite has SuiteAnalytics Connect, which is ODBC. It can be downloaded from a link at the very bottom the home screen of your Netsuite account.
After installation of the application bundle and connecting it to your Netsuite, you can write ORACLE SQL queries via Excel, Access, etc. My experience is that Netsuite uses Oracle SQL in ODBC queries and in Saved Search custom queries.
The way I understand it, the ODBC driver is a separately priced item from NetSuite. Once you have that, you could use Excel, Access, Crystal Reports or anything else that can use the ODBC driver to read the data and write queries against it.
The normal way to access NetSuite data is with SuiteScript -- javascript code that uses the nlapi* calls to get to the data.
You can access Netsuite backend using a number of different tools and it allows running Oracle SQL directly.
Netsuite provides JDBC, ADO.NET and ODBC if it was included in your licensing purchase. You can find the downloads from the main menu - lower left hand of the screen in Settings - Set Up SuiteAnalytics Connect.
ADO.net however is pretty worthless in SSIS as it doesn't allow parameter mapping or SQL from a variable value. I have yet to get the ODBC driver to work correctly - it can connect and show columns of a table but it won't validate saying "The ODBC Source.Outputs[ODBC Source Error Output].Columns[...] on the error output has properties that do not match the properties of its corresponding data source column."
The other options I'm looking into are Cozyroc and Kinsgwaysoft adapters for Netsuite. You could also do SOAP or REST connections if desired.
I've not used this, but there should as of 2014.2 there is an ODBC driver available for read access.
http://www.netsuite.com/portal/landing/2014-2/suiteanalytics.shtml
As previously mentioned, if you have it licensed you can download the ODBC driver from the Netsuite application. I tested some other adapters but found Netsuite's at least as good as the competitors and they provide timely security updates to the drivers as well as both 64 and 32 bit versions.
There are also metadata browsers that are on the net (example is URL below), the type of browser being based on which kind of access you are looking at (web services, verses ODBC, etc).
https://system.sandbox.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2017_2/odbc/record/account.html
Within the application GUI there is information you need to connect using their ODBC connection (you need the account id and the role id). The URL is just odbcserver.xxxx.netsuite.com where xxx is specific to your environment you are accessing. Note that other adapters such as Cozyroc, etc. require the admin to setup connections in Netsuite for those.
Here is a list of the main metadata tables:
OA_FKEYS
OA_TABLES
OA_COLUMNS
In addition, note that the URL above does NOT include customization. Plus its not easily consumed by automation tools. But Netsuite provides a set of metadata views within the repository which you can use ODBC to pull from which includes all keys - foreign and primary. AND it does include customizations! I built simple set of ETL jobs that use standard ADO.NET driver within SSIS and the ODBC DSN to pull all the metadata and then use BIML to automatically generate all the extract ETL and related staging tables. You can also easily then use the metadata to detect changes in the underlying database.
Let me know if I can be any help with doing any of this.
There are 3rd party tools, like CData ODBC Adapter for NetSuite: http://www.cdata.com/drivers/netsuite/odbc/ . This tool allows you to run standard SQL against the NetSuite API. Note that the NetSuite API presents a very different data model from that of the native NetSuite ODBC.
With this tool, you install in onto your machine (Win in my case) and then after you configure the driver, you can run SQL against it (the driver config is where you specify your NS credentials, etc.).
It revolutionizes access to NetSuite data IMHO.
Download the Netsuite ODBC drivers, set up your DSN locally with server/credentials, Use SSIS pkgs to automate data extract and load onto you local DB. Use ADO.NET drivers if preferred. Then utilize those tables to create/deliver your complex reports using SQL (stored procedures) and Reporting Services. This will require SQL Standard license at minimum though.
Only API call can access the NetSuite data
You can't access to Netsuite data using sql language.
The only way to gain access to Netsuite from third party systems is to use SOAP request or PHP toolkit.

Clients Reports from web app

I have an web app with some static reports that is running with SQL Server 2012 Web Edition and I dont want the impact of a report process on usage of the app.
So, I decide to split the database:
Database Master - With all data. Used for all web app precess, except the reports
Database X - With all data from the client X. Used only for report and updated every day.
Database Z - With all data from the client Z. Used only for report and updated every day.
Database Y - With all data from the client Y. Used only for report and updated every day.
There is no limitation number of database that could have.
What would be the best way?
-Cubes with Analises Services? I think I cant use this solution with Web Edition.
-Snapshot databases? Maybe in another server?
-Another solution?
Tks.
I could solve my problem using the SSIS (Integration Services) with Visual Studio
I create the Azure SQL databases with table that I want to public to my client
In SSIS I created packages for each client with their connection to Azure database. Also created a variable with the client ID that will be used by the filters.
Published the project in Integration Services Catalog and add JOBs to execute the packages every midnight.
For my clients I give the Azure credential (read-only) that will be used in Excel PowerPivot
Here is a link to a good SSIS tutorial. It worth for who has similar problem or need to migrate/extract/transform data. You can also generate Excel sheets.
SSIS tutorial with SQL Azure

editing database for azure mobile services using Azure SQL management portal

I am developing windows 8.1 application and using AZURE mobile services to communicate with. I need have some data in azure mobile services database which will be dumped to application when it's installed on any device. So I tried to add records in the database using azure management portal SQL_database but seems like I cant do that it gives me error
"Cannot add a row in the Table Data Editor because one or more columns are required but their SQL types are not supported in Table Data Editor. Use the Transact-SQL Editor to add a row."
This is probably due to the --version column that has binary type . So I tried deleting this column but then there was following error
"The target table 'ShoppingListPro.Category' of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause."
I googled this issue and what I found is Link .
Please guide me if it is possible to edit the azure mobile service data base using management portal that will make my life bit easy , other wise I need to write an app to feed data to azure mobile database.
Thanks
You can connect to the DB from SSMS. Just check what your connection string is below 'Connect to your database':

Pulling Data From an SQL Database in HTML 5

I am trying to develop a BlackBerry application that will show data from an SQL Database from a server. I was researching the new HTML 5 option for blackberry (WebWorks) and noticed that it apparently cannot connect to any server data by itself. Some links state that I would need javascript coding to obtain it. I looked into the option of PhoneGap (link here: http://phonegap.com/) and decided I'd try using HTML 5 to produce the application. I have never touched SQL databases before and I am wondering how I would connect the two; meaning how do you pull data from the server given that you are working with HTML5?
I have looked at:
Where is data stored when using an HTML 5 Web SQL Database
Process for pulling data from a sql database
among others but I am still unsure as to what to do. I would be looking to "view" the data from the server and display it on the app. It would be something of the sort:
- HomeScreen: What data would you like to view?:
- Dropdown list of categories (from the database)
- Selecting Entry in dropdown leads to available information (from the database)
Any help would be appreciated, and of course thanks in advance.
the new (and pretty awesome) features of HTML5 is happening in the browser on the client side. What you will need is a back-end on the server side doing some magic. It is true that browsers now have databases but these are located on the phone, computer etc and as I understand your question you want these data to communicate with data on your server. To move data across the web you will need to perform HTTP-requests which can easily be done through javascript and ajax. Look a bit into these technologies and make a little server-side script that gathers data from the database and send it in a structured format to the phone (JSON, XML), then make a script in javascript on the client-side that parse these data and utilise them.
Good luck!

Offline database solution for sql server

Here's task: We have an sql server database. which is hosted at our server. What we need to do is: we need to create a non-techy-users interface (basically insert/edit forms) and let these non-techy-users to install this database locally, since they are located in the areas without internet connection. Then when they're done using the database we get the data from them and inster it in our database.
The biggest concern is that it is not trivial for non-it people to install sql server. Can you please advise me what solution should I choose? Simple Access should work fine, but i really do not want to mess with it and have data conversion back and forth between engines.
Sync Framework for SQL Server: your application uses a lite weight, embedded SQL Server CE (no installation, just a couple of DLLs deployed along with your app) and the sync framework manages the synchronization with the 'mother ship' SQL Server.
Out of interest, why do they need their own installation? Can't you create a new database on your existing instance?
If you're looking for an easy way to create insert/edit forms on your database, have you considered looking at Microsoft's new LightSwitch product (currently in Beta) or Microsoft's Dynamic Data?