Problem with azure and winforms
So i am building inventory management sustem with winforms and two main forms for admin and user and user controls. So i have been using local sql and when i changed to azure, my main form bugged and the user controls disapeared from the main form but they are still in the designer, this is the error it gives me when i try to add them back, i tried three different ways for this connection string but its the same.
If someone can help me it urgent

8 Replies
i can givw my github
Something at AddCategories.cs line 14 does not exist. Can you share the entire method that line 14 is in?
its the connection string
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<add name="InventoConnection"
connectionString="Data Source=invento.database.windows.net;Initial Catalog=Invento;Persist Security Info=True;User ID=radostin;Password=YourPassword;Encrypt=True;TrustServerCertificate=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration> this is the app config where i am gathering the information
this is the app config with the string
using System.Configuration; // Add this at the top of the file
// Replace the SqlConnection declaration
SqlConnection connect = new SqlConnection(ConfigurationManager.ConnectionStrings["InventoConnection"].ConnectionString);
and this is the string
Can you post a screenshot or the entire method of AdminAddCategories line 14


and its the same error for all of the user controls
I'd watch a video tutorial or something although I don't recommend WinForms.
Your connection string isn't returning a value, and your variables aren't being created by the time you try to use them
i liked the winforms for the designer because they are drag and drop but they are very old and laggy yea
thank you for helping