Home » FAQ » ASP.NET » Error Handling » Why am I getting the error: ‘Type ‘(OleDb or SQL)Connection’ is not defined.’
You get this error when you have not imported the following namespaces in your code in the aspx file: System.Data.SqlClient or System.Data.OleDb.
Platform BlazorASP.NETWinFormsWPF.NET MAUI
Question *
Answer (Optional)
Email (Optional)
Email address is only for further clarification on your FAQ request. It will not be used for any other purpose.
Please leave this field empty.
Share with