Showing posts with label tables. Show all posts
Showing posts with label tables. Show all posts

Friday, March 30, 2012

Invoice Detail

Hi

I have a invoice that displays the company name in a rectangle on top then it has a list in the list it has details tables my problem is that the invoice detail goes on the next page I need to have the company name as well on the second page I cant put it in the same table as the detail because I have a few tables in the detail so it is actually no header is it possible to have Repeated the Company name information on the next page?

Thanks

Try this:

http://blogs.msdn.com/ChrisHays/

You may be able to add a conditional text box that displays whenever RowNumber > a certain amount, which would be equal to the amount of records that could fit on a page.

cheers,

Andrew

|||<<

You may be able to add a conditional text box that displays whenever RowNumber > a certain amount, which would be equal to the amount of records that could fit on a page.>>

Hi Thanks Andrew

can you please explain a little bit more how you do this?

Thanks

|||A bit of a hack, but how about just creating another rectangle with visibility property =IIF(Globals!PageNumber.Value > 2)

Not sure if that will work though since the body does not know about page numbers.

Did you try Chris Hays's fix?

http://blogs.msdn.com/ChrisHays/

By passing in the RowNumber to a function, you should be able to toggle hidden property using something like =IIF(Code.RowCount(RowNumber(Nothing)) = 25, True, False)

Then just place the title in a new row in your table, or create a table within a table?

Apologies, hope you find an easier way.

cheers,
Andrew

Invert Rows and Columns in Tables

I have many fields but only a few rows to display. How do I invert the table with Report Services Designer so that Field (Columns) go down the page and the row items go across the page?

The best way to do this is to use Matrix instead of table for more help and examples check those links

http://msdn2.microsoft.com/en-us/library/ms251712(VS.80).aspx
http://msdn2.microsoft.com/en-us/library/ms251709(VS.80).aspx

Monday, March 26, 2012

invalid object name..(my error message)

i'm working on an application using vs 2005, sql server2000, with c# asp.net

i can access many tables in my db that the dbo is the dbowner for them, but when i access few tables that the owner for them is dswebwork, i recieved an error says, invalid object name tbluser...which tbluser is table name...this is the error message in details....

Invalid object name 'tblUsers'.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.SqlClient.SqlException: Invalid object name 'tblUsers'.

Source Error:

Line 57: string passWord = txtPassword.Text;Line 58:Line 59: Users users = new Users(Constants.DB_CONNECTION,Line 60: userName, passWord);Line 61:


Source File:e:\web works\Webworks\DSCWebWorks\LoginMaster.master.cs Line:59

Stack Trace:

[SqlException (0x80131904): Invalid object name 'tblUsers'.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +95 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +82 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +346 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +3244 System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +52 System.Data.SqlClient.SqlDataReader.get_MetaData() +130 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +371 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1121 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +334 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +45 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +162 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +35 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +32 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +183 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +307 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +151 WebWorksBO.DBElements.BaseDataSQLClient.FillDataset(DataSet dsToFill) in C:\Development\MyWebWorks20\WebWorksBO\DBElements\BaseDataSQLClient.cs:97 WebWorksBO.DBElements.dbUsers..ctor(String connStr, String loginname, String loginpassword) in C:\Development\MyWebWorks20\WebWorksBO\DBElements\dbUsers.cs:38 WebWorksBO.AppElements.Users..ctor(String connStr, String loginname, String loginpassword) in C:\Development\MyWebWorks20\WebWorksBO\AppElements\Users.cs:370 LoginMaster.LoginUser() in e:\web works\Webworks\DSCWebWorks\LoginMaster.master.cs:59 LoginMaster.imgbtnOK_Click(Object sender, ImageClickEventArgs e) in e:\web works\Webworks\DSCWebWorks\LoginMaster.master.cs:46 System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +102 System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +141 System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +72 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3840


so..i hope to help me...i need to deploy this project soon...

Append the owner to the table name, when you use it or change the owner to dbo

Select * from dswebwork.tblUsers

Friday, March 23, 2012

Invalid Object Name Error

I'm trying to create a report model using a set of tables from two different servers. Creating the Data Sources and the Data Source View is no problem, however, while trying to create a Report model I run into an error that says,

An error occurred while executing a command.
Message: Invalid object name 'dbo.table_name.
Command:
SELECT COUNT(*) FROM [dbo].[table_name] t

I've checked the schemas for both these tables and they are correct. Why is this error occuring?

Any suggestions would be appreciated!

I'm not sure why the error occurs here but I have a found solution around the problem. You can create named queries that Union your tables from your different data sources into one query.sql

Invalid Object Name ctsv_####...

DB Gurus,

I have a VB 6 utility that is using ADO to connect to replicated tables and I get the following error when I try to update the recordset:

Invalid Object Name 'ctsv_18C3929C22...'

This code worked great until the team that owns one of our SQL servers decided to turn of Replication. After getting replication back up and running, we set up a push subscription rather than a pull as before.

The util is running against the subscriber's tables...not the source tables.

What the heck have I gotten into here?

What does ctsv mean?

Thanks,
GregGood question, what the heck is it? Also make sure you fully qualify table names with schema owner. Maybe that's what it's barking at...

Invalid Object Name - Weird Error - Help!

I have a really strange problem. It seems a table has gone invisible. It's
listed in SysObjects, but does not show up in the tables list.
When I execte "Select * From Object_Access_Levels", it raises the error "Invalid
Object Name".
If I try to [Drop Table Object_Access_Levels], it returns the error:
"Cannot drop the table 'Object_Access_Levels' because it does not exist in the
system catalog."
If I follow the ID for the table to Syscolumns and SysIndexes, all the records
are there.
This is a complete show-stopper. I cannot continue development until this table
is restored.
Here's a copy of the record from sysobjects:
name,id,xtype,uid,info,status,base_schema_ver,replinfo,parent_obj,crdate,ftcatid,
schema_ver,stats_schema_ver,type,userstat,sysstat,indexdel,refdate,version,deltri
g,instrig,updtrig,seltrig,category,cache
"Object_Access_Levels",1858821684,"U ",1,17,8451,272,0,0,"07/12/2002
02:09pm",0,272,0,"U ",1,115,0,"07/12/2002 02:09pm",0,,,,0,2560,0
Does anyone have a clue how I can fix this problem?
I am using SQL2K with SP3a.
TIA,
-Steve-Who is the owner of the object? I always make sure to create my tables this
way:
CREATE TABLE dbo.Object_Access_Levels
And always reference them with the prefix also:
SELECT * FROM dbo.Object_Access_Levels
DROP TABLE dbo.Object_Access_Levels
You can see the owner name by:
SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'Object_Access_Levels'
If TABLE_SCHEMA is not dbo, you should drop and re-create the table as dbo,
and always refer to it with the dbo. prefix.
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Steve Zimmelman" <sk_z@.psi_med.com> wrote in message
news:e50xOxeYEHA.808@.tk2msftngp13.phx.gbl...
>I have a really strange problem. It seems a table has gone invisible.
>It's
> listed in SysObjects, but does not show up in the tables list.
> When I execte "Select * From Object_Access_Levels", it raises the error
> "Invalid
> Object Name".
> If I try to [Drop Table Object_Access_Levels], it returns the error:
> "Cannot drop the table 'Object_Access_Levels' because it does not exist in
> the
> system catalog."
> If I follow the ID for the table to Syscolumns and SysIndexes, all the
> records
> are there.
> This is a complete show-stopper. I cannot continue development until this
> table
> is restored.
> Here's a copy of the record from sysobjects:
> name,id,xtype,uid,info,status,base_schema_ver,replinfo,parent_obj,crdate,ftcatid,
> schema_ver,stats_schema_ver,type,userstat,sysstat,indexdel,refdate,version,deltri
> g,instrig,updtrig,seltrig,category,cache
> "Object_Access_Levels",1858821684,"U ",1,17,8451,272,0,0,"07/12/2002
> 02:09pm",0,272,0,"U ",1,115,0,"07/12/2002 02:09pm",0,,,,0,2560,0
> Does anyone have a clue how I can fix this problem?
> I am using SQL2K with SP3a.
> TIA,
> -Steve-
>|||You may want to run DBCC CHECKCATALOG to check the system
tables.
Mark Baekdal
www.dbghost.com - the only true Database Change Manager
for SQL Server.
>--Original Message--
>I have a really strange problem. It seems a table has
gone invisible. It's
>listed in SysObjects, but does not show up in the tables
list.
>When I execte "Select * From Object_Access_Levels", it
raises the error "Invalid
>Object Name".
>If I try to [Drop Table Object_Access_Levels], it
returns the error:
> "Cannot drop the table 'Object_Access_Levels' because
it does not exist in the
>system catalog."
>If I follow the ID for the table to Syscolumns and
SysIndexes, all the records
>are there.
>This is a complete show-stopper. I cannot continue
development until this table
>is restored.
>Here's a copy of the record from sysobjects:
>name,id,xtype,uid,info,status,base_schema_ver,replinfo,pa
rent_obj,crdate,ftcatid,
>schema_ver,stats_schema_ver,type,userstat,sysstat,indexde
l,refdate,version,deltri
>g,instrig,updtrig,seltrig,category,cache
>"Object_Access_Levels",1858821684,"U ",1,17,8451,272,0,0,
"07/12/2002
>02:09pm",0,272,0,"U ",1,115,0,"07/12/2002
02:09pm",0,,,,0,2560,0
>Does anyone have a clue how I can fix this problem?
>I am using SQL2K with SP3a.
>TIA,
>-Steve-
>
>.
>|||Thanks Aaron,
The table has been in use for over a year. Everything was fine last week during
development. Then yesterday, I tried to run the app and got the error during the
load.
This SQL command returns an empty result.
[SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'Object_Access_Levels']
But as I stated, the table is listed in the SyObjects, SysIndexes, and
SysColumns.
Running: DBCC CHECKCATALOG ('MedMas') WITH NO_INFOMSGS
Returns this error:
[Table Corrupt: Object ID 1840725610 (object '1840725610') does not match between
'SYSCOLUMNS' and 'SYSOBJECTS']
It looks like SQL's internal table got hosed. Is there any way to fix this
without completely rebuilding the database?
-Steve-
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%239t8NTfYEHA.4004@.TK2MSFTNGP10.phx.gbl...
Who is the owner of the object? I always make sure to create my tables this
way:
CREATE TABLE dbo.Object_Access_Levels
And always reference them with the prefix also:
SELECT * FROM dbo.Object_Access_Levels
DROP TABLE dbo.Object_Access_Levels
You can see the owner name by:
SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'Object_Access_Levels'
If TABLE_SCHEMA is not dbo, you should drop and re-create the table as dbo,
and always refer to it with the dbo. prefix.
--
http://www.aspfaq.com/
(Reverse address to reply.)|||Hi Mark,
Running: DBCC CHECKCATALOG ('MedMas') WITH NO_INFOMSGS
Returns this error:
[Table Corrupt: Object ID 1840725610 (object '1840725610') does not match between
'SYSCOLUMNS' and 'SYSOBJECTS']
Is this fixable without rebuilding the database?
Thanks,
-Steve-
"mark baekdal" <anonymous@.discussions.microsoft.com> wrote in message
news:26ebb01c46255$b2dbd4b0$a301280a@.phx.gbl...
You may want to run DBCC CHECKCATALOG to check the system
tables.
Mark Baekdal
www.dbghost.com - the only true Database Change Manager
for SQL Server.|||BTW, I just checked the ID 1840725610, it doesn't belong the Object_Access_Levels
table. It belongs to a couple of params. I think this DB is really hosed!
-Steve-
"Steve Zimmelman" <sk_z@.psi_med.com> wrote in message
news:%23JR2N$oYEHA.1764@.TK2MSFTNGP10.phx.gbl...
Hi Mark,
Running: DBCC CHECKCATALOG ('MedMas') WITH NO_INFOMSGS
Returns this error:
[Table Corrupt: Object ID 1840725610 (object '1840725610') does not match between
'SYSCOLUMNS' and 'SYSOBJECTS']
Is this fixable without rebuilding the database?
Thanks,
-Steve-
"mark baekdal" <anonymous@.discussions.microsoft.com> wrote in message
news:26ebb01c46255$b2dbd4b0$a301280a@.phx.gbl...
You may want to run DBCC CHECKCATALOG to check the system
tables.
Mark Baekdal
www.dbghost.com - the only true Database Change Manager
for SQL Server.|||Steve,
Any idea what error message(s) you were getting? If
error 2513, check SQL Books Online for steps to possibly
resolve the inconsistency. Please ensure you have a
backup or copy of the .mdf & .ldf before you do anything.
HTH
Darren Fuller
>--Original Message--
>Hi Mark,
>Running: DBCC CHECKCATALOG ('MedMas') WITH NO_INFOMSGS
>Returns this error:
>[Table Corrupt: Object ID 1840725610
(object '1840725610') does not match between
>'SYSCOLUMNS' and 'SYSOBJECTS']
>Is this fixable without rebuilding the database?
>Thanks,
>-Steve-
>"mark baekdal" <anonymous@.discussions.microsoft.com>
wrote in message
>news:26ebb01c46255$b2dbd4b0$a301280a@.phx.gbl...
>You may want to run DBCC CHECKCATALOG to check the system
>tables.
>Mark Baekdal
>www.dbghost.com - the only true Database Change Manager
>for SQL Server.
>
>.
>|||After much wasted time, I restored an old copy of the db. I was under the
impression (apparently a false one) that SQL server didn't have these types
corruption problems.
Thanks everyone for your suggestions.
-Steve-|||Your impression is not false, we don't have these types of corruption
problems.
However, hardware can and does introduce all manner of corruptions that
manifest themselves in various ways. I would check your NT event logs and
SQL errorlog for IO susbsystem errors. Before restoring from your backup, I
would have recommended running DBCC CHECKDB to check for other corruptions.
In future, to avoid wasting time, you should call Product Support who will
be able to help you pinpoint the problem very quickly.
Regards.
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Steve Zimmelman" <sk_z@.psi_med.com> wrote in message
news:ermVPB6YEHA.1048@.tk2msftngp13.phx.gbl...
> After much wasted time, I restored an old copy of the db. I was under the
> impression (apparently a false one) that SQL server didn't have these
types
> corruption problems.
> Thanks everyone for your suggestions.
> -Steve-
>

Invalid Object Name - Weird Error - Help!

I have a really strange problem. It seems a table has gone invisible. It's
listed in SysObjects, but does not show up in the tables list.
When I execte "Select * From Object_Access_Levels", it raises the error "Inv
alid
Object Name".
If I try to [Drop Table Object_Access_Levels], it returns the error:
"Cannot drop the table 'Object_Access_Levels' because it does not exist in t
he
system catalog."
If I follow the ID for the table to Syscolumns and SysIndexes, all the recor
ds
are there.
This is a complete show-stopper. I cannot continue development until this t
able
is restored.
Here's a copy of the record from sysobjects:
name,id,xtype,uid,info,status,base_schem
a_ver,replinfo,parent_obj,crdate,ftc
atid,
schema_ver,stats_schema_ver,type,usersta
t,sysstat,indexdel,refdate,version,d
eltri
g,instrig,updtrig,seltrig,category,cache
"Object_Access_Levels",1858821684,"U ",1,17,8451,272,0,0,"07/12/2002
02:09pm",0,272,0,"U ",1,115,0,"07/12/2002 02:09pm",0,,,,0,2560,0
Does anyone have a clue how I can fix this problem?
I am using SQL2K with SP3a.
TIA,
-Steve-Who is the owner of the object? I always make sure to create my tables this
way:
CREATE TABLE dbo.Object_Access_Levels
And always reference them with the prefix also:
SELECT * FROM dbo.Object_Access_Levels
DROP TABLE dbo.Object_Access_Levels
You can see the owner name by:
SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'Object_Access_Levels'
If TABLE_SCHEMA is not dbo, you should drop and re-create the table as dbo,
and always refer to it with the dbo. prefix.
http://www.aspfaq.com/
(Reverse address to reply.)
"Steve Zimmelman" <sk_z@.psi_med.com> wrote in message
news:e50xOxeYEHA.808@.tk2msftngp13.phx.gbl...
>I have a really strange problem. It seems a table has gone invisible.
>It's
> listed in SysObjects, but does not show up in the tables list.
> When I execte "Select * From Object_Access_Levels", it raises the error
> "Invalid
> Object Name".
> If I try to [Drop Table Object_Access_Levels], it returns the error:
> "Cannot drop the table 'Object_Access_Levels' because it does not exist in
> the
> system catalog."
> If I follow the ID for the table to Syscolumns and SysIndexes, all the
> records
> are there.
> This is a complete show-stopper. I cannot continue development until this
> table
> is restored.
> Here's a copy of the record from sysobjects:
> name,id,xtype,uid,info,status,base_schem
a_ver,replinfo,parent_obj,crdate,f
tcatid,
> schema_ver,stats_schema_ver,type,usersta
t,sysstat,indexdel,refdate,version
,deltri
> g,instrig,updtrig,seltrig,category,cache
> "Object_Access_Levels",1858821684,"U ",1,17,8451,272,0,0,"07/12/2002
> 02:09pm",0,272,0,"U ",1,115,0,"07/12/2002 02:09pm",0,,,,0,2560,0
> Does anyone have a clue how I can fix this problem?
> I am using SQL2K with SP3a.
> TIA,
> -Steve-
>|||Thanks Aaron,
The table has been in use for over a year. Everything was fine last week du
ring
development. Then yesterday, I tried to run the app and got the error durin
g the
load.
This SQL command returns an empty result.
[SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'Object_Access_Levels']
But as I stated, the table is listed in the SyObjects, SysIndexes, and
SysColumns.
Running: DBCC CHECKCATALOG ('MedMas') WITH NO_INFOMSGS
Returns this error:
[Table Corrupt: Object ID 1840725610 (object '1840725610') does not matc
h between
'SYSCOLUMNS' and 'SYSOBJECTS']
It looks like SQL's internal table got hosed. Is there any way to fix this
without completely rebuilding the database?
-Steve-
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%239t8NTfYEHA.4004@.TK2MSFTNGP10.phx.gbl...
Who is the owner of the object? I always make sure to create my tables this
way:
CREATE TABLE dbo.Object_Access_Levels
And always reference them with the prefix also:
SELECT * FROM dbo.Object_Access_Levels
DROP TABLE dbo.Object_Access_Levels
You can see the owner name by:
SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'Object_Access_Levels'
If TABLE_SCHEMA is not dbo, you should drop and re-create the table as dbo,
and always refer to it with the dbo. prefix.
http://www.aspfaq.com/
(Reverse address to reply.)sql

Invalid Object Name - Weird Error - Help!

I have a really strange problem. It seems a table has gone invisible. It's
listed in SysObjects, but does not show up in the tables list.
When I execte "Select * From Object_Access_Levels", it raises the error "Invalid
Object Name".
If I try to [Drop Table Object_Access_Levels], it returns the error:
"Cannot drop the table 'Object_Access_Levels' because it does not exist in the
system catalog."
If I follow the ID for the table to Syscolumns and SysIndexes, all the records
are there.
This is a complete show-stopper. I cannot continue development until this table
is restored.
Here's a copy of the record from sysobjects:
name,id,xtype,uid,info,status,base_schema_ver,repl info,parent_obj,crdate,ftcatid,
schema_ver,stats_schema_ver,type,userstat,sysstat, indexdel,refdate,version,deltri
g,instrig,updtrig,seltrig,category,cache
"Object_Access_Levels",1858821684,"U ",1,17,8451,272,0,0,"07/12/2002
02:09pm",0,272,0,"U ",1,115,0,"07/12/2002 02:09pm",0,,,,0,2560,0
Does anyone have a clue how I can fix this problem?
I am using SQL2K with SP3a.
TIA,
-Steve-
Who is the owner of the object? I always make sure to create my tables this
way:
CREATE TABLE dbo.Object_Access_Levels
And always reference them with the prefix also:
SELECT * FROM dbo.Object_Access_Levels
DROP TABLE dbo.Object_Access_Levels
You can see the owner name by:
SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'Object_Access_Levels'
If TABLE_SCHEMA is not dbo, you should drop and re-create the table as dbo,
and always refer to it with the dbo. prefix.
http://www.aspfaq.com/
(Reverse address to reply.)
"Steve Zimmelman" <sk_z@.psi_med.com> wrote in message
news:e50xOxeYEHA.808@.tk2msftngp13.phx.gbl...
>I have a really strange problem. It seems a table has gone invisible.
>It's
> listed in SysObjects, but does not show up in the tables list.
> When I execte "Select * From Object_Access_Levels", it raises the error
> "Invalid
> Object Name".
> If I try to [Drop Table Object_Access_Levels], it returns the error:
> "Cannot drop the table 'Object_Access_Levels' because it does not exist in
> the
> system catalog."
> If I follow the ID for the table to Syscolumns and SysIndexes, all the
> records
> are there.
> This is a complete show-stopper. I cannot continue development until this
> table
> is restored.
> Here's a copy of the record from sysobjects:
> name,id,xtype,uid,info,status,base_schema_ver,repl info,parent_obj,crdate,ftcatid,
> schema_ver,stats_schema_ver,type,userstat,sysstat, indexdel,refdate,version,deltri
> g,instrig,updtrig,seltrig,category,cache
> "Object_Access_Levels",1858821684,"U ",1,17,8451,272,0,0,"07/12/2002
> 02:09pm",0,272,0,"U ",1,115,0,"07/12/2002 02:09pm",0,,,,0,2560,0
> Does anyone have a clue how I can fix this problem?
> I am using SQL2K with SP3a.
> TIA,
> -Steve-
>
|||Thanks Aaron,
The table has been in use for over a year. Everything was fine last week during
development. Then yesterday, I tried to run the app and got the error during the
load.
This SQL command returns an empty result.
[SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'Object_Access_Levels']
But as I stated, the table is listed in the SyObjects, SysIndexes, and
SysColumns.
Running: DBCC CHECKCATALOG ('MedMas') WITH NO_INFOMSGS
Returns this error:
[Table Corrupt: Object ID 1840725610 (object '1840725610') does not match between
'SYSCOLUMNS' and 'SYSOBJECTS']
It looks like SQL's internal table got hosed. Is there any way to fix this
without completely rebuilding the database?
-Steve-
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%239t8NTfYEHA.4004@.TK2MSFTNGP10.phx.gbl...
Who is the owner of the object? I always make sure to create my tables this
way:
CREATE TABLE dbo.Object_Access_Levels
And always reference them with the prefix also:
SELECT * FROM dbo.Object_Access_Levels
DROP TABLE dbo.Object_Access_Levels
You can see the owner name by:
SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'Object_Access_Levels'
If TABLE_SCHEMA is not dbo, you should drop and re-create the table as dbo,
and always refer to it with the dbo. prefix.
http://www.aspfaq.com/
(Reverse address to reply.)

Invalid Object Name

Ok I'm trying to connect to my easycgi.com MSSQL database.

I can connect OK.

My ID is in the db_owner group.

I can create and edit tables and data.I can open a table and see the data.I can view the SQL statement behind the open table (select * from Table) and execute it successfully.

But if I open a new query window and type "select * from [table]" (or any other query), no matter which table it is, I get an error:

Msg 208, Level 16, State 1, Line 1
Invalid object name '[table name]'.

I've searched the web and found this error plenty of times, usually associated with security or the schema. But all my objects are under dbo and I'm in db_owner... ?

Can you post the exact query you typed into the query analyzer?

|||

I'll go you one better:


|||

Try:

sp_help 'Messages'

or

SELECT*

FROMINFORMATION_SCHEMA.TABLES

and given what you've said, "SELECT USER" should return "dbo", correct?

|||

sp_help 'Messages' gives me this:

Msg 15009, Level 16, State 1, Procedure sp_help, Line 66
The object 'Messages' does not exist in database 'master' or is invalid for this operation.

SELECT *

FROM INFORMATION_SCHEMA.TABLES gives me:

master dbo spt_fallback_db BASE TABLE
master dbo spt_fallback_dev BASE TABLE
master dbo spt_fallback_usg BASE TABLE
master dbo spt_monitor BASE TABLE
master dbo spt_values BASE TABLE

SELECT user gives me "guest"... ? I'm logged on under my own ID.

|||

Ok I disconnected and reconnected, then went to options and told it to connect to my individual database and that seems to have done it... Never had to do that before but I guess querying interactively requires a direct connection to my DB. Strange.

Wednesday, March 21, 2012

Invalid object name

Hi,

I have two tables in differents databases : Master database : ServerInformation where there is a table called "Clientes" and Table "Documentos" in the Database Index2003

What I need to do via Trigger is update the table "Documentos" in the field "Cliente" everytime the "Clientes" table change the field 'Cliente'.

Im using the follow Trigger

CREATE TRIGGER UPDate_Documentos_Index2003 ON dbo.Clientes
FOR UPDATE
AS

UPDATE [dbo].[Index2003].[Documentos]
SET [dbo].[Index2003].[Documentos].Cliente = i.Cliente
FROM Inserted i
INNER JOIN [dbo].[Index2003].[Documentos] D
ON D.ID_Clientes = i.ID_Clientes

When I commit the change in the register "Clientes" arise the follow message :

Invalid object name 'dbo.Index2003.Documentos'

Have I doing something wrong ?

Thanks for attetion

Leonardo AlmeidaOriginally posted by vectords
Hi,

I have two tables in differents databases : Master database : ServerInformation where there is a table called "Clientes" and Table "Documentos" in the Database Index2003

What I need to do via Trigger is update the table "Documentos" in the field "Cliente" everytime the "Clientes" table change the field 'Cliente'.

Im using the follow Trigger

CREATE TRIGGER UPDate_Documentos_Index2003 ON dbo.Clientes
FOR UPDATE
AS

UPDATE [dbo].[Index2003].[Documentos]
SET [dbo].[Index2003].[Documentos].Cliente = i.Cliente
FROM Inserted i
INNER JOIN [dbo].[Index2003].[Documentos] D
ON D.ID_Clientes = i.ID_Clientes

When I commit the change in the register "Clientes" arise the follow message :

Invalid object name 'dbo.Index2003.Documentos'

Have I doing something wrong ?

Thanks for attetion

Leonardo Almeida

Nice try ;)

If you did not linked server - do it.

BOL: Use Accessing Linked Servers
After a linked server is created using sp_addlinkedserver, it can be accessed using:
Distributed queries. Accessing tables in the linked server through SELECT, INSERT, UPDATE, and DELETE statements using a linked server-based name (server.database.dbowner.object).|||More simply, you just qualified your table incorrectly. It should be

[Index2003].[dbo].[Documentos]

Invalid object name

I have a stored procedure that creates several temporary tables. When I call
this procedure from the Query Analyzer, it works just fine.
When I call the stored procedure through the DTS or from a query from the
reporting services, I get the error: Invalid object name '#NSLP'
#NSLP is the first temporary table. Any suggestions will be highly
appreciated.
Code for the stored procedure follows
CREATE PROCEDURE [dbo].[procGetSponsorApprovals]
@.iMonth AS integer
AS
SET NOCOUNT ON
CREATE TABLE dbo.#NSLP ( Sponsor varchar(10),
EligBkfstSevere Integer,
EligBkfst Integer,
EligLunch Integer,
EligSnack Integer
)
INSERT INTO #NSLP
SELECT
B.Sponsor,
Sum(CASE WHEN B.EligBkfstSeverePct > 40 THEN 1 ELSE 0 END) AS
EligBkfstSevere,
Sum(CASE WHEN EligBkfst = 'Regular' or EligBkfst = 'Prov1' or
EligBkfst = 'Prov2' or EligBkfst = 'Prov3' THEN 1 ELSE 0 END) AS EligBkfst,
Sum(CASE WHEN EligLunch = 'Regular' or EligLunch = 'Prov1' or
EligLunch = 'Prov2' or EligLunch = 'Prov3' THEN 1 ELSE 0 END) AS EligLunch,
Sum(CASE WHEN EligSnack = 'Regular' or EligSnack = 'Prov1' or
EligSnack = 'Prov2' or EligSnack = 'Prov3' THEN 1 ELSE 0 END) AS EligSnack
FROM tblSLPAppCenter B,
(SELECT MAX(K.EnteredDate) AS EnteredDate ,
K.AgreementNo AS AgreementNo
FROM tblSLPAppCenter K
WHERE (K.StartMonth <= @.iMonth) AND (K.EndMonth >= @.iMonth) AND
(Status IN ('Approved','Suspended'))
GROUP BY K.AgreementNo) U
WHERE B.EnteredDate = U.EnteredDate AND B.AgreementNo = U.AgreementNo
GROUP BY Sponsor
ORDER BY sponsor
CREATE TABLE #DCCenter (Sponsor varchar(10), DCCenters integer)
INSERT INTO #DCCenter
SELECT
B.Sponsor,
Count(*) AS DCCenters
FROM tblDCAppCenter B,
(SELECT MAX(K.EnteredDate) AS EnteredDate ,
K.AgreementNo AS AgreementNo
FROM tblDCAppCenter K
WHERE (K.StartMonth <= @.iMonth) AND (K.EndMonth >= @.iMonth) AND
(Status IN ('Approved','Suspended'))
GROUP BY K.AgreementNo) U
WHERE B.EnteredDate = U.EnteredDate AND B.AgreementNo = U.AgreementNo
GROUP BY Sponsor
ORDER BY sponsor
CREATE TABLE #ACCenter (Sponsor varchar(10), ACCenters integer)
INSERT INTO #ACCenter
SELECT
B.Sponsor,
Count(*) AS ACCenters
FROM tblACAppCenter B,
(SELECT MAX(K.EnteredDate) AS EnteredDate ,
K.AgreementNo AS AgreementNo
FROM tblACAppCenter K
WHERE (K.StartMonth <= @.iMonth) AND (K.EndMonth >= @.iMonth) AND
(Status IN ('Approved','Suspended'))
GROUP BY K.AgreementNo) U
WHERE B.EnteredDate = U.EnteredDate AND B.AgreementNo = U.AgreementNo
GROUP BY Sponsor
ORDER BY sponsor
CREATE TABLE #SMCenter (Sponsor varchar(10), SMCenters integer)
INSERT INTO #SMCenter
SELECT
B.Sponsor,
Count(*) AS SMCenters
FROM tblSMAppCenter B,
(SELECT MAX(K.EnteredDate) AS EnteredDate ,
K.AgreementNo AS AgreementNo
FROM tblSMAppCenter K
WHERE (K.StartMonth <= @.iMonth) AND (K.EndMonth >= @.iMonth) AND
(Status IN ('Approved','Suspended'))
GROUP BY K.AgreementNo) U
WHERE B.EnteredDate = U.EnteredDate AND B.AgreementNo = U.AgreementNo
GROUP BY Sponsor
ORDER BY sponsor
CREATE TABLE #SFCenter (Sponsor varchar(10), SFCenters integer)
INSERT INTO #SFCenter
SELECT
B.Sponsor,
Count(*) AS SFCenters
FROM tblSFAppCenter B,
(SELECT MAX(K.EnteredDate) AS EnteredDate ,
K.AgreementNo AS AgreementNo
FROM tblSFAppCenter K
WHERE (K.StartMonth <= @.iMonth) AND (K.EndMonth >= @.iMonth) AND
(Status IN ('Approved','Suspended'))
GROUP BY K.AgreementNo) U
WHERE B.EnteredDate = U.EnteredDate AND B.AgreementNo = U.AgreementNo
GROUP BY Sponsor
ORDER BY sponsor
CREATE TABLE #SSFCenter (Sponsor varchar(10), SSFCenters integer)
INSERT INTO #SSFCenter
SELECT
B.Sponsor,
Count(*) AS SSFCenters
FROM tblSSFAppCenter B,
(SELECT MAX(K.EnteredDate) AS EnteredDate ,
K.AgreementNo AS AgreementNo
FROM tblSSFAppCenter K
WHERE (K.StartMonth <= @.iMonth) AND (K.EndMonth >= @.iMonth) AND
(Status IN ('Approved','Suspended'))
GROUP BY K.AgreementNo) U
WHERE B.EnteredDate = U.EnteredDate AND B.AgreementNo = U.AgreementNo
GROUP BY Sponsor
ORDER BY sponsor
SELECT
A.AgreementNo,
A.SponsorName,
CASE WHEN isnull(A.SLP,' ') = 'Y' THEN 'Y' ELSE '_' END AS [Ever SLP],
CASE WHEN isnull(A.DC,' ') = 'Y' THEN 'Y' ELSE '_' END AS [Ever DC],
CASE WHEN isnull(A.AC,' ') = 'Y' THEN 'Y' ELSE '_' END AS [Ever AC],
CASE WHEN isnull(A.SM,' ') = 'Y' THEN 'Y' ELSE '_' END AS [Ever SH],
CASE WHEN isnull(A.FH,' ') = 'Y' THEN 'Y' ELSE '_' END AS [Ever FH],
CASE WHEN isnull(A.SF,' ') = 'Y' THEN 'Y' ELSE '_' END AS [Ever SF],
isnull((SELECT 'Y'
FROM dbo.fnAdminSLP('All', @.iMonth)
WHERE AgreementNo = A.AgreementNo AND
(Status = 'Approved' OR Status = 'Suspended')),'_') AS [SLP Sponsor],
isnull((SELECT EligLunch
FROM #NSLP
WHERE Sponsor = A.AgreementNo AND
EligLunch > 0 ),0) AS NSLP,
isnull((SELECT EligBkfst
FROM #NSLP
WHERE Sponsor = A.AgreementNo AND
EligBkfst > 0 ),0) AS Brk,
isnull((SELECT EligBkfstSevere
FROM #NSLP
WHERE Sponsor = A.AgreementNo AND
EligBkfstSevere > 0 ),0) AS SevereBrk,
isnull((SELECT EligSnack
FROM #NSLP
WHERE Sponsor = A.AgreementNo AND
EligSnack > 0 ),0) AS ASSnk,
isnull((SELECT 'Y'
FROM dbo.fnAdminDC('All', @.iMonth)
WHERE AgreementNo = A.AgreementNo AND
(Status = 'Approved' OR Status = 'Suspended')),'_')
AS [DC Sponsor],
isnull((SELECT DCCenters
FROM #DCCenter
WHERE Sponsor = A.AgreementNo AND
DCCenters > 0 ),0) AS [DC Centers],
isnull((SELECT 'Y'
FROM dbo.fnAdminAC('All', @.iMonth)
WHERE AgreementNo = A.AgreementNo),'_') AS [AC Sponsor],
isnull((SELECT ACCenters
FROM #ACCenter
WHERE Sponsor = A.AgreementNo AND
ACCenters > 0 ),0) AS [AC Centers],
isnull((SELECT 'Y'
FROM dbo.fnAdminFH('All', @.iMonth)
WHERE AgreementNo = A.AgreementNo),'_') AS [FH Sponsor],
isnull((SELECT 'Y'
FROM dbo.fnAdminSM('All', @.iMonth)
WHERE AgreementNo = A.AgreementNo),'_') AS [SM Sponsor],
isnull((SELECT SMCenters
FROM #SMCenter
WHERE Sponsor = A.AgreementNo AND
SMCenters > 0 ),0) AS [SM Centers],
isnull((SELECT 'Y'
FROM dbo.fnAdminSF('All', @.iMonth)
WHERE AgreementNo = A.AgreementNo),'_') AS [SF Sponsor],
isnull((SELECT SFCenters
FROM #SFCenter
WHERE Sponsor = A.AgreementNo AND
SFCenters > 0 ),0) AS [SF Centers],
isnull((SELECT 'Y'
FROM dbo.fnAdminSSF('All', @.iMonth)
WHERE AgreementNo = A.AgreementNo),'_') AS [SSF Sponsor],
isnull((SELECT SSFCenters
FROM #SSFCenter
WHERE Sponsor = A.AgreementNo AND
SSFCenters > 0 ),0) AS [SSF Centers],
isnull(Type, '') as Type
FROM tblAgreeData A
WHERE Sponsor <> 0 and AgreementNo NOT like 'OO%'
ORDER BY AgreementNo
GOTry to press the refresh button next to the data source. This will populate
all the fields for you. There are also some other replies to this question
just search for Invalid object in the newsgroup and you should see other
people making suggestions to this. Hope this helps. Let me know if this is
what you are looking for or if you have a different question.
Brendon Schwartz
http://spaces.msn.com/members/brendon
"Ron Sellers" wrote:
> I have a stored procedure that creates several temporary tables. When I call
> this procedure from the Query Analyzer, it works just fine.
> When I call the stored procedure through the DTS or from a query from the
> reporting services, I get the error: Invalid object name '#NSLP'
> #NSLP is the first temporary table. Any suggestions will be highly
> appreciated.
>
> Code for the stored procedure follows
> CREATE PROCEDURE [dbo].[procGetSponsorApprovals]
> @.iMonth AS integer
> AS
> SET NOCOUNT ON
> CREATE TABLE dbo.#NSLP ( Sponsor varchar(10),
> EligBkfstSevere Integer,
> EligBkfst Integer,
> EligLunch Integer,
> EligSnack Integer
> )
> INSERT INTO #NSLP
> SELECT
> B.Sponsor,
> Sum(CASE WHEN B.EligBkfstSeverePct > 40 THEN 1 ELSE 0 END) AS
> EligBkfstSevere,
> Sum(CASE WHEN EligBkfst = 'Regular' or EligBkfst = 'Prov1' or
> EligBkfst = 'Prov2' or EligBkfst = 'Prov3' THEN 1 ELSE 0 END) AS EligBkfst,
> Sum(CASE WHEN EligLunch = 'Regular' or EligLunch = 'Prov1' or
> EligLunch = 'Prov2' or EligLunch = 'Prov3' THEN 1 ELSE 0 END) AS EligLunch,
> Sum(CASE WHEN EligSnack = 'Regular' or EligSnack = 'Prov1' or
> EligSnack = 'Prov2' or EligSnack = 'Prov3' THEN 1 ELSE 0 END) AS EligSnack
> FROM tblSLPAppCenter B,
> (SELECT MAX(K.EnteredDate) AS EnteredDate ,
> K.AgreementNo AS AgreementNo
> FROM tblSLPAppCenter K
> WHERE (K.StartMonth <= @.iMonth) AND (K.EndMonth >=> @.iMonth) AND
> (Status IN ('Approved','Suspended'))
> GROUP BY K.AgreementNo) U
> WHERE B.EnteredDate = U.EnteredDate AND B.AgreementNo = U.AgreementNo
> GROUP BY Sponsor
> ORDER BY sponsor
> CREATE TABLE #DCCenter (Sponsor varchar(10), DCCenters integer)
> INSERT INTO #DCCenter
> SELECT
> B.Sponsor,
> Count(*) AS DCCenters
> FROM tblDCAppCenter B,
> (SELECT MAX(K.EnteredDate) AS EnteredDate ,
> K.AgreementNo AS AgreementNo
> FROM tblDCAppCenter K
> WHERE (K.StartMonth <= @.iMonth) AND (K.EndMonth >=> @.iMonth) AND
> (Status IN ('Approved','Suspended'))
> GROUP BY K.AgreementNo) U
> WHERE B.EnteredDate = U.EnteredDate AND B.AgreementNo = U.AgreementNo
> GROUP BY Sponsor
> ORDER BY sponsor
>
> CREATE TABLE #ACCenter (Sponsor varchar(10), ACCenters integer)
> INSERT INTO #ACCenter
> SELECT
> B.Sponsor,
> Count(*) AS ACCenters
> FROM tblACAppCenter B,
> (SELECT MAX(K.EnteredDate) AS EnteredDate ,
> K.AgreementNo AS AgreementNo
> FROM tblACAppCenter K
> WHERE (K.StartMonth <= @.iMonth) AND (K.EndMonth >=> @.iMonth) AND
> (Status IN ('Approved','Suspended'))
> GROUP BY K.AgreementNo) U
> WHERE B.EnteredDate = U.EnteredDate AND B.AgreementNo = U.AgreementNo
> GROUP BY Sponsor
> ORDER BY sponsor
> CREATE TABLE #SMCenter (Sponsor varchar(10), SMCenters integer)
> INSERT INTO #SMCenter
> SELECT
> B.Sponsor,
> Count(*) AS SMCenters
> FROM tblSMAppCenter B,
> (SELECT MAX(K.EnteredDate) AS EnteredDate ,
> K.AgreementNo AS AgreementNo
> FROM tblSMAppCenter K
> WHERE (K.StartMonth <= @.iMonth) AND (K.EndMonth >=> @.iMonth) AND
> (Status IN ('Approved','Suspended'))
> GROUP BY K.AgreementNo) U
> WHERE B.EnteredDate = U.EnteredDate AND B.AgreementNo = U.AgreementNo
> GROUP BY Sponsor
> ORDER BY sponsor
> CREATE TABLE #SFCenter (Sponsor varchar(10), SFCenters integer)
> INSERT INTO #SFCenter
> SELECT
> B.Sponsor,
> Count(*) AS SFCenters
> FROM tblSFAppCenter B,
> (SELECT MAX(K.EnteredDate) AS EnteredDate ,
> K.AgreementNo AS AgreementNo
> FROM tblSFAppCenter K
> WHERE (K.StartMonth <= @.iMonth) AND (K.EndMonth >=> @.iMonth) AND
> (Status IN ('Approved','Suspended'))
> GROUP BY K.AgreementNo) U
> WHERE B.EnteredDate = U.EnteredDate AND B.AgreementNo = U.AgreementNo
> GROUP BY Sponsor
> ORDER BY sponsor
>
> CREATE TABLE #SSFCenter (Sponsor varchar(10), SSFCenters integer)
> INSERT INTO #SSFCenter
> SELECT
> B.Sponsor,
> Count(*) AS SSFCenters
> FROM tblSSFAppCenter B,
> (SELECT MAX(K.EnteredDate) AS EnteredDate ,
> K.AgreementNo AS AgreementNo
> FROM tblSSFAppCenter K
> WHERE (K.StartMonth <= @.iMonth) AND (K.EndMonth >=> @.iMonth) AND
> (Status IN ('Approved','Suspended'))
> GROUP BY K.AgreementNo) U
> WHERE B.EnteredDate = U.EnteredDate AND B.AgreementNo = U.AgreementNo
> GROUP BY Sponsor
> ORDER BY sponsor
> SELECT
> A.AgreementNo,
> A.SponsorName,
> CASE WHEN isnull(A.SLP,' ') = 'Y' THEN 'Y' ELSE '_' END AS [Ever SLP],
> CASE WHEN isnull(A.DC,' ') = 'Y' THEN 'Y' ELSE '_' END AS [Ever DC],
> CASE WHEN isnull(A.AC,' ') = 'Y' THEN 'Y' ELSE '_' END AS [Ever AC],
> CASE WHEN isnull(A.SM,' ') = 'Y' THEN 'Y' ELSE '_' END AS [Ever SH],
> CASE WHEN isnull(A.FH,' ') = 'Y' THEN 'Y' ELSE '_' END AS [Ever FH],
> CASE WHEN isnull(A.SF,' ') = 'Y' THEN 'Y' ELSE '_' END AS [Ever SF],
> isnull((SELECT 'Y'
> FROM dbo.fnAdminSLP('All', @.iMonth)
> WHERE AgreementNo = A.AgreementNo AND
> (Status = 'Approved' OR Status => 'Suspended')),'_') AS [SLP Sponsor],
> isnull((SELECT EligLunch
> FROM #NSLP
> WHERE Sponsor = A.AgreementNo AND
> EligLunch > 0 ),0) AS NSLP,
> isnull((SELECT EligBkfst
> FROM #NSLP
> WHERE Sponsor = A.AgreementNo AND
> EligBkfst > 0 ),0) AS Brk,
> isnull((SELECT EligBkfstSevere
> FROM #NSLP
> WHERE Sponsor = A.AgreementNo AND
> EligBkfstSevere > 0 ),0) AS SevereBrk,
> isnull((SELECT EligSnack
> FROM #NSLP
> WHERE Sponsor = A.AgreementNo AND
> EligSnack > 0 ),0) AS ASSnk,
> isnull((SELECT 'Y'
> FROM dbo.fnAdminDC('All', @.iMonth)
> WHERE AgreementNo = A.AgreementNo AND
> (Status = 'Approved' OR Status = 'Suspended')),'_')
> AS [DC Sponsor],
> isnull((SELECT DCCenters
> FROM #DCCenter
> WHERE Sponsor = A.AgreementNo AND
> DCCenters > 0 ),0) AS [DC Centers],
> isnull((SELECT 'Y'
> FROM dbo.fnAdminAC('All', @.iMonth)
> WHERE AgreementNo = A.AgreementNo),'_') AS [AC Sponsor],
> isnull((SELECT ACCenters
> FROM #ACCenter
> WHERE Sponsor = A.AgreementNo AND
> ACCenters > 0 ),0) AS [AC Centers],
> isnull((SELECT 'Y'
> FROM dbo.fnAdminFH('All', @.iMonth)
> WHERE AgreementNo = A.AgreementNo),'_') AS [FH Sponsor],
> isnull((SELECT 'Y'
> FROM dbo.fnAdminSM('All', @.iMonth)
> WHERE AgreementNo = A.AgreementNo),'_') AS [SM Sponsor],
> isnull((SELECT SMCenters
> FROM #SMCenter
> WHERE Sponsor = A.AgreementNo AND
> SMCenters > 0 ),0) AS [SM Centers],
> isnull((SELECT 'Y'
> FROM dbo.fnAdminSF('All', @.iMonth)
> WHERE AgreementNo = A.AgreementNo),'_') AS [SF Sponsor],
> isnull((SELECT SFCenters
> FROM #SFCenter
> WHERE Sponsor = A.AgreementNo AND
> SFCenters > 0 ),0) AS [SF Centers],
> isnull((SELECT 'Y'
> FROM dbo.fnAdminSSF('All', @.iMonth)
> WHERE AgreementNo = A.AgreementNo),'_') AS [SSF Sponsor],
> isnull((SELECT SSFCenters
> FROM #SSFCenter
> WHERE Sponsor = A.AgreementNo AND
> SSFCenters > 0 ),0) AS [SSF Centers],
> isnull(Type, '') as Type
> FROM tblAgreeData A
> WHERE Sponsor <> 0 and AgreementNo NOT like 'OO%'
> ORDER BY AgreementNo
> GO
>|||Have you tried using table variables instead of temp tables? On the surface,
they provide the same functionality, but may be treated differently by RS.
"Ron Sellers" <RonSellers@.discussions.microsoft.com> wrote in message
news:73374365-09D9-41B8-8B35-FD7E7B382264@.microsoft.com...
>I have a stored procedure that creates several temporary tables. When I
>call
> this procedure from the Query Analyzer, it works just fine.
> When I call the stored procedure through the DTS or from a query from the
> reporting services, I get the error: Invalid object name '#NSLP'
> #NSLP is the first temporary table. Any suggestions will be highly
> appreciated.
>
> Code for the stored procedure follows
> CREATE PROCEDURE [dbo].[procGetSponsorApprovals]
> @.iMonth AS integer
> AS
> SET NOCOUNT ON
> CREATE TABLE dbo.#NSLP ( Sponsor varchar(10),
> EligBkfstSevere Integer,
> EligBkfst Integer,
> EligLunch Integer,
> EligSnack Integer
> )
> INSERT INTO #NSLP
> SELECT
> B.Sponsor,
> Sum(CASE WHEN B.EligBkfstSeverePct > 40 THEN 1 ELSE 0 END) AS
> EligBkfstSevere,
> Sum(CASE WHEN EligBkfst = 'Regular' or EligBkfst = 'Prov1' or
> EligBkfst = 'Prov2' or EligBkfst = 'Prov3' THEN 1 ELSE 0 END) AS
> EligBkfst,
> Sum(CASE WHEN EligLunch = 'Regular' or EligLunch = 'Prov1' or
> EligLunch = 'Prov2' or EligLunch = 'Prov3' THEN 1 ELSE 0 END) AS
> EligLunch,
> Sum(CASE WHEN EligSnack = 'Regular' or EligSnack = 'Prov1' or
> EligSnack = 'Prov2' or EligSnack = 'Prov3' THEN 1 ELSE 0 END) AS EligSnack
> FROM tblSLPAppCenter B,
> (SELECT MAX(K.EnteredDate) AS EnteredDate ,
> K.AgreementNo AS AgreementNo
> FROM tblSLPAppCenter K
> WHERE (K.StartMonth <= @.iMonth) AND (K.EndMonth
> >=> @.iMonth) AND
> (Status IN
> ('Approved','Suspended'))
> GROUP BY K.AgreementNo) U
> WHERE B.EnteredDate = U.EnteredDate AND B.AgreementNo = U.AgreementNo
> GROUP BY Sponsor
> ORDER BY sponsor
> CREATE TABLE #DCCenter (Sponsor varchar(10), DCCenters integer)
> INSERT INTO #DCCenter
> SELECT
> B.Sponsor,
> Count(*) AS DCCenters
> FROM tblDCAppCenter B,
> (SELECT MAX(K.EnteredDate) AS EnteredDate ,
> K.AgreementNo AS AgreementNo
> FROM tblDCAppCenter K
> WHERE (K.StartMonth <= @.iMonth) AND (K.EndMonth
> >=> @.iMonth) AND
> (Status IN
> ('Approved','Suspended'))
> GROUP BY K.AgreementNo) U
> WHERE B.EnteredDate = U.EnteredDate AND B.AgreementNo = U.AgreementNo
> GROUP BY Sponsor
> ORDER BY sponsor
>
> CREATE TABLE #ACCenter (Sponsor varchar(10), ACCenters integer)
> INSERT INTO #ACCenter
> SELECT
> B.Sponsor,
> Count(*) AS ACCenters
> FROM tblACAppCenter B,
> (SELECT MAX(K.EnteredDate) AS EnteredDate ,
> K.AgreementNo AS AgreementNo
> FROM tblACAppCenter K
> WHERE (K.StartMonth <= @.iMonth) AND (K.EndMonth
> >=> @.iMonth) AND
> (Status IN
> ('Approved','Suspended'))
> GROUP BY K.AgreementNo) U
> WHERE B.EnteredDate = U.EnteredDate AND B.AgreementNo = U.AgreementNo
> GROUP BY Sponsor
> ORDER BY sponsor
> CREATE TABLE #SMCenter (Sponsor varchar(10), SMCenters integer)
> INSERT INTO #SMCenter
> SELECT
> B.Sponsor,
> Count(*) AS SMCenters
> FROM tblSMAppCenter B,
> (SELECT MAX(K.EnteredDate) AS EnteredDate ,
> K.AgreementNo AS AgreementNo
> FROM tblSMAppCenter K
> WHERE (K.StartMonth <= @.iMonth) AND (K.EndMonth
> >=> @.iMonth) AND
> (Status IN
> ('Approved','Suspended'))
> GROUP BY K.AgreementNo) U
> WHERE B.EnteredDate = U.EnteredDate AND B.AgreementNo = U.AgreementNo
> GROUP BY Sponsor
> ORDER BY sponsor
> CREATE TABLE #SFCenter (Sponsor varchar(10), SFCenters integer)
> INSERT INTO #SFCenter
> SELECT
> B.Sponsor,
> Count(*) AS SFCenters
> FROM tblSFAppCenter B,
> (SELECT MAX(K.EnteredDate) AS EnteredDate ,
> K.AgreementNo AS AgreementNo
> FROM tblSFAppCenter K
> WHERE (K.StartMonth <= @.iMonth) AND (K.EndMonth
> >=> @.iMonth) AND
> (Status IN
> ('Approved','Suspended'))
> GROUP BY K.AgreementNo) U
> WHERE B.EnteredDate = U.EnteredDate AND B.AgreementNo = U.AgreementNo
> GROUP BY Sponsor
> ORDER BY sponsor
>
> CREATE TABLE #SSFCenter (Sponsor varchar(10), SSFCenters integer)
> INSERT INTO #SSFCenter
> SELECT
> B.Sponsor,
> Count(*) AS SSFCenters
> FROM tblSSFAppCenter B,
> (SELECT MAX(K.EnteredDate) AS EnteredDate ,
> K.AgreementNo AS AgreementNo
> FROM tblSSFAppCenter K
> WHERE (K.StartMonth <= @.iMonth) AND (K.EndMonth
> >=> @.iMonth) AND
> (Status IN
> ('Approved','Suspended'))
> GROUP BY K.AgreementNo) U
> WHERE B.EnteredDate = U.EnteredDate AND B.AgreementNo = U.AgreementNo
> GROUP BY Sponsor
> ORDER BY sponsor
> SELECT
> A.AgreementNo,
> A.SponsorName,
> CASE WHEN isnull(A.SLP,' ') = 'Y' THEN 'Y' ELSE '_' END AS [Ever SLP],
> CASE WHEN isnull(A.DC,' ') = 'Y' THEN 'Y' ELSE '_' END AS [Ever DC],
> CASE WHEN isnull(A.AC,' ') = 'Y' THEN 'Y' ELSE '_' END AS [Ever AC],
> CASE WHEN isnull(A.SM,' ') = 'Y' THEN 'Y' ELSE '_' END AS [Ever SH],
> CASE WHEN isnull(A.FH,' ') = 'Y' THEN 'Y' ELSE '_' END AS [Ever FH],
> CASE WHEN isnull(A.SF,' ') = 'Y' THEN 'Y' ELSE '_' END AS [Ever SF],
> isnull((SELECT 'Y'
> FROM dbo.fnAdminSLP('All', @.iMonth)
> WHERE AgreementNo = A.AgreementNo AND
> (Status = 'Approved' OR Status => 'Suspended')),'_') AS [SLP Sponsor],
> isnull((SELECT EligLunch
> FROM #NSLP
> WHERE Sponsor = A.AgreementNo AND
> EligLunch > 0 ),0) AS NSLP,
> isnull((SELECT EligBkfst
> FROM #NSLP
> WHERE Sponsor = A.AgreementNo AND
> EligBkfst > 0 ),0) AS Brk,
> isnull((SELECT EligBkfstSevere
> FROM #NSLP
> WHERE Sponsor = A.AgreementNo AND
> EligBkfstSevere > 0 ),0) AS SevereBrk,
> isnull((SELECT EligSnack
> FROM #NSLP
> WHERE Sponsor = A.AgreementNo AND
> EligSnack > 0 ),0) AS ASSnk,
> isnull((SELECT 'Y'
> FROM dbo.fnAdminDC('All', @.iMonth)
> WHERE AgreementNo = A.AgreementNo AND
> (Status = 'Approved' OR Status = 'Suspended')),'_')
> AS [DC Sponsor],
> isnull((SELECT DCCenters
> FROM #DCCenter
> WHERE Sponsor = A.AgreementNo AND
> DCCenters > 0 ),0) AS [DC Centers],
> isnull((SELECT 'Y'
> FROM dbo.fnAdminAC('All', @.iMonth)
> WHERE AgreementNo = A.AgreementNo),'_') AS [AC Sponsor],
> isnull((SELECT ACCenters
> FROM #ACCenter
> WHERE Sponsor = A.AgreementNo AND
> ACCenters > 0 ),0) AS [AC Centers],
> isnull((SELECT 'Y'
> FROM dbo.fnAdminFH('All', @.iMonth)
> WHERE AgreementNo = A.AgreementNo),'_') AS [FH Sponsor],
> isnull((SELECT 'Y'
> FROM dbo.fnAdminSM('All', @.iMonth)
> WHERE AgreementNo = A.AgreementNo),'_') AS [SM Sponsor],
> isnull((SELECT SMCenters
> FROM #SMCenter
> WHERE Sponsor = A.AgreementNo AND
> SMCenters > 0 ),0) AS [SM Centers],
> isnull((SELECT 'Y'
> FROM dbo.fnAdminSF('All', @.iMonth)
> WHERE AgreementNo = A.AgreementNo),'_') AS [SF Sponsor],
> isnull((SELECT SFCenters
> FROM #SFCenter
> WHERE Sponsor = A.AgreementNo AND
> SFCenters > 0 ),0) AS [SF Centers],
> isnull((SELECT 'Y'
> FROM dbo.fnAdminSSF('All', @.iMonth)
> WHERE AgreementNo = A.AgreementNo),'_') AS [SSF Sponsor],
> isnull((SELECT SSFCenters
> FROM #SSFCenter
> WHERE Sponsor = A.AgreementNo AND
> SSFCenters > 0 ),0) AS [SSF Centers],
> isnull(Type, '') as Type
> FROM tblAgreeData A
> WHERE Sponsor <> 0 and AgreementNo NOT like 'OO%'
> ORDER BY AgreementNo
> GO
>sql

Invalid object name

Hi,

I have two tables in differents databases : Master database :
ServerInformation where there is a table called "Clientes" and Table
"Documentos" in the Database Index2003

What I need to do via Trigger is update the table "Documentos" in the
field "Cliente" everytime the "Clientes" table change the field
'Cliente'.

Im using the follow Trigger

CREATE TRIGGER UPDate_Documentos_Index2003 ON dbo.Clientes
FOR UPDATE
AS

UPDATE [dbo].[Index2003].[Documentos]
SET [dbo].[Index2003].[Documentos].Cliente = i.Cliente
FROM Inserted i
INNER JOIN [dbo].[Index2003].[Documentos] D
ON D.ID_Clientes = i.ID_Clientes

When I commit the change in the register "Clientes" arise the follow
message :

Invalid object name 'dbo.Index2003.Documentos'

Have I doing something wrong ?

Thanks for attetion

Leonardo Almeida

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!Try this (untested):

CREATE TRIGGER UPDate_Documentos_Index2003 ON dbo.Clientes FOR UPDATE
AS

UPDATE [Index2003].[dbo].[Documentos]
SET Cliente =
(SELECT Cliente
FROM inserted
WHERE ID_Clientes =
[Index2003].[dbo].[Documentos].ID_Clientes)
WHERE ID_Clientes
IN (SELECT ID_Clientes FROM inserted)

--
David Portas
----
Please reply only to the newsgroup
--|||Leonardo Almeida (leonardoalmeida2004@.yahoo.com.br) writes:
> CREATE TRIGGER UPDate_Documentos_Index2003 ON dbo.Clientes
> FOR UPDATE
> AS
> UPDATE [dbo].[Index2003].[Documentos]
> SET [dbo].[Index2003].[Documentos].Cliente = i.Cliente
> FROM Inserted i
> INNER JOIN [dbo].[Index2003].[Documentos] D
> ON D.ID_Clientes = i.ID_Clientes
>
> When I commit the change in the register "Clientes" arise the follow
> message :
> Invalid object name 'dbo.Index2003.Documentos'

You have swapped database name and ownername. Use Index2003..Documentos
instead.

Also, in the left-hand side of the SET-clause, you should use any
prefix at all.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

invalid name

When I try to save tables. It gives me an ODBC[Microssoft server] invalid name 'id'. Can you please help with this
Where and how are you trying to save the tables/
Rand
This posting is provided "as is" with no warranties and confers no rights.
sql

invalid name

When I try to save tables. It gives me an ODBC[Microssoft server] inval
id name 'id'. Can you please help with thisWhere and how are you trying to save the tables/
Rand
This posting is provided "as is" with no warranties and confers no rights.

Monday, March 19, 2012

Invalid entries in sysindexes

Hi all,
I am running an INDEXDEFRAG on all tables in the database and am receiving
the following error:
DBCC INDEXDEFRAG (msdgen, 279500991, pmshr_iv_inventory_trans_init)
Server: Msg 7999, Level 16, State 8, Line 1
Could not find any index named 'pmshr_iv_inventory_trans_init' for table
'pmshr_iv_inventory_trans_init'.
DBCC execution completed. If DBCC printed error messages, contact your
system administrator.
I looked in the sysindexes table and these entries exist, but from the EM if
you right click the table and choose Manage Indexes they are not present.
I am receiving this on 23 tables/indexes in the the entire DB and am
wondering if there is a way to remove the invalid entries programmatically.
Let me know and thanks for reading,
Jon BrabhamJon Brabham wrote:
> Hi all,
> I am receiving this on 23 tables/indexes in the the entire DB and am
> wondering if there is a way to remove the invalid entries programmatically
.
> Let me know and thanks for reading,
> Jon Brabham
>
Do this at your own risk...
/* Allow direct modification of system tables */
EXEC sp_configure allow, 1
RECONFIGURE WITH OVERRIDE
GO
USE database_name
GO
/* Backup sysindexes table, just in case */
SELECT * INTO sysindexes_bak FROM sysindexes
DELETE FROM sysindexes WHERE name = index_name
GO
/* Dis-allow direct modification of system tables */
EXEC sp_configure allow, 0
RECONFIGURE WITH OVERRIDE
GO
/* Recreate the dropped index */
CREATE INDEX index_name ON table_name (key definitions)|||Jon
I'd not follow Tracy's advice because it is really risky to deal with
system tables.
Run DBCC CHECKDB first and see whether it retruns errors or not.
"Jon Brabham" <jbrabham@.hsesystems.com> wrote in message
news:eZ1EEBYkGHA.408@.TK2MSFTNGP03.phx.gbl...
> Hi all,
> I am running an INDEXDEFRAG on all tables in the database and am receiving
> the following error:
> DBCC INDEXDEFRAG (msdgen, 279500991, pmshr_iv_inventory_trans_init)
> Server: Msg 7999, Level 16, State 8, Line 1
> Could not find any index named 'pmshr_iv_inventory_trans_init' for table
> 'pmshr_iv_inventory_trans_init'.
> DBCC execution completed. If DBCC printed error messages, contact your
> system administrator.
> I looked in the sysindexes table and these entries exist, but from the EM
> if you right click the table and choose Manage Indexes they are not
> present.
> I am receiving this on 23 tables/indexes in the the entire DB and am
> wondering if there is a way to remove the invalid entries
> programmatically.
> Let me know and thanks for reading,
> Jon Brabham
>|||Yeah I agree, good to know though.
I noticed that all of the indexes that happened to be giving me this error
had an sysindexes.indid of 0 so I just filtered them out.
If anyone knows a good way to automatically re-certify all the data in these
tables it would also be good to know.
Thanks for the replies!
Jon
ID of index:
1 = Clustered index
>1 = Nonclustered
255 = Entry for tables that have text or image data
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:Ox7vKvpkGHA.1600@.TK2MSFTNGP04.phx.gbl...
> Jon
> I'd not follow Tracy's advice because it is really risky to deal with
> system tables.
> Run DBCC CHECKDB first and see whether it retruns errors or not.
>
> "Jon Brabham" <jbrabham@.hsesystems.com> wrote in message
> news:eZ1EEBYkGHA.408@.TK2MSFTNGP03.phx.gbl...
>|||Uri Dimant wrote:
> Jon
> I'd not follow Tracy's advice because it is really risky to deal with
> system tables.
>
Question was "wondering if there is a way to remove the invalid entries
programmatically", I responded with a way to do just that, qualified
with "Do this at your own risk". Wasn't recommended that he do it, I
was answering his question.

Invalid cursor state

Problem with dsigning tables. when changing datatype, size
etc'
i get message:
ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid
cursor state
microsoft is reffering to: http://support.microsoft.com/?
kbid=831997
but there is nothing there that can fix the problem
what can i do to fix it?
Thankseran,shalom
Check out if the log file is full, what is recovery model of the log file?
<eranv@.gat.co.il> wrote in message
news:369601c48812$bb6d5530$a301280a@.phx.gbl...
> Problem with dsigning tables. when changing datatype, size
> etc'
> i get message:
> ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid
> cursor state
> microsoft is reffering to: http://support.microsoft.com/?
> kbid=831997
> but there is nothing there that can fix the problem
> what can i do to fix it?
> Thanks|||Uri hi and thanks for responding,
The log file is not full and the mode is set to "simple"
this error occurs on all tables and in every database. I
think it has something to do with hotfix or patch that we
installed after sp3a
we are working around that problem by recreating the
tables everytime a change is needed. you can imagin how
hard it is to work like that.
thanks again
Eran
.

>--Original Message--
>eran,shalom
>Check out if the log file is full, what is recovery model
of the log file?
>
><eranv@.gat.co.il> wrote in message
>news:369601c48812$bb6d5530$a301280a@.phx.gbl...
size[vbcol=seagreen]
http://support.microsoft.com/?[vbcol=seagreen]
>
>.
>|||Eran
I see, have you looked at http://support.microsoft.com/?kbid=821334
Do you have the same MDAC on the client and server?
<anonymous@.discussions.microsoft.com> wrote in message
news:acf101c48834$30264d70$a601280a@.phx.gbl...[vbcol=seagreen]
> Uri hi and thanks for responding,
> The log file is not full and the mode is set to "simple"
> this error occurs on all tables and in every database. I
> think it has something to do with hotfix or patch that we
> installed after sp3a
> we are working around that problem by recreating the
> tables everytime a change is needed. you can imagin how
> hard it is to work like that.
> thanks again
> Eran
> .
>
> of the log file?
> size
> http://support.microsoft.com/?|||yes the MDAC versions are the same. the error message
occurs also when working directly on the server.
a general search led me to http://support.microsoft.com/?
kbid=831997
and i think that the link discribes an issue somewhat
relevant, however i could not find a workaround or hotfix
to correct the problem.

>--Original Message--
>Eran
>I see, have you looked at http://support.microsoft.com/?
kbid=821334
>Do you have the same MDAC on the client and server?
>
><anonymous@.discussions.microsoft.com> wrote in message
>news:acf101c48834$30264d70$a601280a@.phx.gbl...
we[vbcol=seagreen]
model[vbcol=seagreen]
Invalid[vbcol=seagreen]
>
>.
>|||Eran
You may want to delete the hotfix and re-install sp3.
<anonymous@.discussions.microsoft.com> wrote in message
news:ad1f01c4883a$cd180280$a601280a@.phx.gbl...[vbcol=seagreen]
> yes the MDAC versions are the same. the error message
> occurs also when working directly on the server.
> a general search led me to http://support.microsoft.com/?
> kbid=831997
> and i think that the link discribes an issue somewhat
> relevant, however i could not find a workaround or hotfix
> to correct the problem.
>
> kbid=821334
> we
> model
> Invalid

Invalid cursor state

Problem with dsigning tables. when changing datatype, size
etc'
i get message:
ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid
cursor state
microsoft is reffering to: http://support.microsoft.com/?
kbid=831997
but there is nothing there that can fix the problem
what can i do to fix it?
Thankseran,shalom
Check out if the log file is full, what is recovery model of the log file?
<eranv@.gat.co.il> wrote in message
news:369601c48812$bb6d5530$a301280a@.phx.gbl...
> Problem with dsigning tables. when changing datatype, size
> etc'
> i get message:
> ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid
> cursor state
> microsoft is reffering to: http://support.microsoft.com/?
> kbid=831997
> but there is nothing there that can fix the problem
> what can i do to fix it?
> Thanks|||Uri hi and thanks for responding,
The log file is not full and the mode is set to "simple"
this error occurs on all tables and in every database. I
think it has something to do with hotfix or patch that we
installed after sp3a
we are working around that problem by recreating the
tables everytime a change is needed. you can imagin how
hard it is to work like that.
thanks again
Eran
.
>--Original Message--
>eran,shalom
>Check out if the log file is full, what is recovery model
of the log file?
>
><eranv@.gat.co.il> wrote in message
>news:369601c48812$bb6d5530$a301280a@.phx.gbl...
>> Problem with dsigning tables. when changing datatype,
size
>> etc'
>> i get message:
>> ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid
>> cursor state
>> microsoft is reffering to:
http://support.microsoft.com/?
>> kbid=831997
>> but there is nothing there that can fix the problem
>> what can i do to fix it?
>> Thanks
>
>.
>|||Eran
I see, have you looked at http://support.microsoft.com/?kbid=821334
Do you have the same MDAC on the client and server?
<anonymous@.discussions.microsoft.com> wrote in message
news:acf101c48834$30264d70$a601280a@.phx.gbl...
> Uri hi and thanks for responding,
> The log file is not full and the mode is set to "simple"
> this error occurs on all tables and in every database. I
> think it has something to do with hotfix or patch that we
> installed after sp3a
> we are working around that problem by recreating the
> tables everytime a change is needed. you can imagin how
> hard it is to work like that.
> thanks again
> Eran
> .
>
> >--Original Message--
> >eran,shalom
> >Check out if the log file is full, what is recovery model
> of the log file?
> >
> >
> ><eranv@.gat.co.il> wrote in message
> >news:369601c48812$bb6d5530$a301280a@.phx.gbl...
> >> Problem with dsigning tables. when changing datatype,
> size
> >> etc'
> >> i get message:
> >> ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid
> >> cursor state
> >>
> >> microsoft is reffering to:
> http://support.microsoft.com/?
> >> kbid=831997
> >> but there is nothing there that can fix the problem
> >> what can i do to fix it?
> >>
> >> Thanks
> >
> >
> >.
> >|||yes the MDAC versions are the same. the error message
occurs also when working directly on the server.
a general search led me to http://support.microsoft.com/?
kbid=831997
and i think that the link discribes an issue somewhat
relevant, however i could not find a workaround or hotfix
to correct the problem.
>--Original Message--
>Eran
>I see, have you looked at http://support.microsoft.com/?
kbid=821334
>Do you have the same MDAC on the client and server?
>
><anonymous@.discussions.microsoft.com> wrote in message
>news:acf101c48834$30264d70$a601280a@.phx.gbl...
>> Uri hi and thanks for responding,
>> The log file is not full and the mode is set to "simple"
>> this error occurs on all tables and in every database. I
>> think it has something to do with hotfix or patch that
we
>> installed after sp3a
>> we are working around that problem by recreating the
>> tables everytime a change is needed. you can imagin how
>> hard it is to work like that.
>> thanks again
>> Eran
>> .
>>
>> >--Original Message--
>> >eran,shalom
>> >Check out if the log file is full, what is recovery
model
>> of the log file?
>> >
>> >
>> ><eranv@.gat.co.il> wrote in message
>> >news:369601c48812$bb6d5530$a301280a@.phx.gbl...
>> >> Problem with dsigning tables. when changing datatype,
>> size
>> >> etc'
>> >> i get message:
>> >> ODBC error: [Microsoft][ODBC SQL Server Driver]
Invalid
>> >> cursor state
>> >>
>> >> microsoft is reffering to:
>> http://support.microsoft.com/?
>> >> kbid=831997
>> >> but there is nothing there that can fix the problem
>> >> what can i do to fix it?
>> >>
>> >> Thanks
>> >
>> >
>> >.
>> >
>
>.
>|||Eran
You may want to delete the hotfix and re-install sp3.
<anonymous@.discussions.microsoft.com> wrote in message
news:ad1f01c4883a$cd180280$a601280a@.phx.gbl...
> yes the MDAC versions are the same. the error message
> occurs also when working directly on the server.
> a general search led me to http://support.microsoft.com/?
> kbid=831997
> and i think that the link discribes an issue somewhat
> relevant, however i could not find a workaround or hotfix
> to correct the problem.
> >--Original Message--
> >Eran
> >I see, have you looked at http://support.microsoft.com/?
> kbid=821334
> >Do you have the same MDAC on the client and server?
> >
> >
> ><anonymous@.discussions.microsoft.com> wrote in message
> >news:acf101c48834$30264d70$a601280a@.phx.gbl...
> >> Uri hi and thanks for responding,
> >> The log file is not full and the mode is set to "simple"
> >> this error occurs on all tables and in every database. I
> >> think it has something to do with hotfix or patch that
> we
> >> installed after sp3a
> >> we are working around that problem by recreating the
> >> tables everytime a change is needed. you can imagin how
> >> hard it is to work like that.
> >> thanks again
> >> Eran
> >> .
> >>
> >>
> >> >--Original Message--
> >> >eran,shalom
> >> >Check out if the log file is full, what is recovery
> model
> >> of the log file?
> >> >
> >> >
> >> ><eranv@.gat.co.il> wrote in message
> >> >news:369601c48812$bb6d5530$a301280a@.phx.gbl...
> >> >> Problem with dsigning tables. when changing datatype,
> >> size
> >> >> etc'
> >> >> i get message:
> >> >> ODBC error: [Microsoft][ODBC SQL Server Driver]
> Invalid
> >> >> cursor state
> >> >>
> >> >> microsoft is reffering to:
> >> http://support.microsoft.com/?
> >> >> kbid=831997
> >> >> but there is nothing there that can fix the problem
> >> >> what can i do to fix it?
> >> >>
> >> >> Thanks
> >> >
> >> >
> >> >.
> >> >
> >
> >
> >.
> >

Invalid cursor state

Problem with dsigning tables. when changing datatype, size
etc'
i get message:
ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid
cursor state
microsoft is reffering to: http://support.microsoft.com/?
kbid=831997
but there is nothing there that can fix the problem
what can i do to fix it?
Thanks
eran,shalom
Check out if the log file is full, what is recovery model of the log file?
<eranv@.gat.co.il> wrote in message
news:369601c48812$bb6d5530$a301280a@.phx.gbl...
> Problem with dsigning tables. when changing datatype, size
> etc'
> i get message:
> ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid
> cursor state
> microsoft is reffering to: http://support.microsoft.com/?
> kbid=831997
> but there is nothing there that can fix the problem
> what can i do to fix it?
> Thanks
|||Uri hi and thanks for responding,
The log file is not full and the mode is set to "simple"
this error occurs on all tables and in every database. I
think it has something to do with hotfix or patch that we
installed after sp3a
we are working around that problem by recreating the
tables everytime a change is needed. you can imagin how
hard it is to work like that.
thanks again
Eran
..

>--Original Message--
>eran,shalom
>Check out if the log file is full, what is recovery model
of the log file?[vbcol=seagreen]
>
><eranv@.gat.co.il> wrote in message
>news:369601c48812$bb6d5530$a301280a@.phx.gbl...
size[vbcol=seagreen]
http://support.microsoft.com/?
>
>.
>
|||Eran
I see, have you looked at http://support.microsoft.com/?kbid=821334
Do you have the same MDAC on the client and server?
<anonymous@.discussions.microsoft.com> wrote in message
news:acf101c48834$30264d70$a601280a@.phx.gbl...[vbcol=seagreen]
> Uri hi and thanks for responding,
> The log file is not full and the mode is set to "simple"
> this error occurs on all tables and in every database. I
> think it has something to do with hotfix or patch that we
> installed after sp3a
> we are working around that problem by recreating the
> tables everytime a change is needed. you can imagin how
> hard it is to work like that.
> thanks again
> Eran
> .
>
> of the log file?
> size
> http://support.microsoft.com/?
|||yes the MDAC versions are the same. the error message
occurs also when working directly on the server.
a general search led me to http://support.microsoft.com/?
kbid=831997
and i think that the link discribes an issue somewhat
relevant, however i could not find a workaround or hotfix
to correct the problem.

>--Original Message--
>Eran
>I see, have you looked at http://support.microsoft.com/?
kbid=821334[vbcol=seagreen]
>Do you have the same MDAC on the client and server?
>
><anonymous@.discussions.microsoft.com> wrote in message
>news:acf101c48834$30264d70$a601280a@.phx.gbl...
we[vbcol=seagreen]
model[vbcol=seagreen]
Invalid
>
>.
>
|||Eran
You may want to delete the hotfix and re-install sp3.
<anonymous@.discussions.microsoft.com> wrote in message
news:ad1f01c4883a$cd180280$a601280a@.phx.gbl...[vbcol=seagreen]
> yes the MDAC versions are the same. the error message
> occurs also when working directly on the server.
> a general search led me to http://support.microsoft.com/?
> kbid=831997
> and i think that the link discribes an issue somewhat
> relevant, however i could not find a workaround or hotfix
> to correct the problem.
> kbid=821334
> we
> model
> Invalid

Friday, March 9, 2012

Invalid character value for cast specification error

I'm using Access 2K via ODBC to replicated SQL Server 2K. In some tables (not all) when I try to add a record either with a form or directly in the datasheet I get this error message and all form controls/table cells display '#Name?'. The record is added
and displays correctly if I close and reopen the form/table. I can add records with no problem in Enterprise Manager.
Any help gratefully received.
Jonathan Attree
Hi, I am getting exactly the same problem although this problem has only occurred since I implemented merge replication. Does anyone have an answer?
Amanda

Wednesday, March 7, 2012

Intra-query parallelism caused deadlock

Hi,
I am running a select query , which used left join on 5 tables. this is
reporting server there are no data updates, only select stmts. it has been
failing at runtime , the same query is running fine with different
parameters.
It is Dell machine with 4cpu/6gig /sql ent 2000/windows 2000 adv. max
degree of parallelism is 0 (before i change) , when i set max degree of
parallelism to 1 , then the query did run fine. As I remeber i havent
changed any configuration recently.
The query failed with following message.
Server: Msg 8650, Level 13, State 127, Line 1
Intra-query parallelism caused your server command (process ID #63) to
deadlock. Rerun the query without intra-query parallelism by using the query
hint option (maxdop 1).
Can somebody explain what caused it.
Thanks,
Subbu.
Hi!
Do please check the article at http://support.microsoft.com/?kbid=837983.
You will find possible reasons & workarounds there.
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"Subbaiahd" <subbaiahd@.hotmail.com> wrote in message
news:ewpo438gEHA.3264@.tk2msftngp13.phx.gbl...
> Hi,
> I am running a select query , which used left join on 5 tables. this is
> reporting server there are no data updates, only select stmts. it has been
> failing at runtime , the same query is running fine with different
> parameters.
> It is Dell machine with 4cpu/6gig /sql ent 2000/windows 2000 adv. max
> degree of parallelism is 0 (before i change) , when i set max degree of
> parallelism to 1 , then the query did run fine. As I remeber i havent
> changed any configuration recently.
>
> The query failed with following message.
> Server: Msg 8650, Level 13, State 127, Line 1
> Intra-query parallelism caused your server command (process ID #63) to
> deadlock. Rerun the query without intra-query parallelism by using the
query
> hint option (maxdop 1).
>
> Can somebody explain what caused it.
> Thanks,
> Subbu.
>
>
|||Thank you. I found it later.
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si > wrote in
message news:OUAafLChEHA.2916@.TK2MSFTNGP12.phx.gbl...[vbcol=seagreen]
> Hi!
> Do please check the article at http://support.microsoft.com/?kbid=837983.
> You will find possible reasons & workarounds there.
> --
> Dejan Sarka, SQL Server MVP
> Associate Mentor
> Solid Quality Learning
> More than just Training
> www.SolidQualityLearning.com
> "Subbaiahd" <subbaiahd@.hotmail.com> wrote in message
> news:ewpo438gEHA.3264@.tk2msftngp13.phx.gbl...
been
> query
>