2
I’m trying to create a register of categories, the registration worked all right, but when I do the location of the records added to the register always returns the same error:
An unhandled Exception of type 'System.Invalidoperationexception' occurred in System.Data.dll
"Connectionstring property not initialized."
as shown in the image below:
I await answers
At first glance, the connected object that is received in the constructor is not filled with connectionString. You should look at the code snippet that defines which connectionstring to use from your app.config/web.config and see if the name in the configuration file matches what it is being used in the code.
– Intruso
Shows the constructor of this class and the Dalconexao class as well.
– Victor Oliveira
Post the method code
Incluir
, please. Probably in this method you should make an assignment to the propertyconexao.StringConxao
and forgot to do it in the methodLocalizar
– igventurelli
Enter the complete code of your class, not the print
– Rovann Linhalis