Re: Strange Exception!
- From: "Gav" <spam@xxxxxxxx>
- Date: Thu, 8 Sep 2005 18:26:38 +0100
Thanks for the reply...
I'm not sure how you login to enterprise manager as a different account?
When I go in as normal it says that all the tables are owned by dbo.
Regards
Gav
"Nick Malik [Microsoft]" <nickmalik@xxxxxxxxxxxxxxxxxx> wrote in message
news:crydneWhsYqQ44PeRVn-uw@xxxxxxxxxxxxxx
> when you created the column in the table, you may have been logged in to
> the database as yourself, but when running the app, you are running as a
> different identity... perhaps one is the administrator or dbo and the
> other is not?
>
> Many folks don't know that SQL Server entity names are composed of three
> parts: the database, the owner, and the object. Pubs.dbo.Authors
>
> The problem is that a table is created with the owner of the person who
> created it. That said, if it is created with anything other than dbo,
> then an application logged in as someone other than you cannot see that
> table... which means you can create it again with another owner.
>
> You can have multiple tables with the same name in the same database, each
> with different owners. One table could have the column, while the other
> may not.
>
> That's my guess. Solution: when creating tables, log in as dbo first, or
> create the tables as 'dbo.Authors' instead of 'Authors'.
>
> If you bring up Enterprise Manager, logged in to an account that is mapped
> to the 'sa' account on the database, and look, I'll bet the same table is
> in there more than once.
>
> --
> --- Nick Malik [Microsoft]
> MCSD, CFPS, Certified Scrummaster
> http://blogs.msdn.com/nickmalik
>
> Disclaimer: Opinions expressed in this forum are my own, and not
> representative of my employer.
> I do not answer questions on behalf of my employer. I'm just a
> programmer helping programmers.
> --
> "Gav" <spam@xxxxxxxx> wrote in message
> news:ecWcPqjrFHA.3444@xxxxxxxxxxxxxxxxxxxxxxx
>> Hi all,
>>
>> I'm getting an exception that says a column does not exist in a table
>> when it clearly does.
>>
>> I'm using DataGridTextBoxColumns in DataGridTableStyle and setting the
>> correct MappingName, if I click on continue on the exception the program
>> still works as expected. I tried putting in a field in the MappingName
>> which I know does not exist and I don't get the exception it just does
>> not show the column. But I know this field exists it shows the column but
>> i always get the exception:
>>
>>
>> System.ArgumentException: Column 'PurID' does not belong to table
>> PURORDERS.
>> at System.Data.DataRow.CheckColumn(DataColumn column)
>> at System.Data.DataRowView.GetColumnValue(DataColumn column)
>> at System.Data.DataColumnPropertyDescriptor.GetValue(Object component)
>> at
>> System.Windows.Forms.DataGridColumnStyle.GetColumnValueAtRow(CurrencyManager
>> source, Int32 rowNum)
>> at System.Windows.Forms.DataGridTextBoxColumn.Edit(CurrencyManager
>> source, Int32 rowNum, Rectangle bounds, Boolean readOnly, String
>> instantText, Boolean cellIsVisible)
>> at System.Windows.Forms.DataGrid.Edit(String instantText)
>> at System.Windows.Forms.DataGrid.Edit()
>> at System.Windows.Forms.DataGrid.OnEnter(EventArgs e)
>> at System.Windows.Forms.Control.NotifyEnter()
>> at System.Windows.Forms.ContainerControl.UpdateFocusedControl()
>>
>> Has anybody else experienced this?
>>
>> Thanks
>> Gav
>>
>
>
.
- Follow-Ups:
- Re: Strange Exception!
- From: Nick Malik [Microsoft]
- Re: Strange Exception!
- References:
- Re: Strange Exception!
- From: Nick Malik [Microsoft]
- Re: Strange Exception!
- Prev by Date: Re: Speed comparaison question
- Next by Date: Re: when i use stream writer to write to a shared folder, and the network card of that remote computer is disabled
- Previous by thread: Re: Strange Exception!
- Next by thread: Re: Strange Exception!
- Index(es):
Relevant Pages
|