Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
My Picker is Picky
Message
From
05/05/2005 09:19:14
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
My Picker is Picky
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01011259
Message ID:
01011259
Views:
62
I have a mmPicker on my WinForm configured as follows:
VisitorSelectionPicker
DataCommand: Select * From Visitors Order By VisitorLastName, VisitorFirstName, CompanyName
GridColumns:
1. VisitorLastNameColumn (BindingSourceMember = VisitorLastName) 2. VisitorFirstNameColumn (BindingSourceMember = VisitorFirstName)
3. VisitorCompanyNameColumn (BindingSourceMember = CompanyName)
GridDefaultSortColumn: VisitorLastNameColumn
PickListDisplayMember: VisitorLastName
PicListSearchField: VisitorLastName
PickListValueMember: VisitorId

When I type a series of characters in the text portion of the control and press Tab, I receive an Application Exception - Incorrect syntax near the keyword 'WHERE'.

The Search in List on the PickerForm works fine.

Why will this not perform as the demo in the Developer Guide?

The stack trace is as follows:
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at OakLeaf.MM.Main.Data.mmDataAccessSql.FillDataSet(DataSet ds, IDbDataAdapter dbAdapter, String tableName, Boolean clearOnFill)
at OakLeaf.MM.Main.Data.mmDataAccessSql.FillDataSet(DataSet ds, IDbCommand command, String tableName, Boolean clearOnFill)
at OakLeaf.MM.Main.Data.mmDataAccessSql.FillDataSet(DataSet ds, String command, String tableName, CommandType cmdType, IDbDataParameter[] dataParms, Boolean clearOnFill)
at OakLeaf.MM.Main.Business.mmBusinessObject.FillDataSet(DataSet ds, String command, String tableName, String databaseKey, CommandType cmdType, IDbDataParameter[] dataParams)
at OakLeaf.MM.Main.Business.mmBusinessObject.GetDataSet(String command, String tableName, String databaseKey, CommandType cmdType, IDbDataParameter[] dataParams)
at OakLeaf.MM.Main.Business.mmBusinessObject.GetDataSet(String command, String tableName, CommandType cmdType, IDbDataParameter[] dataParams)
at OakLeaf.MM.Main.Business.mmBusinessObject.GetDataSet(String command, CommandType cmdType, IDbDataParameter[] dataParams)
at OakLeaf.MM.Main.Business.mmPickListBusinessObject.GetPickList(String command, CommandType cmdType, IDbDataParameter[] parameters)
at OakLeaf.MM.Main.Windows.Forms.mmPickListSearch.HookGetPickListData(mmPickListParameters pickListParams)
at OakLeaf.MM.Main.Windows.Forms.mmPickListSearch.GetPickListData(mmPickListParameters pickListParams)
at OakLeaf.MM.Main.Windows.Forms.mmPickListSearch.PerformSearch(mmPickListParameters pickListParams)
at OakLeaf.MM.Main.Windows.Forms.mmPicker.PerformSearch()
at OakLeaf.MM.Main.Windows.Forms.mmPicker.txtEntry_Validating(Object sender, CancelEventArgs e)
at System.Windows.Forms.Control.OnValidating(CancelEventArgs e)
at System.Windows.Forms.Control.NotifyValidating()
at System.Windows.Forms.ContainerControl.ValidateThroughAncestor(Control ancestorControl)
at System.Windows.Forms.ContainerControl.EnterValidation(Control enterControl)
at System.Windows.Forms.ContainerControl.UpdateFocusedControl()
at System.Windows.Forms.ContainerControl.AssignActiveControlInternal(Control value)
at System.Windows.Forms.ContainerControl.ActivateControlInternal(Control control, Boolean originator)
at System.Windows.Forms.ContainerControl.SetActiveControlInternal(Control value)
at System.Windows.Forms.ContainerControl.SetActiveControl(Control ctl)
at System.Windows.Forms.ContainerControl.set_ActiveControl(Control value)
at System.Windows.Forms.Control.Select(Boolean directed, Boolean forward)
at System.Windows.Forms.Control.SelectNextControl(Control ctl, Boolean forward, Boolean tabStopOnly, Boolean nested, Boolean wrap)
at System.Windows.Forms.ContainerControl.ProcessTabKey(Boolean forward)
at System.Windows.Forms.ContainerControl.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at System.Windows.Forms.ThreadContext.System.Windows.Forms.UnsafeNativeMethods+IMsoComponent.FPreTranslateMessage(MSG& msg)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at TSG.StellarVisiTrak.Main.AppMainEntry.Main() in C:\Documents and Settings\jsalvatore\My Documents\Visual Studio Projects\VisiTrak\VisiTrak Windows Application\Main.vb:line 44
THANKS
Joe Salvatore, Programmer/Analyst - The Stellar Group
Next
Reply
Map
View

Click here to load this message in the networking platform