Re: Strange Exception!

Tech-Archive recommends: Fix windows errors by optimizing your registry



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
>>
>
>


.



Relevant Pages

  • Re: SQL 2005 dbo user issue
    ... Who does the properties page for the db show is the owner? ... the database node in the Object Explorer? ... >> Kalen Delaney, SQL Server MVP ... >>> The problem is the dbo account that came over appears to be incomplete. ...
    (microsoft.public.sqlserver.security)
  • Re: Domain group accounts
    ... I found out that I (my windows account) happend to be owner of the database. ...
    (microsoft.public.sqlserver.security)
  • Re: Strange Exception!
    ... the database, the owner, and the object. ... The problem is that a table is created with the owner of the person who ... programmer helping programmers. ... if I click on continue on the exception the program ...
    (microsoft.public.dotnet.general)
  • Re: Problem seeing tables
    ... If you don't specify the database, ... > owner portion then they get the default values. ... > "Toby Mathews" wrote in message ... >> a user he had created, so all his table have that account as owner. ...
    (microsoft.public.sqlserver.programming)
  • Re: Who should be owner if bd?
    ... Only thing is change the database owner (Use ... > I restored the databse on the SQL 2000 server and was ... > Admin account). ... Now the owner of the database is my NT ...
    (microsoft.public.sqlserver.security)