.NET Programming
--
Questions
--
Followers
Top Experts
WinCE 5.0: SqlException on SqlConnection.Open()
Hello!
I'm maintaining a WinCE 5.0 application written in C# (CS 2005).
It is supposed to connect to SQL Server Express 2005 database.
It was working fine for year and a half, but now we had to reinstall the server so it got new network name.
Since our connection string was hardcoded, I had to change it and recompile the application.
After I did this, the application won't connect any more. It throws an exception with this message: "SqlException".
When I run the compiled exe from any normal PC it runs perfectly, but it won't connect when I copy it to WinCE 5.0 terminal.
I can ping the server from my terminal without problems.
Do you have any suggestion what I might try to fix this?
On the terminal we have the following CABs installed:
sql.wce4.armv4.CAB
sqlce.wce4.armv4.CAB
System_SR_ENU.CAB
It is simply placed in /System/Startup folder so it is installed every time the terminal is turned on.
Thank you
I'm maintaining a WinCE 5.0 application written in C# (CS 2005).
It is supposed to connect to SQL Server Express 2005 database.
It was working fine for year and a half, but now we had to reinstall the server so it got new network name.
Since our connection string was hardcoded, I had to change it and recompile the application.
After I did this, the application won't connect any more. It throws an exception with this message: "SqlException".
When I run the compiled exe from any normal PC it runs perfectly, but it won't connect when I copy it to WinCE 5.0 terminal.
I can ping the server from my terminal without problems.
Do you have any suggestion what I might try to fix this?
On the terminal we have the following CABs installed:
sql.wce4.armv4.CAB
sqlce.wce4.armv4.CAB
System_SR_ENU.CAB
It is simply placed in /System/Startup folder so it is installed every time the terminal is turned on.
Thank you
try
{
string connectionString = "Data Source=SERVERNAME\\SQLEXPRESS;Initial Catalog=testdb;Integrated Security=False;UID=user;Password=password";
System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(Data.connectionString);
conn.Open();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
I don't see the SqlException text.
ASKER CERTIFIED SOLUTION
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
.NET Programming
--
Questions
--
Followers
Top Experts
The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.