Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
My Other Picker is Pickier
Message
 
To
05/05/2005 16:40:09
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01011435
Message ID:
01012349
Views:
25
Joe,

>I have a mmPicker on my WinForm configured as follows:
>VisitorCompanyNamePicker
>
>BindingSource: Company
>BindingSourceMember: CompanyName
>BindingValueSource: Visitor
>BindingValueSourceMember: CompanyName
>
>DataCommand: SELECT CompanyName FROM Companies Order By CompanyName
>GridColumns: VisitorCompanyColumn (BindingSourceMember = CompanyName)
>
>PickListDisplayMember: CompanyName
>PicListSearchField: CompanyName
>PickListValueMember: CompanyName
>
>I can use this control successfully to update existing records, but get the following error each time I use the control to assign a value to a new recor
>Cannot insert the value NULL into column 'CompanyName', table 'StellarVisiTrakProd.dbo.Visitors'; column does not allow nulls. INSERT fails.

I don't think it has anything to do with the picker. It sounds like the Visitors table CompanyName column is simply not being filled in when you create a new row. I recommend setting a breakpoint in your Save handler to see what the value of the column is when you are getting ready to save.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform