Object cannot be cast from DBNull to other types. my user inputs cannot be inserted

>Object cannot be cast from DBNull to other types.

I guess your program is about to retrieve data. To avoid database null errors you need to compare result with DBNull.Value.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.