Error trying to set Npgsqldataadapter Missingschemaaction property

Asked

Viewed 40 times

1

I’m trying to set the property MissingSchemaAction of an object NpgsqlDataAdapter, but Visual Studio is complaining that the property does not exist.

I looked at the github of the project and saw that NpgsqlDataAdapter inherits from DbDataAdapter, where the documentation shows that owns the property I’m trying to set.

If NpgsqlDataAdapter inherits from DbDataAdapter, why am I not getting this property set?

SS

  • You may be using one object but you may be thinking you are using another. You need more details on how this is going.

  • I’ll edit and post a print of the code

1 answer

3


That’s what I figured, with the screenshot from the IDE you could see that you are using the wrong variable or trying to use a non-available property for this variable. npgsqlCommand is a variable of the type NpgsqlCommand and this type does not have this property. This property will be available in the variable npgsqlDataAdapter if that’s what you want. That is, it seems to be just a typo.

  • Baraio, you came. I didn’t realize.

  • @Matheussaraiva I don’t know if you’ve noticed that you can vote for everything on the site. I notice that you accept the answer but don’t usually vote for it. You may not like doing this, but if you don’t know that these are different actions, you get the information. And I repeat, you can vote on everything you find interesting on the site. And there’s a lot of cool stuff that can help you learn new things. See the [tour].

Browser other questions tagged

You are not signed in. Login or sign up in order to post.