Sunday, April 29, 2018

ODBC Connectivity to SQLite Databases

ODBC is a easy way to connect to a database assuming an ODBC driver exists. There are ODBC drivers for SQLite available depending on the OS you are using.

Please go to this site  to download your ODBC driver for SQLite.

The current version are as described in my previous post. Download the one appropriate for you use:

LiteODBC_00

I downloaded the one shown here,


LiteODBC_0

You double click the executable show above to begin the installation.

Follow the wizard. Here are some screens shown for your guidance.


LiteODBC_1



LiteODBC_2

I chose the default folder.


LiteODBC_3


LiteODBC_4
As you may know Windows OS has two ODBC Data Source (x32) and (x64). You can verify that you find the driver in the (x64) version as shown here:


LiteODBC_5

Now you start using SQLite.

In the Install directory (in my case: C:\Program Files\SQLite ODBC Driver for Win64), you can find the ODBC Drivers for two versions,
SQLite 2.8.17 
SQLite 3.22.0 .


Friday, April 27, 2018

2018 Sumie Society of Hawaii exhibition

On April 27th the exhibition closes. It is an unique event with exhibits by all those who participate in the Sumie Society of Hawaii.

If you cannot make it. you can still see it here:


The Venue :




The following were randomly chosen. The YouTube video has most of the exhibits (almost all).





Wednesday, April 25, 2018

Doing IoT with WING

WING is Nokia's worldwide IoT network grid. WING is a managed service that helps to get Network Service Providers(CSPs) to go to market supporting the myriad IoT opportunities quickly. A grid around the world helps to connect IoT assets and IoT consumers.

Here is a short list of what WING offers:

  • Nokia WING provides a managed service for IoT for CSPs and includes provisioning, device management, operations, security, customer care and billing for all connected applications.
  • Available as a white label service; this allows those CSPs without an offering with a ready-to-go IoT proposition for their enterprise customers, under their own brand.
  • Nokia WING enables CSPs to enter the IoT market quickly, or can help those that want to complement their existing offering with a global core as a service (aaS) network, taking advantage of improved customer experience due to lower latency.
  • Enterprise customers interested in becoming a mobile virtual network operator (MVNO) themselves can be supported by Nokia WING. In this case, we work in close cooperation with CSPs on cellular connectivity.
Watch this Video of the WING

Sunday, April 15, 2018

On designing TextBoxes in a Universal Windows Platform projects

I will be describing two aspects of the design. The first one deals with providing adequate space between textboxes when you have more than one. The second deals with designing textboxes so that they have the same style regarding back gorund color: font size and font family.

Controlling space between controls

The easiest way is use the Margin in your control.

The syntax is Margin="left, top, right, bottom"

The next image shows code and design time layout where all textboxes have some space between them. The Button is still attached to the last textbox.

Continued here.

Styling textboxes for uniformity

All textboxes having the same properties such as font style, font size, bordering etc. is essential for making apps to have a good visual appeal.

There are various ways you can do it, but here is a simple example of doing it.

I will be using the example in my previous post as it will simplify writing for me.

I will be using the layout in the next image from my above post:


PlaceSpaceBetweenControls..._2

This is how you modify the XMAL markup for the MainPage.xaml

Continued here.


Friday, April 13, 2018

On Connecting to SQLite from a UWP app - Part 1

SQLite is the right relational daatabase with zero configuration for mobile apps. There is a recipe in Microsoft documentation on using a SQLite database in a UWP app. This should be quite straight forward given a recipe but there are problems. Probably because of a plethora of versions of just about everything.

This post is not about a successful follow up of the recipe to its successful end, but steps in the way of achieving, trying to document as much as possible, firstly to find where things did not happen as expected, secondly to make sure it works, at least for me.

The computer is Windows 10 Version 1803, build 17133.73
SQLite for Universal Windows Platform added via Extensions and Update

The Solution for the app, UWPDataTest:

Universal Windows project-UWPDataTest
DataAccessLibrary -DataAccesLibrary


UWPDataTestPost_0


Microsoft.NETCore.UniversalWindowsPlatform used in the DataAccessLibrary(version 6.0.8)


UWPDataTestPost_2

Installed Microsoft.NETCore.UniversalWindowsPlatform


UWPDataTestPost_2a

DataAccessLibrary referenced in UWPDataTest


UWPDataTestPost_3

Using DataAccessLibrary in MainPage.xaml.cs


UWPDataTestPost_4

Using DataAccessLibrary in app.xaml.cs


UWPDataTestPost_5


DataAccess class made static.


UWPDataTestPost_6

Cannot add using Microsoft.Data.SQLite to class library. Data is not an option. If you add it and try to build you get build errors.


UWPDataTestPost_7
Build errors: DataAccessLibrary.dll could not be found. The DataAccessLibrary build has errors.


UWPDataTestPost_8.png

Error persists after upgrading the SQLite version from within VS Studio 2017.


UWPDataTestPost_9.png

Microsoft Visual Studio 2017 Community edition used.


UWPDataTestPost_10.png

I am not sure where the sqliteSample.db is in the computer. It does not seem to be present anywhere, although search is not guaranteed to work always.


UWPDataTestPost_11.png

The problem at present seems to be related to the absence of SQLite on the computer. Perhaps there is an independent source for the database.
Another possible source of error could be the Insiders Preview build may not support the SQLite added.

In VS2015 I did not face any problem, https://hodentekmsss.blogspot.com/2017/03/querying-sqlite-database-using-rsqlite.html

Tuesday, April 10, 2018

Workaround to fix the C++ Windows Console application template loading error

In a previous post I described an error wherein the C++ Windows Console Application failed to load.

 Visual Studio Community 2017 also failed to open a previous C++ Windows Console Application project (created two days earlier). There was no problem with C# programs.

Well, the reason could be the Windows 10 OS Update on 4/4/2018.  I believe some of the other people also place the blame on the Update.

There were two suggestions from the Microsoft MSDN forum, one of which suggested upgrading to a recent version and the other to repair the present installation.

I decided to try yet another way, to modify by removing DESKTOP Development with C++ related items and then , add the Desktop items after verifying whether the Modification did anything at all to the VS Community 2017.

To my surprise, although I removed the desktop item in the installer screen, I could still create a C++ Windows Console application without getting the previously documented error.

Am I happy, yes I can proceed with what I want to do. But I am a bit disheartned that the removal did not remove the items from the New Project window after modification.

Here are the installer options:


The check box for DeskTop Development with C++ (about 512MB) was unchecked and the Modify button was clicked.

You need to close any running programs:



You may need to close running programs.


After modification, the VS 2017 Community  is launched.

I was expecting not to find Windows Console Application under C++ templates, but I was surprise to find that the template was still available.


Just to be sure, I invoked the installer one more time and tried the modify option. I found that the Desktop Development with C++ was unchecked.






DMCA.com Protection Status