I recently upgraded my working computer so had to reinstall all of my software. I ran into problems with my SQL Server installation.
When I am installing any major piece of software I must remember to install it with Administrator privileges.
In the installation process I give the SQL Server Instance ID a name. If you don’t do this your SQL Server instance will be named mssqlserver. You will use this for all database connection strings in your applications.
Using SQL Server for generating JSON wasn’t totally successful so I created a program to reformat my record list into JSON for use in my JavaScript projects. I wanted to load it into my local storage and use it as a data source. See my previous article.
The program I created runs in the console and has no arguments. It just grabs a dump of my Artist and Record tables and merges the two sources as a 1 artist to many records JSON file.
While searching for ways to generate JSON from SQL Server I found a video on using Powershell to generate JSON using calls to SQL Server. This looked interesting so I tried it out and it worked. Unfortunately it still didn’t validate and just generated rubbish. I loaded the data into a text editor and found that when it hit the line return point it chopped data and added three dots to the end of each line.
I am currently creating a JavaScript based website to display a version of my RecordDB database. The data will need to be consumed from a JSON file that will be stored in a web browser using local storage.
The advantage of using local storage is that it is persistent and will still be available once you close and reopen your web browser. The first part of this process will be to export my data from a SQL Server database to a JSON formatted file.