Showing posts with label ADO.NET. Show all posts
Showing posts with label ADO.NET. Show all posts

Thursday, September 22, 2016

Connectivity Options for Microsoft Azure SQL Database

There are many drivers and libraries that client programs can use to connect to Azure SQL Database or Microsoft SQL Server.

The following are the language options:

ADO.NET
Java using JDBC on Windows
PHP
Node.js
Python
Ruby

This enables developers to use their language of choice and appropriateness of thei application to choose.

ADO.NET related specifics here:
https://azure.microsoft.com/en-us/documentation/articles/sql-database-develop-dotnet-simple/

Microsoft JDBC related information here:
https://msdn.microsoft.com/library/mt484311.aspx

Microsoft Node.js driver for SQL Server here:
https://msdn.microsoft.com/library/mt652093.aspx

Connecting with PHP use Microsoft PHP driver for SQL Server here:
https://msdn.microsoft.com/library/dn865013.aspx

Connect using Python:
Get Python SQL Driver
https://msdn.microsoft.com/library/mt652092.aspx

Connect using Ruby:Get Ruby driver for SQL Server here;
https://msdn.microsoft.com/library/mt652092.aspx

I have described in detail with examples connecting to SQL Azure (as it was called then) using ADO.NET, Java and PHP in my book when SQL Azure was still in Beta:

Read more about the book here:
http://hodentek.blogspot.com/2010/12/my-sql-azure-book-is-published.html
http://hodentek.blogspot.com/2011/01/do-you-want-free-copies-of-my-latest.html





Monday, December 16, 2013

Data from SQL Anywhere 16 using Microsoft Query

Aloha,

In a number of previous posts we have seen how to access data on SQL Anywhere 16 using either ODBC with OpenOffice or ADO.NET connectivity. Follow the links here:
http://hodentek.blogspot.com/2013/10/connecting-to-sql-anywhere-16-using.html
http://hodentek.blogspot.com/2013/09/do-you-need-to-connect-to-sql-anywhere_24.html
http://hodentek.blogspot.com/2013/09/do-you-need-to-connect-to-sql-anywhere_20.html
http://hodentek.blogspot.com/2013/09/do-you-need-to-connect-to-sql-anywhere.html
http://hodentek.blogspot.com/2013/08/do-you-need-to-connect-to-sql-anywhere.html

Connecting to SQL Anywhere 16 from MS Excel has some obvious advantages and the first thing that comes to mind is to crunch numbers and using other powerful tools of Excel such as graphing and Power Pivot.

Microsoft's Microsoft Query offers the easiest route to getting data out of SQL Anywhere 16. This posts shows how you can do it.

Microsoft Query requires an ODBC connection. When you install SQL Anywhere 16  Developer's edition, a ODBC DSN is added to the ODBC Manager screen.

The data comes into MS EXCEL very fast and very easily as shown. The image below shows all the columns (unfiltered, un sorted) from the Contacts table in the demo application that accompanies the SQL Anywhere 16 download.



The detailed steps are available here:

http://hodentekhelp.blogspot.com/2013/12/can-you-get-data-from-sql-anywhere-16.html

Mahalo

Wednesday, October 09, 2013

Connecting to SQL Anywhere 16 using Visual Studio 2013 RC for Web

You can look at the sample described in this post to see how easy it is to connect to SQL Anywhere from Microsoft VS2013RC-Web.

When you install SQL Anywhere 16 a sample folder is installed in the following location:

C:\Users\Public\Documents\SQL Anywhere 16\Samples

Among the various samples you will find the ADO.NET folder here:

C:\Users\Public\Documents\SQL Anywhere 16\Samples\SQLAnywhere

There are a couple of examples that show how to work with SQL Anywhere 16 using ADO.NET. This post shows looking at the TableViewer sample.

  • Launch VS2013RC_Web and open the console application TableViewer solution file.
  • The project gets upgraded should you choose to do so and you should see a message as shown.
 
  • Click OK and you get a migration report. Make sure you look at all the message links.

  • The project gets upgraded as shown.


The project should bring up a form and the button events are shown on the right. Clicking any of the button events and you should get  to see the code.

The project when run displays a form containing a couple of buttons and the connection string shows up in one of text boxes (of course this assumes that you have already started the SQL Anywhere 16 Personal demo server).


  • Click Connect and the list of tables gets populated as shown.

  • Choose a table from the drop-down and click Execute. Execute button instantiates a DataReader and the readers reads all the items. You will see all the columns in the table as shown.

Make sure you read the code.

Microsoft Visual Studio 2013 RC_web is an excellent (free) program that you should really check out.
DMCA.com Protection Status