Can't find PInvoke DLL 'dbnetlib.dll'. error in Smart Device Application
The way I solved my problem was I found dbnetlib.dll on my computer and I placed it in the same folder where my application was running from. There was more than one so I kept copying the different versions till I found the right one.
How to connect windows CE c# application to database SQL Server2008r2
I think you are mixing 2 things.
Either use The SqlConnection object, then you can connect to a SQL Server using a connection string found on this page:
https://www.connectionstrings.com/sql-server/
Or use like in your code the SqlCEConnection, then you connect to a SQL Lite (local file), and your connection string should be like on this page:
https://www.connectionstrings.com/sqlite/
But in your sample you are using SqlCEConnection to connect to a sql server, that wont work.
Grtz
What to use in creating a hand held database application
On a barcode scanner (like the symbol technology ones) running windows CE. You can easily use Visual Studio 2005 and 2008 and do your development in VB.net or C# (Though it requires at least the professional version of these annoyingly). For a database backend, there is a SQl Server Ce that is a smaller version of SQL server designed to run on a ce device.
Related Topics
Should I Use Mkannotation, Mkannotationview or Mkpinannotation
How to Ask The Socket to Wait for More Data to Come
Passing Eval from Aspx to JavaScript Function as Parameter
How to Kill a Session or Session Id (Asp.Net/C#)
How to Bind an Objective-C Static Library to Xamarin.iOS
Openssl.Net Porting a Ruby Example to C# (From Railscasts 143 Paypal-Security)
Java Equivalent of C# Async/Await
Can You Use C++ Dlls in C# Code in a Uwp
.Net Class to Execute Remotely on Linux Over Ssh
How to Create a Progress Bar with Rounded Corners in iOS Using Xamarin.Forms
Onchange Event for HTML.Dropdownlist
Is There a Linux Equivalent of Dllimport in .Net Core
Using JavaScript for Custom Purposes
How to Hook into Hardware Keyboard Events at an Application Level
Copying One Azure Blob to Another Blob in Azure Storage Client 2.0
Execute SQL Script on SQL Server Using C#
Asynchronous Controller Is Blocking Requests in ASP.NET MVC Through Jquery