Microsoft Development





Most development for the Microsoft platform is done utilizing the technologies supported by the.NET framework. Other development is done using Visual Basic for Applications (VBA) for programs like Access, Excel, Word and Outlook, with PowerShell for scripting, or with SQL for large databases.

Share tech news, updates, or what's on your mind.

Sign up to Post

I have C# program that has multiple classes. how can I create a really global variable that can be accessed by any class and change the value before passing it to another class.
Expert Spotlight: Joe Anderson (DatabaseMX)
LVL 13
Expert Spotlight: Joe Anderson (DatabaseMX)

We’ve posted a new Expert Spotlight!  Joe Anderson (DatabaseMX) has been on Experts Exchange since 2006. Learn more about this database architect, guitar aficionado, and Microsoft MVP.

I am trying to fill a combo Box with a list of items from a SQLite DB.
have been using/following with this

SO in my
DataAcsess.cs Class i have
 public static List<String> ProductList()

            List<String> entries = new List<string>();

            using (SqliteConnection db =
                new SqliteConnection("Filename=DataStorage.db"))

                SqliteCommand selectCommand = new SqliteCommand
                    ("SELECT DOTProductname from QPL", db);

                SqliteDataReader reader = selectCommand.ExecuteReader();

                while (reader.Read())

            return entries;

Open in new window

(which I am not sure what it is doing)

then i have a

I have my XAML:
                    <ComboBox  x:Name="PName" HorizontalContentAlignment="Center" MinWidth="140" ItemsSource="{Binding}">


Open in new window

(not sure how i get the item source to work)

and finally my

XAML.CS code:
  private void ProductList(object sender, RoutedEventArgs e)
          ComboBox.ItemsSource = DataAccess.ProductList();

Open in new window

Which is throwing some errors because i am not understanding what is required.

How is the standard method to get the query convert it to a item
and then put a foreach item loop to add to my combo box or similar?
appreciate your help in advance.
I re-organized my UWP app. I created a set of folders in the solution explorer and moved the XAML files around accordingly.
I go to recreate my menu items and i run into a trouble where it doesn't recognize some of the new folders and some of the new files.
Is there a way to clean out the old references to make way for a new one? see pictures for details
Hi EE,

This question is more of a query looking for approaches to resolve the following issue:

The user has an SSRS 2016 report and filters the datasets efficiently with filters they have been given.

However, the user wants to save specific rows within the report to key the data into another system e.g Desktop application. Exporting initial the result set data to XML result is a simple task. My question is can you have a button on the SSRS which launches a subform that asks what rows /columns specifically do you want to save from the resultset in XML format.  Completing the necessary criteria on the subform, SSRS exports the data to the user via a download.  

Is this possible in SSRS if so are there examples out there?

Any links or tips, advice are welcome.

Thank you.
Correct philosophy/topology for  SQLite syncing back to Azure.
And querying items in Azure/storing in SQLite
I have just learn that in UWP you cannot store a .DB file in the solution and connect to it with code, instead the .db file is created in a place in appdata when the app is started.
This means I cannot load up the .DB file prehand with lots of data to be used by the app. This must mean the .DB file needs to “sync” in someway to the main data storage this is touched on in this Microsoft doc

My question is what is the correct philosophy/topology to obtain data stored in Azure interact with that data in a UWP app and then sync that data back up to Azure?
THis is a duplicate question that i asked on a reddit subforum.
but without much response.

Iv been looking for weeks to find a comparable guide on using a UWP app with SQLite. All the guides i find are either out of date or using nugget packages that no longer exist. or provide super complex methods.

Im using VS 2019 Community

with this:

Trying to connect to a local .DB file

Maybe i am just not googling the correct words?

Does anyone know of a good resource that demonstrates how to connect to a local .DB file submit entry's and retrieve entry's?

I have set up a very simple update panel page as I was getting a full postback each time on a new site I have set up in VWD, it refuses to update just the update panel, but if I copy over the page to the older site it works fine.

They have identical web configs and I'm not using a master page so no interference there.

Same on the live server, one work, one doesn't - any ideas?

So I am trying to connect Office 365 and WebMerge together so that data can be extrapolated from Excel.  How exactly does this whole API process work.  Do both applications need to typically have an API id and secret or just one?  What exactly is an API and how does it work?
Hi EE,

For the following function borrowed from the following site:

CREATE FUNCTION edit_distance(@s1 nvarchar(3999), @s2 nvarchar(3999))
 DECLARE @s1_len int, @s2_len int
 DECLARE @i int, @j int, @s1_char nchar, @c int, @c_temp int
 DECLARE @cv0 varbinary(8000), @cv1 varbinary(8000)

  @s1_len = LEN(@s1),
  @s2_len = LEN(@s2),
  @cv1 = 0x0000,
  @j = 1, @i = 1, @c = 0

 WHILE @j <= @s2_len
  SELECT @cv1 = @cv1 + CAST(@j AS binary(2)), @j = @j + 1

 WHILE @i <= @s1_len
   @s1_char = SUBSTRING(@s1, @i, 1),
   @c = @i,
   @cv0 = CAST(@i AS binary(2)),
   @j = 1

  WHILE @j <= @s2_len
   SET @c = @c + 1
   SET @c_temp = CAST(SUBSTRING(@cv1, @j+@j-1, 2) AS int) +
    CASE WHEN @s1_char = SUBSTRING(@s2, @j, 1) THEN 0 ELSE 1 END
   IF @c > @c_temp SET @c = @c_temp
   SET @c_temp = CAST(SUBSTRING(@cv1, @j+@j+1, 2) AS int)+1
   IF @c > @c_temp SET @c = @c_temp
   SELECT @cv0 = @cv0 + CAST(@c AS binary(2)), @j = @j + 1

 SELECT @cv1 = @cv0, @i = @i + 1


Open in new window

How do I convert this so it reads a column of values pseudo code example:


SET @TableCOLUMN='ContainerID';

with cte AS; (select TrackingID
from table 1
where var1 = 'ASDF1234' and var2 ='LKJH9786')

-- This Returns a Single TrackingID.

select * dbo.edit_distance(CTE, @COLUMN) any values in the column 'ContainerID' that have distance of more than 2 as compared with CTE.

I hope this makes sense.

Any assistance is welcome.

Thank you

I d like to see an example of a public Azure Devops Powershell project.
Specifically the Boards I d like to see how that is arranged.

That way I know howto start organizing my project into Azure Devops Boards (what kind of items are put in an epic, what in sprints, what with features or items that have no specific date of implementatie etc.

There is a lot on documentation but that doesn't tell anything of there isn t a good example.


Exploring SQL Server 2016: Fundamentals
LVL 13
Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

Debugging UWP code.
following this guide to develop a slide show.

the MainPage.xaml








    <Grid x:Name="LayoutRoot" Background="LightBlue">

        <Grid Margin="0,50">


                <RowDefinition Height="410"/>

                <RowDefinition Height="*"/>


            <StackPanel Grid.Row="0">

                <Border BorderBrush="Black" Grid.Row="0" BorderThickness="1" Width="700">

                    <Image x:Name="ImageSource" AutomationProperties.Name="ImageSource" VerticalAlignment="Top" Stretch="Fill" Height="380" Width="700">




            <Grid x:Name="Input" Grid.Row="1" Margin="0,10,0,0" VerticalAlignment="Top" HorizontalAlignment="Center">

                <StackPanel Orientation="Horizontal">

                    <Button x:Name="playSlideshow" Grid.Row="1"  Margin="0,0,10,0" 

Open in new window

Hi EE,

I have the following query that shows the status of queries running on my SQL Server.
,	r.start_time
,	TotalElapsedTime_ms = r.total_elapsed_time
,	r.[status]
,	r.command
,	DatabaseName = DB_Name(r.database_id)
,	r.wait_type
,	r.last_wait_type
,	r.wait_resource
,	r.cpu_time
,	r.reads
,	r.writes
,	r.logical_reads
,	t.[text] AS [executing batch]
				t.[text], r.statement_start_offset / 2, 
				(	CASE WHEN r.statement_end_offset = -1 THEN DATALENGTH (t.[text]) 
						 ELSE r.statement_end_offset 
					END - r.statement_start_offset ) / 2 
			 ) AS [executing statement] 
,	p.query_plan
	sys.dm_exec_requests r
	sys.dm_exec_sql_text(r.sql_handle) AS t
	sys.dm_exec_query_plan(r.plan_handle) AS p
	r.total_elapsed_time DESC;

Open in new window

Under executing batch I get the following text:

(@P1 varchar(11),@P2 varchar(1))select  distinct o.order_id, o.enddate, lb.value lookback, hb.billinv_id hasbilling   from ordcalc oc   inner join ordcalc pri on (pri.order_id = @P1 )   inner join orders prio on (pri.order_id = prio.order_id)   inner join orders o on (oc.order_id = o.order_id and prio.client_id = o.client_id)   inner join funddept fd on (o.funder_id = fd.funder_id and o.dept_id = fd.dept_id and fd.invformat = 'COMBOSTAT')   inner join funderrefs fr on (o.funder_id = fr.funder_id and = 'Combine Invoice Code' and fr.textval = isnull(@P2, fr.textval))   outer apply (select XMLData.value('data(/PropBag/Prop[@Name = "Lookback Period"]/@Value)[1]', 'varchar(200)') value   from (   select convert(xml, REFDATA) as XmlData from funderrefs   where NAME = 'Combo Statement Settings'   and funder_id = o.funder_id   ) as t1) as lb   outer apply (select top 1 billinv_id from billinv bi where   o.client_id=bi.client_id and o.order_id=bi.order_id and bi.invoutamt > 0 ) as hb   

Open in new window

For the parameters @P1 and @P2 how do I determine what stored procedure this came from?

Any assistance is appreciated.

Thank you.
Hi EE,

A VS query here:

The visual studio error I have been having is that when you select a data connector of Native 11 it was still showing Native 11 but deploying packages in Native 10.

To fix the issue I went to notepad and manually changed each file over, then reopen visual studio everything worked in Native 11 after that.   Not sure why the package files did not convert over when the connector was converted on a shared data source?

Attached is the screen where I am changing the data connector version details.

Any is assistance is welcome, let me know if require clarification.

Thank you.
Hi everyone,
So, I need to find out a couple things about Visual Studio. I thought it was included in the SQL Server install. But I'm not sure.
On my computer, Visual Studio 2008 is installed and I think it came with SQL SSMS 2008. In Control Panel, All SSMS components were installed on 8/3/2015, Same date shows for Visual Studio. So it appears Visual Studio was part of the SSMS 2008 installation.
So, I just now installed SSMS 2017 on a different computer. And there is NO Visual Studio. There are Visual Studio Tools, Shell, etc., but no actual standalone program.
So, how does Visual Studio get installed now? Do I have to buy an individual copy? I'm OK with that, I just want to know.
Anyone know about this?
I have two large batches of programs - several years work - in QuickBasic and Fortran IV .
I need to update these to a more modern language (Python?).
Are there any automatic translators?
where would I find them?
I need to be a quick study in Docker

I am trying to digest Azure, Containers, Docker, Kubernetes, etc.

and quickly.

I am rebuilding my Mac OS environment to contain:

- a Windows 10 VM on Parallels
- a LINUX VM on Parallels
- Visual Studio 2019 Community Edition
- access to Azure Cloud

So, My first hands on practice could be to learn about Docker.

What kind of work-along tutorial can you suggest?  Or video training?

Need an upgrade to Windows 10

I have Windows 7 running on Parallels, but decided that the time has come to upgrade to Windows 10.

Is windows 10 Professional the right choice for me? I am a developer and need Windows 10 so that I can dig into Azure development.

Is Windows 10 the right choice?

Can I get an update somewhere? The prices seem to be pretty low, compared to the prices of years ago. So, I wonder if they even bother offering discounts any longer.

Anybody installed Visual Studio 2019 yet?

I plan to instal it in prep for a code camp, and wonder who else has it running.

Let me know.

Dealing with Locked Tables during debugging

I am tracking down an obscure bug which MAY be in the VB code or MAY be in any number of stored procedures and PROBABLYinvolves the delicate inter-dependency each has on the other.

So, while I am stepping through the VB code, I query the database and see the values before and after each step. But, just when I REALLY need to run the query, the table is locked (by the executing code). After the table is closed and the transactions are committed, only then can I run the query, but by then, it's too late. The error reveals itself and I had no way to see what was on the  database.


It would be awesome if I could set up a mirrored database that I could query to my heart's content. Is that an extreme idea?

I think I am going to need just such an extreme idea to do this...

Does SQL Server 2017 provide me anything I could do here? Ae there any kind of log files where these transactions can be viewed, even when the table is locked?

Maybe Visual Studio is the problem and I could benefit from getting a log of all data tables changes without even stepping through the code. Is there an SSIS feature or SQL Server feature that could output all DB changes for each table into a text file, for example? Then, I could scan it and see when the error showed up in the data.

Python 3 Fundamentals
LVL 13
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

What settings to override on fresh install of SQL Server 2016?

I am installing this BEFORE I install Visual Studio Professional 2017 so that the Visual Studio installer will not try and install SQL Server for me. But I want to be sure I install SQL Server exactly correctly.

What questions will the installer ask me which might require me to change the default settings?

I would like to be armed with all the answers before I start the installation. My worry is that I may need to make an error and then need to uninstall SQL Server, which is not a good place to be.

I need to install Visual Studio Professional 2017 but want to be sure I get the settings correct. I have had bac luck in the past letting Visual Studio install my instance of SQL Server, and found it better to FIRST install SQL Server, THEN install Visual Studio.

So, my questions are where can I get the URL's for

Visual Studio Professional 2017
SQL Server 2016

I plan to install them and use them for free until I get license keys in the next few weeks.

SQL Server: What are DDL, DML and DCL?

Change mouse cursor color from white to black on Windows 10

I spend too much time looking for my mouse, and realized it's white.

Can I change it and/or change it's size on Windows 10?

Need a sample SQL Server database I can use to play around with

I have SQL Server 2014 installed and hope to goof around with a sample database which has lots of different object types already installed. In fact, I hope that

sys.objects table is filled with every possible permutation. I want this database for the sole purpose of raising questions in me about what things I may have not seen before.

Do you have a link so such a free database for me to download?

Please provide a list of SQL Database Objects

I am curious about whether "SQL Database Objects" makes you think of scripts, stored procedures, functions, views and triggers. Or, if there is a set of objects I may have not worked with yet.

Please confirm that those which I listed are in fact "SQL Database Objects" or list any that come to mind.


Microsoft Development





Most development for the Microsoft platform is done utilizing the technologies supported by the.NET framework. Other development is done using Visual Basic for Applications (VBA) for programs like Access, Excel, Word and Outlook, with PowerShell for scripting, or with SQL for large databases.