Showing posts with label table. Show all posts
Showing posts with label table. Show all posts

Thursday, March 29, 2012

equal between a String and a Table atribute?

Ihave a if statement and a table with 2 atributes. They are descriptionand date. I will check if there is in the table some date like01-01-2008.

String test "01-01-2008";

if (test.Equals(here I will a SELECT query like SELECT date FROM appointmentTable))
{

textbox1.text = "The description on this date is: " + Here I will the descripton of the selected date

}

Does someone know how I can make something like this in C#? Must I use a datasource?

Hi,

Because of the nature of Datetime type i think you should not use string values to compare date values. The seperator character may differ or the time (hour,minute etc. ) part may differ...

Try one of these.

First way;

datetime test=new datetime("2008","1","1");

datetime dbValue=convert.ToDateTime(convert.ToDateTime(..get the value from database..).ToShortDateString()) ;

if (test.Equals(dbValue))

{

textbox1.text = "The description on this date is: " + Here I will the descripton of the selected date

}

here we get rid of the hour minute part that is different than 0: convert.ToDateTime(convert.ToDateTime(..get the value from database..).ToShortDateString())

Second way;

?n this way we use ToShortDateString() function of datetime type to make the hour minute part as zeros 0.

datetime test=new datetime("2008","1","1");

datetime dbValue=convert.ToDateTime(..get the value from database..).ToShortDateString() ;

if (test.ToShortDateString().Equals(dbValue.ToShortDateString()))

{

textbox1.text = "The description on this date is: " + Here I will the descripton of the selected date

}

|||

khalidelmeknesi:

Does someone know how I can make something like this in C#? Must I use a datasource?

Well, you will need to make a connection to the data base, to retrieve the results from your SQL statement, and then read the results.

This can be done using any of the datasource objects or manually by

1, creating a sqlconnection, (the connection to your database) sqlcommand (the SQL statement or stored procedure), and sqldataadapter (the mechanism that will save the results to a dataset)

2. fill the sqldatadapter into a dataset (dataset will hold your return results from the database in DataTables and DataRows)

3. check the values returned by iterating through the DataRow in the DataTable of the DataSet

EOF with SqlDataSource

I am trying to get record from a table and verify it with a textbox i have a sqldatasource.

i have a text box called txtEmail and this is my Select command. how can i get this working if its possible ?

something like txtEmail.text = SqlDataSource1.Secect then ... my code. (i dont know if this a correct way to do this)

<asp:SqlDataSourceID="SqlDataSource1"runat="server"ConnectionString="<%$ ConnectionStrings:imacstestConnectionString %>"

SelectCommand="SELECTEmail FROM [t_CustomerAcct]"

thanks,

Hi,

I'm not quite clear what you want. Do you mean querying with some conditions for a return from the data table and verify if it's equal with the value from the text box or just want to make a query according the value from the text box?

If it's the first scenario, see the following sample:

 <asp:SqlDataSource ID="SqlDataSource1" runat="server" DataSourceMode="DataSet" ConnectionString="<%$ ConnectionStrings:TestConnectionString2%>" ></asp:SqlDataSource>  
SqlDataSource1.SelectCommand ="select CategoryName from Categories where CategoryID='1'";DataView dw = (DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty);string str = dw.Table.Rows[0][0].ToString();if (str ==this.TextBox1.Text) {// equal}else {// not equal}

If it's the second scenario, just make select statement according the value from textbox directly.

this.SqlDataSource1.SelectCommand ="select CategoryName from Categories where CategoryID=@.id";this.SqlDataSource1.SelectParameters.Add("id",this.TextBox1.Text); DataView dw = (DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty);string str = dw.Table.Rows[0][0].ToString();

Thanks.

Monday, March 26, 2012

Entities Disappear in Ad Hoc Reports

I have a single data source view which contains 3 tables. Each table is a
completely denormalized (like a spreadsheet) dataset from a particular
business system. The tables themselves don't contain any foreign key
relationships, but within the data source view editor I created primary keys
on each table and created relationships between each table. However, when I
try to create a report in report builder, as soon as add an entity from one
table to my report, the other 2 tables disappear. I have found a few other
posts about this problem and the resolutions offered were (1) add a "refer",
but I don't know what that is; and (2) create or add relationships, but I
believe I have done that. What do I have to do to prevent the tables from
disappearing? Thanks.
Also, is there a good resource for reading up on Ad-Hoc reporting? The
books I have seen only cover it briefly.I figured this out. I need to add a role to each table in the Report Model
Designer. It is all in Books Online.
"Bodhicitta" wrote:
> I have a single data source view which contains 3 tables. Each table is a
> completely denormalized (like a spreadsheet) dataset from a particular
> business system. The tables themselves don't contain any foreign key
> relationships, but within the data source view editor I created primary keys
> on each table and created relationships between each table. However, when I
> try to create a report in report builder, as soon as add an entity from one
> table to my report, the other 2 tables disappear. I have found a few other
> posts about this problem and the resolutions offered were (1) add a "refer",
> but I don't know what that is; and (2) create or add relationships, but I
> believe I have done that. What do I have to do to prevent the tables from
> disappearing? Thanks.
> Also, is there a good resource for reading up on Ad-Hoc reporting? The
> books I have seen only cover it briefly.
>

Thursday, March 22, 2012

Enterprise Mgr Not showing Table permissions Correctly

After moving DB's to a new server, the public role was
removed on some, but not all of the tables. We tried
setting the permissions to public in EM but although it
correctly sets it, it does not appear to be set. So now
by using EM I can't tell which tables have the correct
permissions. Has anybody seen this problem where EM does
not correctly show the permissions? Does anyone know how
to resolve this? Also, can anyone show me a way to set
public permissions on all tables through QA?
ThanksYes, I've seen it before. It seems to be some disconnect between
syspermissions and sysprotects. I thought that a way to resolve it might be
to create a new database and copy the user tables into it and grant
permissions in the new database. However, I never got around to doing this.
Public is a role, what permissions would you want to grant to public? Select
to all tables?
GRANT SELECT
ON authors -- you could use a cursor here
TO public
Or, if you have your users already in a group, you could just add that group
to the db_datareader role (if you want everyone to have select).
<paul.j@.aptalaska.com> wrote in message
news:3bcc01c47f14$7f5002c0$a401280a@.phx.gbl...
> After moving DB's to a new server, the public role was
> removed on some, but not all of the tables. We tried
> setting the permissions to public in EM but although it
> correctly sets it, it does not appear to be set. So now
> by using EM I can't tell which tables have the correct
> permissions. Has anybody seen this problem where EM does
> not correctly show the permissions? Does anyone know how
> to resolve this? Also, can anyone show me a way to set
> public permissions on all tables through QA?
> Thankssql

Enterprise Mgr - alter table fails

My developers just started having this problem a few weeks ago. Nearly
any type of "design" table changes are failing in Enterprise Mgr. This
only seems to be happening on the servers running Enterprise Edition.
Standard Edition and MSDE do not have the problem.
All are running SQL2000 - SP4. Some servers are Win2000 Server SP4 and
others are Win2003 Server - SP4. The Windows version does not seem to
matter. I am not aware of any maintenace applied to the SQL servers,
but all workstations have recently had automatic updates turned on and
have received some updates.
Here is the most common example. The developer needs to change the
length of a field in a table. They use Enterprise Mgr, right click on
the table and select "design". They make their change and when they
hit save, they get the following error. (There is no data in the
table.)
'prob1' table
- Unable to create index 'PK_prob1'.
ODBC error: MicrosoftODBC SQL Server DriverSQL ServerTable 'prob1'
already has a primary key defined on it.
MicrosoftODBC SQL Server DriverSQL ServerCould not create constraint.
See previous errors.
I can not just tell them to switch over and use Query Analyzer. Some
of these people have little or no SQL knowledge and would never make it
through alter table statements. They build tables for their front page
apps and that's as far as they get into SQL.
Any thoughts would be helpful. I've scoured support and newsgroups and
can only find old 6.5 and 7.0 reports. I've included the DDL to create
the table if needed. I get the error just changing F2 from 20 to 25
for example.
if exists (select * from dbo.sysobjects where id =
object_id(N'dbo.prob1') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table dbo.prob1
GO
CREATE TABLE dbo.prob1 (
f1 char (10) NOT NULL ,
f2 char (20) NULL ,
f3 char (30) NULL
) ON PRIMARY
GO
ALTER TABLE dbo.prob1 ADD
CONSTRAINT PK_prob1 PRIMARY KEY CLUSTERED
(
f1
) ON PRIMARY
GO
Hi,
Just a small thought..
As you have applied SP4 to your SQL Servers, have you applied SP4 to all of
the development machines where the client tools (EM, QA) are installed, too?
Robert
<stephanie.harrell@.stateauto.com> wrote in message
news:1142271519.219796.202000@.i40g2000cwc.googlegr oups.com...
> My developers just started having this problem a few weeks ago. Nearly
> any type of "design" table changes are failing in Enterprise Mgr. This
> only seems to be happening on the servers running Enterprise Edition.
> Standard Edition and MSDE do not have the problem.
> All are running SQL2000 - SP4. Some servers are Win2000 Server SP4 and
> others are Win2003 Server - SP4. The Windows version does not seem to
> matter. I am not aware of any maintenace applied to the SQL servers,
> but all workstations have recently had automatic updates turned on and
> have received some updates.
> Here is the most common example. The developer needs to change the
> length of a field in a table. They use Enterprise Mgr, right click on
> the table and select "design". They make their change and when they
> hit save, they get the following error. (There is no data in the
> table.)
> 'prob1' table
> - Unable to create index 'PK_prob1'.
> ODBC error: MicrosoftODBC SQL Server DriverSQL ServerTable 'prob1'
> already has a primary key defined on it.
> MicrosoftODBC SQL Server DriverSQL ServerCould not create constraint.
> See previous errors.
>
> I can not just tell them to switch over and use Query Analyzer. Some
> of these people have little or no SQL knowledge and would never make it
> through alter table statements. They build tables for their front page
> apps and that's as far as they get into SQL.
> Any thoughts would be helpful. I've scoured support and newsgroups and
> can only find old 6.5 and 7.0 reports. I've included the DDL to create
> the table if needed. I get the error just changing F2 from 20 to 25
> for example.
>
> if exists (select * from dbo.sysobjects where id =
> object_id(N'dbo.prob1') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
> drop table dbo.prob1
> GO
> CREATE TABLE dbo.prob1 (
> f1 char (10) NOT NULL ,
> f2 char (20) NULL ,
> f3 char (30) NULL
> ) ON PRIMARY
> GO
> ALTER TABLE dbo.prob1 ADD
> CONSTRAINT PK_prob1 PRIMARY KEY CLUSTERED
> (
> f1
> ) ON PRIMARY
> GO
>
|||Yes, all servers have SP4. As for client tools, I would say the
majority are. There may be a couple older machines that are not
current, but have not heard from any of those people - if there are any.
|||(stephanie.harrell@.stateauto.com) writes:
> Here is the most common example. The developer needs to change the
> length of a field in a table. They use Enterprise Mgr, right click on
> the table and select "design". They make their change and when they
> hit save, they get the following error. (There is no data in the
> table.)
> 'prob1' table
> - Unable to create index 'PK_prob1'.
> ODBC error: MicrosoftODBC SQL Server DriverSQL ServerTable 'prob1'
> already has a primary key defined on it.
> MicrosoftODBC SQL Server DriverSQL ServerCould not create constraint.
> See previous errors.
>
> I can not just tell them to switch over and use Query Analyzer. Some
> of these people have little or no SQL knowledge and would never make it
> through alter table statements. They build tables for their front page
> apps and that's as far as they get into SQL.
To be very blunt, if they can't write change scripts with ALTER TABLE,
they should not be changing tables at all. Performing changes to tables
is an advanced operation, and requires careful understanding, particularly
if you are to do it in a production environment.
The Design Table function in EM has several serious flaws (and all these
flaws are carried over to SQL 2005). I include a list below, from a post
that I made just the other day.
I was not able to reproduce the problem with the table you posted. But
you could get an idea of what's going by requesting getting a change
script from EM. (Which you should do anyway, because of all the bugs
in the Table Designer.) You find this function on the 3rd button from
the left in the toolbar.
Here is a list of know defenciencies with the Table Designer:
1) The transaction scope is wacko. What should be one transaction is
split up into several, which can lead to a table change being only
partly implemented, and your database becomes a mess. Or you just lose
constraints, without knowing it.
2) In the generated script, the transaction spans multiple batches. This
means that if one batch fails with a batch-aborting error, the
transaction is rolled back. The remaining batches in the script are
still carried out which is not likely what you want. (This flaw does
not appear if you save directly, as the Table Designer does not continue
to submit batches if there is an error.)
3) The table designer essentially behaves as there has been no later
version of SQL Server. That is, in many cases where it could use
ALTER TABLE, it instead runs a script where it creates a new table
and copies data over.
4) Say that you have to tables A and B. B has an FK to A. You first make a
change to B, and generate a script. Then you change your mind, and
close without saving anything. Instead you make a change A. When you
generate script (or even worse just press Save), you find that the
change to B is included.
5) All constraints that are reapplied, are reapplied WITH NOCHECK,
which means that they are not trusted as far as the optimizer is
concerned. This have serious impact on performance, not the least
with partitioned views.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
|||Thank you for your reply and you are certainly entitled to your opinion
on who should change tables. Our set up works for us. We support a
large audience of developers at varying levels of expertise and this is
the first time we've encountered any problems with the tool. I will
pass along your suggestion on generating the change script to our
developers.
|||(stephanie.harrell@.stateauto.com) writes:
> Thank you for your reply and you are certainly entitled to your opinion
> on who should change tables. Our set up works for us. We support a
> large audience of developers at varying levels of expertise and this is
> the first time we've encountered any problems with the tool.
That you know of. Some of the problems that I pointed out are of the
kind that you may not notice directly when they cause problems. If you
lose an FK constraint, you may not notice until years later when you find
some junk in the column.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
|||I thought I would let you know that I found the problem. The
XACT_ABORT option had been turned on server-wide. The new tools with
SQL 2005 allow you to turn that option off/on in the server properties
and someone had turned it on. Once I turned it back off, Enterprise
Manager worked like a champ again. Guess this is why we have
development servers - to learn lessons the hard way.
Thanks all!
Erland Sommarskog wrote:
> (stephanie.harrell@.stateauto.com) writes:
> That you know of. Some of the problems that I pointed out are of the
> kind that you may not notice directly when they cause problems. If you
> lose an FK constraint, you may not notice until years later when you find
> some junk in the column.
>
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pro...ads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinf...ons/books.mspx

Enterprise Manager, table CreateDate doesn't sort correctly

In EM, when viewing the tables in a database, the tables do not sort
correctly by CreateDate when you click the header. However, in other
databases on the same server, it sorts correctly. Odd.
The only subtle difference we've found is that those databases where the
table create date displays with AM or PM sorts correctly. Those that
display the millisecond in the Create Date do not sort correctly?
Any ideas on how to solve this problem? Thanks in advance!
Mark
SQL Server 2000 with latest and greatest service packs> In EM, when viewing the tables in a database, the tables do not sort
> correctly by CreateDate when you click the header. However, in other
> databases on the same server, it sorts correctly. Odd.
I've seen this too, and can't explain it (nor do I know the fix). I'd show
you the article on my site, but a middleman provider is having issues.
If you really need this functionality, run a query from sysobjects WHERE
xtype='U' ORDER BY crdate DESC...
--
Aaron Bertrand
SQL Server MVP
> The only subtle difference we've found is that those databases where the
> table create date displays with AM or PM sorts correctly. Those that
> display the millisecond in the Create Date do not sort correctly?
> Any ideas on how to solve this problem? Thanks in advance!
> Mark
> SQL Server 2000 with latest and greatest service packs
>

Wednesday, March 21, 2012

Enterprise Manager Unknown Error

I am running SQL2000 sp3 with 819 hotfix on a 2003
Cluster. When I am on one of the database servers in the
cluster I can select from a table and get data returned.
When I am on the webserver and use EnterPrise I can see
the tables but when I try to select I get 'Unknown Error'.
The same select works from ISQL/W GUI and isql at the
command line while on the webserver.
Any ideas on what to look for would be helpful, nothing is
being logged in the eventlog or the sql log.
Thanks
Check the following;
- The MDAC version on the good and the bad machine. If possible upgrade to
the latest version of MDAC
- Capture the T-SQL command from profiler while you are try to retrieve the
data and see if you can identify the issue.
- Permissions
- The client configuration options by comparing them to the good machine.
HTH
SQL Server Support
Agnes Panosian

Enterprise Manager table property consistency

I have one table in my SQL server 2000 (w2k server up to date service packs) where when I right click 'properties' of the table in Enterprise Manager I get 13316 records. But if I open the table in enterprise manager and SELECT count(*) I get 13315 recor
ds. However, using the same table in Query Analyzer, Select count(*) results in 13315 records and Select *
results in 13315 rows showing in the lower right of the Query pane.
It seems to be occuring in just this one table using Enterprise Manager.
Probably no big deal. Anyone know what may be causing this?
TIA
Ken,
Refer DBCC UPDATEUSAGE in BooksOnLine.
Dinesh
SQL Server MVP
--
SQL Server FAQ at
http://www.tkdinesh.com
"Ken" <anonymous@.discussions.microsoft.com> wrote in message
news:53400F61-A8C3-4423-BCCA-B14A84E7FDBD@.microsoft.com...
> I have one table in my SQL server 2000 (w2k server up to date service
packs) where when I right click 'properties' of the table in Enterprise
Manager I get 13316 records. But if I open the table in enterprise manager
and SELECT count(*) I get 13315 records. However, using the same table in
Query Analyzer, Select count(*) results in 13315 records and Select *
> results in 13315 rows showing in the lower right of the Query pane.
> It seems to be occuring in just this one table using Enterprise Manager.
> Probably no big deal. Anyone know what may be causing this?
> TIA
|||In addition to Dinesh's response, both counts and table/index sizes are
numbers that are NOT updated for each insert, update or delete. They are
periodically updated, so they will be close most of the time , but not
exact...
The command that Dinesh showed you will update the information.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Ken" <anonymous@.discussions.microsoft.com> wrote in message
news:53400F61-A8C3-4423-BCCA-B14A84E7FDBD@.microsoft.com...
> I have one table in my SQL server 2000 (w2k server up to date service
packs) where when I right click 'properties' of the table in Enterprise
Manager I get 13316 records. But if I open the table in enterprise manager
and SELECT count(*) I get 13315 records. However, using the same table in
Query Analyzer, Select count(*) results in 13315 records and Select *
> results in 13315 rows showing in the lower right of the Query pane.
> It seems to be occuring in just this one table using Enterprise Manager.
> Probably no big deal. Anyone know what may be causing this?
> TIA

Enterprise Manager table property consistency

I have one table in my SQL server 2000 (w2k server up to date service packs)
where when I right click 'properties' of the table in Enterprise Manager I
get 13316 records. But if I open the table in enterprise manager and SELECT
count(*) I get 13315 recor
ds. However, using the same table in Query Analyzer, Select count(*) result
s in 13315 records and Select *
results in 13315 rows showing in the lower right of the Query pane.
It seems to be occuring in just this one table using Enterprise Manager.
Probably no big deal. Anyone know what may be causing this?
TIAKen,
Refer DBCC UPDATEUSAGE in BooksOnLine.
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"Ken" <anonymous@.discussions.microsoft.com> wrote in message
news:53400F61-A8C3-4423-BCCA-B14A84E7FDBD@.microsoft.com...
> I have one table in my SQL server 2000 (w2k server up to date service
packs) where when I right click 'properties' of the table in Enterprise
Manager I get 13316 records. But if I open the table in enterprise manager
and SELECT count(*) I get 13315 records. However, using the same table in
Query Analyzer, Select count(*) results in 13315 records and Select *
> results in 13315 rows showing in the lower right of the Query pane.
> It seems to be occuring in just this one table using Enterprise Manager.
> Probably no big deal. Anyone know what may be causing this?
> TIA|||In addition to Dinesh's response, both counts and table/index sizes are
numbers that are NOT updated for each insert, update or delete. They are
periodically updated, so they will be close most of the time , but not
exact...
The command that Dinesh showed you will update the information.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Ken" <anonymous@.discussions.microsoft.com> wrote in message
news:53400F61-A8C3-4423-BCCA-B14A84E7FDBD@.microsoft.com...
> I have one table in my SQL server 2000 (w2k server up to date service
packs) where when I right click 'properties' of the table in Enterprise
Manager I get 13316 records. But if I open the table in enterprise manager
and SELECT count(*) I get 13315 records. However, using the same table in
Query Analyzer, Select count(*) results in 13315 records and Select *
> results in 13315 rows showing in the lower right of the Query pane.
> It seems to be occuring in just this one table using Enterprise Manager.
> Probably no big deal. Anyone know what may be causing this?
> TIAsql

Enterprise Manager table property consistency

I have one table in my SQL server 2000 (w2k server up to date service packs) where when I right click 'properties' of the table in Enterprise Manager I get 13316 records. But if I open the table in enterprise manager and SELECT count(*) I get 13315 records. However, using the same table in Query Analyzer, Select count(*) results in 13315 records and Select
results in 13315 rows showing in the lower right of the Query pane
It seems to be occuring in just this one table using Enterprise Manager
Probably no big deal. Anyone know what may be causing this
TIAKen,
Refer DBCC UPDATEUSAGE in BooksOnLine.
--
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"Ken" <anonymous@.discussions.microsoft.com> wrote in message
news:53400F61-A8C3-4423-BCCA-B14A84E7FDBD@.microsoft.com...
> I have one table in my SQL server 2000 (w2k server up to date service
packs) where when I right click 'properties' of the table in Enterprise
Manager I get 13316 records. But if I open the table in enterprise manager
and SELECT count(*) I get 13315 records. However, using the same table in
Query Analyzer, Select count(*) results in 13315 records and Select *
> results in 13315 rows showing in the lower right of the Query pane.
> It seems to be occuring in just this one table using Enterprise Manager.
> Probably no big deal. Anyone know what may be causing this?
> TIA|||In addition to Dinesh's response, both counts and table/index sizes are
numbers that are NOT updated for each insert, update or delete. They are
periodically updated, so they will be close most of the time , but not
exact...
The command that Dinesh showed you will update the information.
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Ken" <anonymous@.discussions.microsoft.com> wrote in message
news:53400F61-A8C3-4423-BCCA-B14A84E7FDBD@.microsoft.com...
> I have one table in my SQL server 2000 (w2k server up to date service
packs) where when I right click 'properties' of the table in Enterprise
Manager I get 13316 records. But if I open the table in enterprise manager
and SELECT count(*) I get 13315 records. However, using the same table in
Query Analyzer, Select count(*) results in 13315 records and Select *
> results in 13315 rows showing in the lower right of the Query pane.
> It seems to be occuring in just this one table using Enterprise Manager.
> Probably no big deal. Anyone know what may be causing this?
> TIA

Enterprise manager table design

I have table with more then 100 coluns . I must change default value
from 0 to 1 in 90 columns. Is there a way to do this in "table design"
in "all in once" metod.Hi
I prefer to write a script does the job .Don't forget to drop first
constraints and then re-create with DEFAULT (1)
"nywebmaster" <scgwebmaster@.yahoo.com> wrote in message
news:1131349106.061862.27390@.z14g2000cwz.googlegroups.com...
>I have table with more then 100 coluns . I must change default value
> from 0 to 1 in 90 columns. Is there a way to do this in "table design"
> in "all in once" metod.
>|||Hi
To add to Uri's suggestion, you can script the table by right clicking the
table in EM and choose the Generate SQL option. Then when you have the file
it can be edited (possibly in Query Analyser!) where global replacement coul
d
save you time. You can then run the script in Query Analyser or from a
command prompt using OSQL.
If you don't want to loose the data from the table then you may want to copy
the contents into a temporary table and then load them back if you are using
the drop/create method.
John
"nywebmaster" wrote:

> I have table with more then 100 coluns . I must change default value
> from 0 to 1 in 90 columns. Is there a way to do this in "table design"
> in "all in once" metod.
>|||On 6 Nov 2005 23:38:26 -0800, nywebmaster wrote:

>I have table with more then 100 coluns . I must change default value
>from 0 to 1 in 90 columns. Is there a way to do this in "table design"
>in "all in once" metod.
Hi nywebmaster,
This question suggests that you have a repeating group in your table.
That is a sign of a weak design. I'll give you an example:
Weak design:
CREATE TABLE SalesPersons
(SalesPersonID int NOT NULL
SalesPersonName varchar(50) NOT NULL,
SalesJan decimal(9,2) DEFAULT NULL,
SalesFeb decimal(9,2) DEFAULT NULL,
SalesMar decimal(9,2) DEFAULT NULL,
SalesApr decimal(9,2) DEFAULT NULL,
SalesMay decimal(9,2) DEFAULT NULL,
SalesJun decimal(9,2) DEFAULT NULL,
SalesJul decimal(9,2) DEFAULT NULL,
SalesAug decimal(9,2) DEFAULT NULL,
SalesSep decimal(9,2) DEFAULT NULL,
SalesOct decimal(9,2) DEFAULT NULL,
SalesNov decimal(9,2) DEFAULT NULL,
SalesDec decimal(9,2) DEFAULT NULL,
PRIMARY KEY (SalesPersonID)
)
Better design:
CREATE TABLE SalesPersons
(SalesPersonID int NOT NULL
SalesPersonName varchar(50) NOT NULL,
PRIMARY KEY (SalesPersonID)
)
CREATE TABLE Sales
(SalesPersonID int NOT NULL,
MonthNo tinyint NOT NULL,
Sales decimal(9,2) NOT NULL,
PRIMARY KEY (SalesPersonID, MonthNo)
FOREIGN KEY (SalesPersonID)
REFERENCES SalesPersons (SalesPersonID)
CHECK (MonthNo BETWEEN 1 AND 12)
)
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)

Enterprise manager table design

I have table with more then 100 columns . I must change default value
from 0 to 1 in 90 columns. Is there a way to do this in "table design"
in "all in once" metod.
Hi
Please don't multipost , I've answered the question in .programming group.
"nywebmaster" <scgwebmaster@.yahoo.com> wrote in message
news:1131349183.821846.143180@.o13g2000cwo.googlegr oups.com...
>I have table with more then 100 columns . I must change default value
> from 0 to 1 in 90 columns. Is there a way to do this in "table design"
> in "all in once" metod.
>

Enterprise manager table design

I have table with more then 100 columns . I must change default value
from 0 to 1 in 90 columns. Is there a way to do this in "table design"
in "all in once" metod.Hi
Please don't multipost , I've answered the question in .programming group.
"nywebmaster" <scgwebmaster@.yahoo.com> wrote in message
news:1131349183.821846.143180@.o13g2000cwo.googlegroups.com...
>I have table with more then 100 columns . I must change default value
> from 0 to 1 in 90 columns. Is there a way to do this in "table design"
> in "all in once" metod.
>

Enterprise manager table design

I have table with more then 100 columns . I must change default value
from 0 to 1 in 90 columns. Is there a way to do this in "table design"
in "all in once" metod.Hi
Please don't multipost , I've answered the question in .programming group.
"nywebmaster" <scgwebmaster@.yahoo.com> wrote in message
news:1131349183.821846.143180@.o13g2000cwo.googlegroups.com...
>I have table with more then 100 columns . I must change default value
> from 0 to 1 in 90 columns. Is there a way to do this in "table design"
> in "all in once" metod.
>sql

Monday, March 19, 2012

Enterprise Manager results timeout

Hi -
Often when working on a query or viewing a table in Enterprise Manager, I ge
t messages such as "There has been no recent activity in the results pane" a
nd threatening to clear it. Is there any way to get rid of these messages? I
'm capable of determining w
hen too many resources are in use on the server without the help of these me
ssages.
Thanks,
JimNo...other than using Query Analyzer instead.
The behavior is by design. The following article applies to
SQL Server 2000 as well:
PRB: Table Designer Automatically Clears Results Pane When
Idle
http://support.microsoft.com/?id=252434
-Sue
On Wed, 10 Mar 2004 08:46:23 -0800, "Jim S"
<anonymous@.discussions.microsoft.com> wrote:

>Hi -
>Often when working on a query or viewing a table in Enterprise Manager, I get messa
ges such as "There has been no recent activity in the results pane" and threatening
to clear it. Is there any way to get rid of these messages? I'm capable of determini
ng
when too many resources are in use on the server without the help of these messages.darkred">
>Thanks,
>Jim|||Hi Jim.
We share in your frustration. Have you come up with any solutions yet?
-Dan
****************************************
******************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET
resources...

Sunday, March 11, 2012

Enterprise Manager Problem

Hi,

I have the following problem:

When I start Enterprise Manager and open a window (editing a table, or showing data in a table) it works correctly. But, when I open other windows after that (editing a table, or showing data in a table), the window opens but I get always a white page. The data and the grid are not shown. Only the data of the selected cell is shown.

I uninstalled it and installed SQL Server again, the problem still remains.

What can I do?

I use:
Windows XP Proffessional
SQL Server 2000 Developer Edition + SP3a

KaaNDid you check the event viewer on your system to see if it recorded any errors?

Which version of SQL Server are you running? Do you have all service packs installed?

You might also try unregistering the SQL Server and re-registering.

(Sorry, grasping at straws)

Terri

Enterprise Manager Problem

Hi. I got Enterprise Manager to work finally.
However, the Columns are backwards when I retrieve all rows, and when i go
to design a table.
Meaning to say that the ID starts on right side of screen, and scrollbar is
on left side (everything is backwards)
in options of enterprise manager, it says english is default language.
thanksHi Michael,
Does this problem happen only with the Enterprise Manager or you see the
same behavior with , say Query Analyzer:
select * from pubs..authors where 1=2
How does the column order appear in the result window of this query ?
This may be more likely a language specific issue and I have seen certain
non-English languages (Arabic etc) which lay out the columns from
left-to-right.
So, you may want to review the configuration on the system, and spcifically
look for non-english related language choices during installation (both OS
and SQL related)
Hope this helps,
Ananth Padmanabham [MSFT]
Microsoft SQL Server Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply only to the newsgroups.
When posting, please state the version of SQL Server being used and the
error number/exact error message text received, if any.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
--
>From: "Michael" <Michael@.nospamplease.com>
>Subject: Enterprise Manager Problem
>Date: Fri, 12 Mar 2004 12:05:27 -0500
>Lines: 10
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <OFr$4QFCEHA.580@.TK2MSFTNGP11.phx.gbl>
>Newsgroups: microsoft.public.sqlserver.server
>NNTP-Posting-Host: h-68-167-73-42.nycmny83.covad.net 68.167.73.42
>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.server:333657
>X-Tomcat-NG: microsoft.public.sqlserver.server
>Hi. I got Enterprise Manager to work finally.
>However, the Columns are backwards when I retrieve all rows, and when i go
>to design a table.
>Meaning to say that the ID starts on right side of screen, and scrollbar is
>on left side (everything is backwards)
>in options of enterprise manager, it says english is default language.
>thanks
>

Enterprise Manager Open Table/Return All Rows

After upgrading Windows 2000 server to Windows Server 2003 Standard Edition
I'm receiving a '8007007F Unknown Error' when I use the 'Open Table/Return
All Rows' right click option in Enterprise Manager (SQL 2000 sp3a).
Although not exactly my issue KnowledgeBase Article 817301 suggested
re-registering query.dll and tquery.dll. I've tried this and I'm still
having the same issue. If anyone is knows of this issue please respond.
Thank-you,
EWD
I'd try re-installing the tools...
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Ernest Dungy" <ewdungy@.msn-DONTSENDSPAM.com> wrote in message
news:Ormc6wexEHA.1988@.TK2MSFTNGP12.phx.gbl...
> After upgrading Windows 2000 server to Windows Server 2003 Standard
Edition
> I'm receiving a '8007007F Unknown Error' when I use the 'Open Table/Return
> All Rows' right click option in Enterprise Manager (SQL 2000 sp3a).
> Although not exactly my issue KnowledgeBase Article 817301 suggested
> re-registering query.dll and tquery.dll. I've tried this and I'm still
> having the same issue. If anyone is knows of this issue please respond.
> Thank-you,
> EWD
>
|||Thanks Wayne, I tried re-installing the tools and uninstall/re-install of
the SQL Server but I received the same error.
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:uwOsI0lxEHA.1196@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> I'd try re-installing the tools...
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Ernest Dungy" <ewdungy@.msn-DONTSENDSPAM.com> wrote in message
> news:Ormc6wexEHA.1988@.TK2MSFTNGP12.phx.gbl...
> Edition
Table/Return
>
|||Ernest, I am receiving the same error. Can you tell me if you were able to
fix your issue?
Thanks
Derek
"Ernest" wrote:

> Thanks Wayne, I tried re-installing the tools and uninstall/re-install of
> the SQL Server but I received the same error.
> "Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
> news:uwOsI0lxEHA.1196@.TK2MSFTNGP15.phx.gbl...
> Table/Return
>
>

Enterprise Manager Open Table/Return All Rows

After upgrading Windows 2000 server to Windows Server 2003 Standard Edition
I'm receiving a '8007007F Unknown Error' when I use the 'Open Table/Return
All Rows' right click option in Enterprise Manager (SQL 2000 sp3a).
Although not exactly my issue KnowledgeBase Article 817301 suggested
re-registering query.dll and tquery.dll. I've tried this and I'm still
having the same issue. If anyone is knows of this issue please respond.
Thank-you,
EWDI'd try re-installing the tools...
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Ernest Dungy" <ewdungy@.msn-DONTSENDSPAM.com> wrote in message
news:Ormc6wexEHA.1988@.TK2MSFTNGP12.phx.gbl...
> After upgrading Windows 2000 server to Windows Server 2003 Standard
Edition
> I'm receiving a '8007007F Unknown Error' when I use the 'Open Table/Return
> All Rows' right click option in Enterprise Manager (SQL 2000 sp3a).
> Although not exactly my issue KnowledgeBase Article 817301 suggested
> re-registering query.dll and tquery.dll. I've tried this and I'm still
> having the same issue. If anyone is knows of this issue please respond.
> Thank-you,
> EWD
>|||Thanks Wayne, I tried re-installing the tools and uninstall/re-install of
the SQL Server but I received the same error.
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:uwOsI0lxEHA.1196@.TK2MSFTNGP15.phx.gbl...
> I'd try re-installing the tools...
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Ernest Dungy" <ewdungy@.msn-DONTSENDSPAM.com> wrote in message
> news:Ormc6wexEHA.1988@.TK2MSFTNGP12.phx.gbl...
> Edition
Table/Return[vbcol=seagreen]
>|||Ernest, I am receiving the same error. Can you tell me if you were able to
fix your issue?
Thanks
Derek
"Ernest" wrote:

> Thanks Wayne, I tried re-installing the tools and uninstall/re-install of
> the SQL Server but I received the same error.
> "Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
> news:uwOsI0lxEHA.1196@.TK2MSFTNGP15.phx.gbl...
> Table/Return
>
>

Enterprise Manager Open Table/Return All Rows

After upgrading Windows 2000 server to Windows Server 2003 Standard Edition
I'm receiving a '8007007F Unknown Error' when I use the 'Open Table/Return
All Rows' right click option in Enterprise Manager (SQL 2000 sp3a).
Although not exactly my issue KnowledgeBase Article 817301 suggested
re-registering query.dll and tquery.dll. I've tried this and I'm still
having the same issue. If anyone is knows of this issue please respond.
Thank-you,
EWDI'd try re-installing the tools...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Ernest Dungy" <ewdungy@.msn-DONTSENDSPAM.com> wrote in message
news:Ormc6wexEHA.1988@.TK2MSFTNGP12.phx.gbl...
> After upgrading Windows 2000 server to Windows Server 2003 Standard
Edition
> I'm receiving a '8007007F Unknown Error' when I use the 'Open Table/Return
> All Rows' right click option in Enterprise Manager (SQL 2000 sp3a).
> Although not exactly my issue KnowledgeBase Article 817301 suggested
> re-registering query.dll and tquery.dll. I've tried this and I'm still
> having the same issue. If anyone is knows of this issue please respond.
> Thank-you,
> EWD
>|||Thanks Wayne, I tried re-installing the tools and uninstall/re-install of
the SQL Server but I received the same error.
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:uwOsI0lxEHA.1196@.TK2MSFTNGP15.phx.gbl...
> I'd try re-installing the tools...
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Ernest Dungy" <ewdungy@.msn-DONTSENDSPAM.com> wrote in message
> news:Ormc6wexEHA.1988@.TK2MSFTNGP12.phx.gbl...
> > After upgrading Windows 2000 server to Windows Server 2003 Standard
> Edition
> > I'm receiving a '8007007F Unknown Error' when I use the 'Open
Table/Return
> > All Rows' right click option in Enterprise Manager (SQL 2000 sp3a).
> > Although not exactly my issue KnowledgeBase Article 817301 suggested
> > re-registering query.dll and tquery.dll. I've tried this and I'm still
> > having the same issue. If anyone is knows of this issue please respond.
> >
> > Thank-you,
> > EWD
> >
> >
>|||Ernest, I am receiving the same error. Can you tell me if you were able to
fix your issue?
Thanks
Derek
"Ernest" wrote:
> Thanks Wayne, I tried re-installing the tools and uninstall/re-install of
> the SQL Server but I received the same error.
> "Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
> news:uwOsI0lxEHA.1196@.TK2MSFTNGP15.phx.gbl...
> > I'd try re-installing the tools...
> >
> > --
> > Wayne Snyder, MCDBA, SQL Server MVP
> > Mariner, Charlotte, NC
> > www.mariner-usa.com
> > (Please respond only to the newsgroups.)
> >
> > I support the Professional Association of SQL Server (PASS) and it's
> > community of SQL Server professionals.
> > www.sqlpass.org
> >
> > "Ernest Dungy" <ewdungy@.msn-DONTSENDSPAM.com> wrote in message
> > news:Ormc6wexEHA.1988@.TK2MSFTNGP12.phx.gbl...
> > > After upgrading Windows 2000 server to Windows Server 2003 Standard
> > Edition
> > > I'm receiving a '8007007F Unknown Error' when I use the 'Open
> Table/Return
> > > All Rows' right click option in Enterprise Manager (SQL 2000 sp3a).
> > > Although not exactly my issue KnowledgeBase Article 817301 suggested
> > > re-registering query.dll and tquery.dll. I've tried this and I'm still
> > > having the same issue. If anyone is knows of this issue please respond.
> > >
> > > Thank-you,
> > > EWD
> > >
> > >
> >
> >
>
>