Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Problem databinding to syscolumns table

Reply
Thread Tools

Problem databinding to syscolumns table

 
 
cashdeskmac
Guest
Posts: n/a
 
      09-15-2009
Hi,

I have a databound DropDownList on my my page and the SelectCommand is
"Select Column1, Column2 FROM Table1". I have autopostback="true" and a
breakpoint in the SelectedIndexChanged eventhandler is hit every time.

I then change the SelectCommand to "SELECT [name], [id] from syscolumns" and
suddenly it doesn't want to play anymore. The DropDownList is populated
without a problem, but when I select a value from the list it does the
postback without raising the SelectedIndexChanged event. It then selects the
first item in the list, not the one I selected. If I click the back button
in my browser it shows the item I selected.

Is there something special about the syscolumns table that causes this to
happen?

I tried creating a brand new page and added the same functionality but it
gave the same results. When I then changed the SelectCommand on this new
page to point to another (user defined) table, it works without a problem.

Please help!
 
Reply With Quote
 
 
 
 
Gregory A. Beamer
Guest
Posts: n/a
 
      09-15-2009
=?Utf-8?B?Y2FzaGRlc2ttYWM=?= <(E-Mail Removed)>
wrote in news:(E-Mail Removed):

> Hi,
>
> I have a databound DropDownList on my my page and the SelectCommand is
> "Select Column1, Column2 FROM Table1". I have autopostback="true" and
> a breakpoint in the SelectedIndexChanged eventhandler is hit every
> time.
>
> I then change the SelectCommand to "SELECT [name], [id] from
> syscolumns" and suddenly it doesn't want to play anymore. The
> DropDownList is populated without a problem, but when I select a value
> from the list it does the postback without raising the
> SelectedIndexChanged event. It then selects the first item in the
> list, not the one I selected. If I click the back button in my
> browser it shows the item I selected.
>
> Is there something special about the syscolumns table that causes this
> to happen?
>
> I tried creating a brand new page and added the same functionality but
> it gave the same results. When I then changed the SelectCommand on
> this new page to point to another (user defined) table, it works
> without a problem.
>
> Please help!



I know of nothing with the syscolumns view that should cause this
behavior, but perhaps there is something with views? You can always
encapsulate the call in a stored procedure and see if that solves the
problem. If so, you found something I am not aware of. The sproc would
look like this:

CREATE PROCEDURE GetSysColumns
AS

SELECT [name], [id] from syscolumns

If I think of anything else, i will post later.

Peace and Grace,


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

My vacation and childhood cancer awareness site:
http://www.crazycancertour.com

*******************************************
| Think outside the box! |
*******************************************
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Databinding expressions are only supported on objects that have a DataBinding event jobs ASP .Net 0 09-25-2007 11:54 PM
Gridview encoding, or how to run commands before gridview's default databinding, or, how do I disable default databinding at all? Sergei Shelukhin ASP .Net 1 11-12-2006 01:43 PM
Table/table rows/table data tag question? Rio HTML 4 11-05-2004 08:11 AM
DataGrid Custom Column Error when DataBinding "does not contain a definition for 'DataBinding'" Earl Teigrob ASP .Net Datagrid Control 1 03-01-2004 04:52 AM
Could not load type VTFixup Table from assembly Invalid token in v-table fix-up table. David Williams ASP .Net 2 08-12-2003 07:55 AM



Advertisments