C
C#3w ago
rado

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
No description
8 Replies
rado
radoOP3w ago
i can givw my github
Mango
Mango3w ago
Something at AddCategories.cs line 14 does not exist. Can you share the entire method that line 14 is in?
rado
radoOP3w ago
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
Mango
Mango3w ago
Can you post a screenshot or the entire method of AdminAddCategories line 14
rado
radoOP3w ago
No description
No description
rado
radoOP3w ago
and its the same error for all of the user controls
Mango
Mango3w ago
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
rado
radoOP3w ago
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

Did you find this page helpful?