bindingsource and column names

besmart2000

Active member
Joined
Feb 18, 2007
Messages
25
Programming Experience
1-3
Hi
i have a form with bindingnavigator , bindingsource , dataset and tableadaptor generated in vs2005.
I created textboxes bound to bindingsource
I want to get the base table column names and datatype for all textboxes in the form
and access DataTable object from within binding source
pls , can you provide me with code to do this
thanks
 
Hi Cjard
Many thanks for your demo Example.
I had tests the search and get the following Results:

Category Id: blank
category name: g%
Description: blank
TestResult: pass
---------------------------
Category Id: blank
category name: blank
Description: b%
TestResult: fail
source code error at: CategoriesBindingSource.EndEdit()
ErrorMessage: Column 'CategoryName' does not allow nulls.

--------------------------

Category Id: 5
category name: blank
Description: blank
TestResult: fail
source code error at: CategoriesBindingSource.EndEdit()
ErrorMessage: Column 'CategoryName' does not allow nulls.

I think that bindingSource , apply validation rules at EndEdit() , so the problem is in text controls which are bound to PK fields, OR manadatory fields.
Best Regards,
 
put the following line before EndEdit:

NorthwindDataSet.EnforceConstraints = False


(I've been telling you this all thread.. sorry i omitted it myself, but you could have at least tried it!!)
 
Hi Cjard
Thank you very much
Now It is working.:D
I did the following modification
NorthwindDataSet.EnforceConstraints = False
Again , thank you very much
 
Back
Top