Sunday, February 26, 2012

Error using configurations files

I wanted to add all my configurations/vairbles in a config file, so I’d tried to use the Package Configuration Organizer, to create and enable package configurations…

If I want the config to contain information regarding on of my connection manageres, the package fails during test, with the following msg:

Information: 0x40016041 at OrcaleToSQLServer: The package is attempting to configure from the XML file "BDK_LABasedataDTS_config.dtsConfig".

SSIS package "OrcaleToSQLServer.dtsx" starting.

Information: 0x4004300A at Transfer data from Oracle To SQL server, DTS.Pipeline: Validation phase is beginning.

Error: 0xC0202009 at OrcaleToSQLServer, Connection manager "XXXXX.xxxx": An OLE DB error has occurred. Error code: 0x80040E21.

An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040E21 Description: "Der opstod en eller flere fejl ved en OLE DB-handling p? flere trin. Kontroller alle OLE DB-statusv?rdier. Handlingen blev ikke udf?rt.".

Error: 0xC020801C at Transfer data from Oracle To SQL server, OLE DB Source to Orcale [1]: The AcquireConnection method call to the connection manager "LASYS.lakig" failed with error code 0xC0202009.

Error: 0xC0047017 at Transfer data from Oracle To SQL server, DTS.Pipeline: component "OLE DB Source to Orcale" (1) failed validation and returned error code 0xC020801C.

Error: 0xC004700C at Transfer data from Oracle To SQL server, DTS.Pipeline: One or more component failed validation.

Error: 0xC0024107 at Transfer data from Oracle To SQL server: There were errors during task validation.

SSIS package "OrcaleToSQLServer.dtsx" finished: Failure.

Translation Danish line:

Der opstod en eller flere fejl ved en OLE DB-handling p? flere trin. Kontroller alle OLE DB-statusv?rdier. Handlingen blev ikke udf?rt -> One or more errors regarding a OLE DB-action on serveral steps. Check all OLE DB-statevalues… the action was not carried out..

See if there's anything here for you:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=142282&SiteID=1|||

Thanx...

I got it working, by ading a password to the connection string... and by disregarding all properties for at that connection manager, and just sticking to the connection string...

Your link was most helpful, thx.

Error using CDOSYS in a process

Hi !
I created a backup process that sends me an email (CDOSYS) with the result
of this operation, following the instructions at
http://support.microsoft.com/defaul...;312839&sd=tech
The problem is that the stored procedure sp_send_cdosysmail crashes if it's
run inside a SQL Server 2000 SP3a process (schedule or manual execution is
the same) but it run fine if I use query analyzer to exec the sp. Process
and query analyzer window have a single TSQL instruction (exec...) but the
SQL Server Agent keeps on stopping after a while with an error (I don't
remember the message but it was something like "not responding after 30
secs") if I run the process.
What could it be ? Thank you.
Mauro CastaldiI strongly suggest using CDO within sp_OACreate. Try using xp_smtp_sendmail
instead... http://www.aspfaq.com/2403
http://www.aspfaq.com/
(Reverse address to reply.)
"Mauro Castaldi" <no.spam.kastaldi@.hotmail.com> wrote in message
news:41e10c24$0$8209$5fc30a8@.news.tiscali.it...
> Hi !
> I created a backup process that sends me an email (CDOSYS) with the result
> of this operation, following the instructions at
> http://support.microsoft.com/defaul...;312839&sd=tech
> The problem is that the stored procedure sp_send_cdosysmail crashes if
it's
> run inside a SQL Server 2000 SP3a process (schedule or manual execution is
> the same) but it run fine if I use query analyzer to exec the sp. Process
> and query analyzer window have a single TSQL instruction (exec...) but the
> SQL Server Agent keeps on stopping after a while with an error (I don't
> remember the message but it was something like "not responding after 30
> secs") if I run the process.
> What could it be ? Thank you.
> Mauro Castaldi
>

Error using CDOSYS in a process

Hi !
I created a backup process that sends me an email (CDOSYS) with the result
of this operation, following the instructions at
http://support.microsoft.com/default.aspx?scid=kb;en-us;312839&sd=tech
The problem is that the stored procedure sp_send_cdosysmail crashes if it's
run inside a SQL Server 2000 SP3a process (schedule or manual execution is
the same) but it run fine if I use query analyzer to exec the sp. Process
and query analyzer window have a single TSQL instruction (exec...) but the
SQL Server Agent keeps on stopping after a while with an error (I don't
remember the message but it was something like "not responding after 30
secs") if I run the process.
What could it be ? Thank you.
Mauro CastaldiI strongly suggest using CDO within sp_OACreate. Try using xp_smtp_sendmail
instead... http://www.aspfaq.com/2403
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Mauro Castaldi" <no.spam.kastaldi@.hotmail.com> wrote in message
news:41e10c24$0$8209$5fc30a8@.news.tiscali.it...
> Hi !
> I created a backup process that sends me an email (CDOSYS) with the result
> of this operation, following the instructions at
> http://support.microsoft.com/default.aspx?scid=kb;en-us;312839&sd=tech
> The problem is that the stored procedure sp_send_cdosysmail crashes if
it's
> run inside a SQL Server 2000 SP3a process (schedule or manual execution is
> the same) but it run fine if I use query analyzer to exec the sp. Process
> and query analyzer window have a single TSQL instruction (exec...) but the
> SQL Server Agent keeps on stopping after a while with an error (I don't
> remember the message but it was something like "not responding after 30
> secs") if I run the process.
> What could it be ? Thank you.
> Mauro Castaldi
>

Error using CDOSYS in a process

Hi !
I created a backup process that sends me an email (CDOSYS) with the result
of this operation, following the instructions at
http://support.microsoft.com/default...312839&sd=tech
The problem is that the stored procedure sp_send_cdosysmail crashes if it's
run inside a SQL Server 2000 SP3a process (schedule or manual execution is
the same) but it run fine if I use query analyzer to exec the sp. Process
and query analyzer window have a single TSQL instruction (exec...) but the
SQL Server Agent keeps on stopping after a while with an error (I don't
remember the message but it was something like "not responding after 30
secs") if I run the process.
What could it be ? Thank you.
Mauro Castaldi
I strongly suggest using CDO within sp_OACreate. Try using xp_smtp_sendmail
instead... http://www.aspfaq.com/2403
http://www.aspfaq.com/
(Reverse address to reply.)
"Mauro Castaldi" <no.spam.kastaldi@.hotmail.com> wrote in message
news:41e10c24$0$8209$5fc30a8@.news.tiscali.it...
> Hi !
> I created a backup process that sends me an email (CDOSYS) with the result
> of this operation, following the instructions at
> http://support.microsoft.com/default...312839&sd=tech
> The problem is that the stored procedure sp_send_cdosysmail crashes if
it's
> run inside a SQL Server 2000 SP3a process (schedule or manual execution is
> the same) but it run fine if I use query analyzer to exec the sp. Process
> and query analyzer window have a single TSQL instruction (exec...) but the
> SQL Server Agent keeps on stopping after a while with an error (I don't
> remember the message but it was something like "not responding after 30
> secs") if I run the process.
> What could it be ? Thank you.
> Mauro Castaldi
>

ERROR USING BULK INSERT

Hi
I'm executing
declare @.ARCHIVOidx varchar(300)
set @.ARCHIVOidx = (Select top 1 MyFile from task)
declare @.sentencia varchar(300)
set @.sentencia = 'bulk insert a from ''' + @.ARCHIVOidx+'''' + ' with
(formatfile ='''+'c:\input\bcpfmt.txt' + ''',batchsize=100) '
exec (@.sentencia)
and the SQL says:
Server: Msg 3624, Level 20, State 1, Line 1
Location: record.cpp:825
Expression: newColLen >= WideTextPointer::OVERHEAD
SPID: 51
Process ID: 3420
ODBC: Msg 0, Level 16, State 1
Communication link failure
Connection Broken
The event viewer says
18052 : Error: 3624, Severity: 20, State: 1.
THE machine has (SQL DEV):
WIN XP SP1 (Pentium 4), with 40 Gb HD (free 10 Gb), Memory 512 Mb
SQL WITH SP3
What can I do?
Thanks a lot> exec (@.sentencia)
Change this to PRINT @.sentencia and see if what it yields makes sense, also
try executing this manually.|||ok
The output is:
bulk insert a from 'C:\input\bankAA.idx' with (formatfile
='c:\input\bcpfmt.txt',batchsize=100)
"Aaron Bertrand [SQL Server MVP]" wrote:

> Change this to PRINT @.sentencia and see if what it yields makes sense, als
o
> try executing this manually.
>
>|||The Sintax is OK.
The server inserts 600.000 records and generate error, however
using a smaller file it does not generate error. The original file has 2
million registries, the second 600,000 registries (with errors).
The Tsql generates error with the greatest archives
"Macisu" wrote:
> ok
> The output is:
> bulk insert a from 'C:\input\bankAA.idx' with (formatfile
> ='c:\input\bcpfmt.txt',batchsize=100)
>
> "Aaron Bertrand [SQL Server MVP]" wrote:
>|||Okay, now, what happened when you ran this command manually?
"Macisu" <Macisu@.discussions.microsoft.com> wrote in message
news:98CA0497-3E9A-4407-8628-9D51BBBE1434@.microsoft.com...
> ok
> The output is:
> bulk insert a from 'C:\input\bankAA.idx' with (formatfile
> ='c:\input\bcpfmt.txt',batchsize=100)
>
> "Aaron Bertrand [SQL Server MVP]" wrote:
>|||> The Sintax is OK.
I understand that. Which is why I suggested RUNNING the code, not just
looking at it.

> The server inserts 600.000 records and generate error, however
> using a smaller file it does not generate error.
So have you considered using the MAXERRORS parameter? Or cleaning the file
before builk inserting it? Obviously the one with errors in it is failing
because there are rows with errors.
By "smaller file" do you really mean "a file that does not happen to include
any rows that cause an error"?|||The command ran ok, the command generates error 6 mins after executing itsel
f,
when the table has 600.000 records aprox.
"Aaron Bertrand [SQL Server MVP]" wrote:

> Okay, now, what happened when you ran this command manually?
>
>
> "Macisu" <Macisu@.discussions.microsoft.com> wrote in message
> news:98CA0497-3E9A-4407-8628-9D51BBBE1434@.microsoft.com...
>
>|||> The command ran ok, the command generates error
Uh, could you be more specific?|||"Aaron Bertrand [SQL Server MVP]" wrote:

> Uh, could you be more specific?
>
>
the window output says
(100 row(s) affected)
(100 row(s) affected)
(100 row(s) affected)
(100 row(s) affected)
(100 row(s) affected)
(100 row(s) affected)
Server: Msg 3624, Level 20, State 1, Line 1
Location: record.cpp:825
Expression: newColLen >= WideTextPointer::OVERHEAD
SPID: 53
Process ID: 3420
ODBC: Msg 0, Level 16, State 1
Communication link failure
Connection Broken
Query batch completed with errors|||This may be a bug, but I have a couple of questions:
Can you post the format file?
Can you try MAXERRORS = 1 and also MAXERRORS = 100, and see if the
problem moves to a different place than around 600000 rows? (By
default, MAXERRORS is 10.)
Can you watch the computer's memory and virtual memory use to see if it
is going up and up to the max before the crash?
Steve Kass
Drew University
Macisu wrote:

>Hi
>I'm executing
>declare @.ARCHIVOidx varchar(300)
>set @.ARCHIVOidx = (Select top 1 MyFile from task)
>declare @.sentencia varchar(300)
>set @.sentencia = 'bulk insert a from ''' + @.ARCHIVOidx+'''' + ' with
>(formatfile ='''+'c:\input\bcpfmt.txt' + ''',batchsize=100) '
>exec (@.sentencia)
>and the SQL says:
>Server: Msg 3624, Level 20, State 1, Line 1
>Location: record.cpp:825
>Expression: newColLen >= WideTextPointer::OVERHEAD
>SPID: 51
>Process ID: 3420
>ODBC: Msg 0, Level 16, State 1
>Communication link failure
>Connection Broken
>
>The event viewer says
>18052 : Error: 3624, Severity: 20, State: 1.
>THE machine has (SQL DEV):
>WIN XP SP1 (Pentium 4), with 40 Gb HD (free 10 Gb), Memory 512 Mb
>SQL WITH SP3
>What can I do?
>Thanks a lot
>
>
>
>

error using bcp util?

from BOL

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/sqlcmpt9/html/c0af54f5-ca4a-4995-a3a4-0ce39c30ec38.htm

I'm trying to run this sample

bcp AdventureWorks.Sales.Currency format nul -T -c -x -f Currency.xmlSQLState = 28000, NativeError = 18456
Error = [Microsoft][SQL Native Client][SQL Server]Login failed for user 'AD-ENT\loeca01'.
SQLState = 08S01, NativeError = 4
Error = [Microsoft][SQL Native Client]Shared Memory Provider: The system cannot open the file.SQLState = 08S01, NativeError = 4
Error = [Microsoft][SQL Native Client]Communication link failure
SQLState = 42000, NativeError = 4060
Error = [Microsoft][SQL Native Client][SQL Server]Cannot open database requested in login 'AdventureWorks'. Login fails.
I don't have any issue accessing the database from management studio and I have enabled all the protocols.what's up do I need to setup some other permissions someplace in the file system or something?How many instances of SQL Server 2000 and 2005 do you have on your machine|||

bcp AdventureWorks.Sales.Currency format nul -T -c -x -f Currency.xml -S RCSDMN1B5120B7Q\SQL_2005

worked....

|||If you don't specify a server it will try and connect to your default instance which is not the one with adventureworks on it thus the error.

error using Analysis Sevices in Web

Hi, i have question when i'm publishig a web page with a cube inside, the component displays the next error:

the html element at line 1, column6 (namespache) cannot appear under

then i log on into my server to the analysys Services and i can browse my cube without any problems, but the page just cannot show it, any suggestions?

thnks!!!

right... i should've been more especific. the problem was the conexion..i'm usign a web service to achieve this.. somehow.. this component caused some errors in the server...so i added a new one and changed the mappings in the web page...this solved the problem correctly

thanks anyway.. hope this helps to some of you!!

Error using /SET

I have a data importing .dtsx file that I would like to point towards another server on occasion. I tried:

DTEXEC /FILE "fubar.dtsx" /SET "\Package.Connections[ConnectionManagerName].Properties[ConnectionString];Data Source=NEWSVR;Initial Catalog=Fubar;Provider=SQLNCLI;Integrated Security=SSPI;Auto Translate=False;" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EWCDI

but I keep getting the error:

Argument ""\Package.Connections[ConnectionManagerName].Properties[ConnectionString];Data Source=NEWSVR;Initial Catalog=Fubar;Provider=SQLNCLI;Integrated Security=SSPI;Auto Translate=False;"" for option "set" is not valid.

Staring at the XML within the .dtsx file gave me no insight other than I suspect the "ConnectionManagerName" is the problem. How do I figure out the magic incantation? It's definitely not as trivial as using '-S NEWSVR' on SQLCMD!
You need to put double quotes around the connection string, first of all.

You also might want to try using the /CONN switch instead. Search this forum for examples.

Error Using # Temporary Tables in Query for Creating Reports

I am encountering error while creating a report using SQL
with # temporary tables. Here's a sample code using the
Adventureworks database:
CREATE TABLE #PRODUCTDETAILS(
[WEIGHT] [FLOAT] NULL ,
[PRODUCTNUMBER] [NVARCHAR] (25) COLLATE
SQL_LATIN1_GENERAL_CP1_CI_AS NULL ,
[STANDARDPRICE] [MONEY] NULL
) ON [PRIMARY]
INSERT INTO #PRODUCTDETAILS
SELECT WEIGHT,
PRODUCTNUMBER,
STANDARDPRICE
FROM PRODUCT A,
PRODUCTVENDOR B
WHERE A.PRODUCTID = B.PRODUCTID
SELECT * FROM #PRODUCTDETAILS
I tried to create a new report (using the wizard) with the
following SQL in the query section. When I click on the
next button, I get an error "There is an error in the
query. Invalid object name '#productdetails'". I also
tried to compile the below statements into a stored
procedure, but I get the same error when I try to generate
the report using the stored procedure.
However I found out that if I create the report manually
(without the wizard) and type all the field names as per
the output of the query, the query runs successfully in the
Data tab and I am able to generate the report.
Well, considering the fact that I have about 800 reports
to be based on stored procedures using # temporary tables,
it would be a collosal task to manually create so many
reports. I am looking for an automated way of doing this
task.
Please help!Report Designer has a graphical query designer (VDT) and text based query
designer (GQD - Generic Query Designer). When you are in Data view you can
switch between the two by clicking the third button from the left on the
query designer toolbar. Temp tables can be used provided you use the GQD.
The GQD has a couple of variations: one for stored procedures and on for
table direct. You can activate these by changing the command type to stored
procedure or table direct on the Data Set dialog.
Report Wizard only uses the VDT which means it will not work with temp
tables.
Here are a couple of suggestions for reusing reports and data sources:
Have you checked into using shared data sources? These allow you to define a
data source once and reuse it among all the reports in a project.
If your reports have a similar structure approximate template behavior by
creating the specific report you want and then placing it in
C:\ProgramFiles\Microsoft SQL Server\80\Tools\Report
Designer\ProjectItems\ReportProject directory. These reports "templates"
will show up in Report Designer's Add New Item dialog along with the Report
Wizard, Report, and Data Source templates when you add a new report to a
project.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Amar Karande" <akarande@.yahoo.com> wrote in message
news:2497501c45f84$90d4e650$a401280a@.phx.gbl...
> I am encountering error while creating a report using SQL
> with # temporary tables. Here's a sample code using the
> Adventureworks database:
> CREATE TABLE #PRODUCTDETAILS(
> [WEIGHT] [FLOAT] NULL ,
> [PRODUCTNUMBER] [NVARCHAR] (25) COLLATE
> SQL_LATIN1_GENERAL_CP1_CI_AS NULL ,
> [STANDARDPRICE] [MONEY] NULL
> ) ON [PRIMARY]
> INSERT INTO #PRODUCTDETAILS
> SELECT WEIGHT,
> PRODUCTNUMBER,
> STANDARDPRICE
> FROM PRODUCT A,
> PRODUCTVENDOR B
> WHERE A.PRODUCTID = B.PRODUCTID
> SELECT * FROM #PRODUCTDETAILS
>
> I tried to create a new report (using the wizard) with the
> following SQL in the query section. When I click on the
> next button, I get an error "There is an error in the
> query. Invalid object name '#productdetails'". I also
> tried to compile the below statements into a stored
> procedure, but I get the same error when I try to generate
> the report using the stored procedure.
> However I found out that if I create the report manually
> (without the wizard) and type all the field names as per
> the output of the query, the query runs successfully in the
> Data tab and I am able to generate the report.
> Well, considering the fact that I have about 800 reports
> to be based on stored procedures using # temporary tables,
> it would be a collosal task to manually create so many
> reports. I am looking for an automated way of doing this
> task.
> Please help!|||Amar,
I have been trying to find where I wrote down the solution to this. I hit
this same problem and from memory, was able to fix it by ensuring that the
fields returned in the query were not prefixed with the table name. e.g.
EmployyID rather than #employee.EmployeeID.
I will continue to see if I can find where I wrote it down. Let me know if
this fixes it.
Brian Boyce
"Amar Karande" <akarande@.yahoo.com> wrote in message
news:2497501c45f84$90d4e650$a401280a@.phx.gbl...
> I am encountering error while creating a report using SQL
> with # temporary tables. Here's a sample code using the
> Adventureworks database:
> CREATE TABLE #PRODUCTDETAILS(
> [WEIGHT] [FLOAT] NULL ,
> [PRODUCTNUMBER] [NVARCHAR] (25) COLLATE
> SQL_LATIN1_GENERAL_CP1_CI_AS NULL ,
> [STANDARDPRICE] [MONEY] NULL
> ) ON [PRIMARY]
> INSERT INTO #PRODUCTDETAILS
> SELECT WEIGHT,
> PRODUCTNUMBER,
> STANDARDPRICE
> FROM PRODUCT A,
> PRODUCTVENDOR B
> WHERE A.PRODUCTID = B.PRODUCTID
> SELECT * FROM #PRODUCTDETAILS
>
> I tried to create a new report (using the wizard) with the
> following SQL in the query section. When I click on the
> next button, I get an error "There is an error in the
> query. Invalid object name '#productdetails'". I also
> tried to compile the below statements into a stored
> procedure, but I get the same error when I try to generate
> the report using the stored procedure.
> However I found out that if I create the report manually
> (without the wizard) and type all the field names as per
> the output of the query, the query runs successfully in the
> Data tab and I am able to generate the report.
> Well, considering the fact that I have about 800 reports
> to be based on stored procedures using # temporary tables,
> it would be a collosal task to manually create so many
> reports. I am looking for an automated way of doing this
> task.
> Please help!|||Bruce,
I am using Generic Query Designer and it does not work
there either, unless you explicitly define the fields in
the Dataset properties. It seems like reporting services
engine is not able to retrieve fields from the temporary
table. Guess why? Because it does not exist.
As per your second suggestion, I think that might not work
too well in my case, because the report layouts (columns)
are very different.
The million dollar question for me is, would I have to
manually create reports from stored procedures, i.e.
define fields manually in the dataset? If thats the case,
it will take me forever to migrate to Reporting Services.
I am sure there should be a way around it. Atleast I hope
so :(
Thanks,
Amar
>--Original Message--
>Report Designer has a graphical query designer (VDT) and
text based query
>designer (GQD - Generic Query Designer). When you are in
Data view you can
>switch between the two by clicking the third button from
the left on the
>query designer toolbar. Temp tables can be used provided
you use the GQD.
>The GQD has a couple of variations: one for stored
procedures and on for
>table direct. You can activate these by changing the
command type to stored
>procedure or table direct on the Data Set dialog.
>Report Wizard only uses the VDT which means it will not
work with temp
>tables.
>Here are a couple of suggestions for reusing reports and
data sources:
>Have you checked into using shared data sources? These
allow you to define a
>data source once and reuse it among all the reports in a
project.
>If your reports have a similar structure approximate
template behavior by
>creating the specific report you want and then placing it
in
>C:\ProgramFiles\Microsoft SQL Server\80\Tools\Report
>Designer\ProjectItems\ReportProject directory. These
reports "templates"
>will show up in Report Designer's Add New Item dialog
along with the Report
>Wizard, Report, and Data Source templates when you add a
new report to a
>project.
>--
>Bruce Johnson [MSFT]
>Microsoft SQL Server Reporting Services
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>
>"Amar Karande" <akarande@.yahoo.com> wrote in message
>news:2497501c45f84$90d4e650$a401280a@.phx.gbl...
>> I am encountering error while creating a report using
SQL
>> with # temporary tables. Here's a sample code using the
>> Adventureworks database:
>> CREATE TABLE #PRODUCTDETAILS(
>> [WEIGHT] [FLOAT] NULL ,
>> [PRODUCTNUMBER] [NVARCHAR] (25) COLLATE
>> SQL_LATIN1_GENERAL_CP1_CI_AS NULL ,
>> [STANDARDPRICE] [MONEY] NULL
>> ) ON [PRIMARY]
>> INSERT INTO #PRODUCTDETAILS
>> SELECT WEIGHT,
>> PRODUCTNUMBER,
>> STANDARDPRICE
>> FROM PRODUCT A,
>> PRODUCTVENDOR B
>> WHERE A.PRODUCTID = B.PRODUCTID
>> SELECT * FROM #PRODUCTDETAILS
>>
>> I tried to create a new report (using the wizard) with
the
>> following SQL in the query section. When I click on the
>> next button, I get an error "There is an error in the
>> query. Invalid object name '#productdetails'". I also
>> tried to compile the below statements into a stored
>> procedure, but I get the same error when I try to
generate
>> the report using the stored procedure.
>> However I found out that if I create the report manually
>> (without the wizard) and type all the field names as per
>> the output of the query, the query runs successfully in
the
>> Data tab and I am able to generate the report.
>> Well, considering the fact that I have about 800 reports
>> to be based on stored procedures using # temporary
tables,
>> it would be a collosal task to manually create so many
>> reports. I am looking for an automated way of doing this
>> task.
>> Please help!
>
>.
>|||Brian,
My query is set up to do a select * from #Temp table.
Should I do something else?
Thanks,
Amar
>--Original Message--
>Amar,
>I have been trying to find where I wrote down the
solution to this. I hit
>this same problem and from memory, was able to fix it by
ensuring that the
>fields returned in the query were not prefixed with the
table name. e.g.
>EmployyID rather than #employee.EmployeeID.
>I will continue to see if I can find where I wrote it
down. Let me know if
>this fixes it.
>Brian Boyce
>"Amar Karande" <akarande@.yahoo.com> wrote in message
>news:2497501c45f84$90d4e650$a401280a@.phx.gbl...
>> I am encountering error while creating a report using
SQL
>> with # temporary tables. Here's a sample code using the
>> Adventureworks database:
>> CREATE TABLE #PRODUCTDETAILS(
>> [WEIGHT] [FLOAT] NULL ,
>> [PRODUCTNUMBER] [NVARCHAR] (25) COLLATE
>> SQL_LATIN1_GENERAL_CP1_CI_AS NULL ,
>> [STANDARDPRICE] [MONEY] NULL
>> ) ON [PRIMARY]
>> INSERT INTO #PRODUCTDETAILS
>> SELECT WEIGHT,
>> PRODUCTNUMBER,
>> STANDARDPRICE
>> FROM PRODUCT A,
>> PRODUCTVENDOR B
>> WHERE A.PRODUCTID = B.PRODUCTID
>> SELECT * FROM #PRODUCTDETAILS
>>
>> I tried to create a new report (using the wizard) with
the
>> following SQL in the query section. When I click on the
>> next button, I get an error "There is an error in the
>> query. Invalid object name '#productdetails'". I also
>> tried to compile the below statements into a stored
>> procedure, but I get the same error when I try to
generate
>> the report using the stored procedure.
>> However I found out that if I create the report manually
>> (without the wizard) and type all the field names as per
>> the output of the query, the query runs successfully in
the
>> Data tab and I am able to generate the report.
>> Well, considering the fact that I have about 800 reports
>> to be based on stored procedures using # temporary
tables,
>> it would be a collosal task to manually create so many
>> reports. I am looking for an automated way of doing this
>> task.
>> Please help!
>
>.
>|||Temporary table used in stored procedures from SQL Server work just fine. I
do this all the time. I have had trouble going against Sybase but works
great for SQL Server. Make sure you have set the command type to
StoredProcedure. There there is a little used button that looks like the
refresh button for IE. If you hoover over it, it will say refresh fields.
Click on it and your field list will update to the correct fields returned.
I did this with the code you posted. You can be in either query designers.
No need to add fields by hand. I only do this if I have a calculated field I
want to add (a handy little trick to remember).
Bruce L-C
"Amar Karande" <akarande@.yahoo.com> wrote in message
news:249dd01c45f8e$ae354d20$a501280a@.phx.gbl...
> Bruce,
> I am using Generic Query Designer and it does not work
> there either, unless you explicitly define the fields in
> the Dataset properties. It seems like reporting services
> engine is not able to retrieve fields from the temporary
> table. Guess why? Because it does not exist.
> As per your second suggestion, I think that might not work
> too well in my case, because the report layouts (columns)
> are very different.
> The million dollar question for me is, would I have to
> manually create reports from stored procedures, i.e.
> define fields manually in the dataset? If thats the case,
> it will take me forever to migrate to Reporting Services.
> I am sure there should be a way around it. Atleast I hope
> so :(
> Thanks,
> Amar
> >--Original Message--
> >Report Designer has a graphical query designer (VDT) and
> text based query
> >designer (GQD - Generic Query Designer). When you are in
> Data view you can
> >switch between the two by clicking the third button from
> the left on the
> >query designer toolbar. Temp tables can be used provided
> you use the GQD.
> >
> >The GQD has a couple of variations: one for stored
> procedures and on for
> >table direct. You can activate these by changing the
> command type to stored
> >procedure or table direct on the Data Set dialog.
> >
> >Report Wizard only uses the VDT which means it will not
> work with temp
> >tables.
> >
> >Here are a couple of suggestions for reusing reports and
> data sources:
> >
> >Have you checked into using shared data sources? These
> allow you to define a
> >data source once and reuse it among all the reports in a
> project.
> >
> >If your reports have a similar structure approximate
> template behavior by
> >creating the specific report you want and then placing it
> in
> >C:\ProgramFiles\Microsoft SQL Server\80\Tools\Report
> >Designer\ProjectItems\ReportProject directory. These
> reports "templates"
> >will show up in Report Designer's Add New Item dialog
> along with the Report
> >Wizard, Report, and Data Source templates when you add a
> new report to a
> >project.
> >
> >--
> >Bruce Johnson [MSFT]
> >Microsoft SQL Server Reporting Services
> >
> >This posting is provided "AS IS" with no warranties, and
> confers no rights.
> >
> >
> >"Amar Karande" <akarande@.yahoo.com> wrote in message
> >news:2497501c45f84$90d4e650$a401280a@.phx.gbl...
> >> I am encountering error while creating a report using
> SQL
> >> with # temporary tables. Here's a sample code using the
> >> Adventureworks database:
> >>
> >> CREATE TABLE #PRODUCTDETAILS(
> >> [WEIGHT] [FLOAT] NULL ,
> >> [PRODUCTNUMBER] [NVARCHAR] (25) COLLATE
> >> SQL_LATIN1_GENERAL_CP1_CI_AS NULL ,
> >> [STANDARDPRICE] [MONEY] NULL
> >> ) ON [PRIMARY]
> >>
> >> INSERT INTO #PRODUCTDETAILS
> >> SELECT WEIGHT,
> >> PRODUCTNUMBER,
> >> STANDARDPRICE
> >> FROM PRODUCT A,
> >> PRODUCTVENDOR B
> >> WHERE A.PRODUCTID = B.PRODUCTID
> >>
> >> SELECT * FROM #PRODUCTDETAILS
> >>
> >>
> >> I tried to create a new report (using the wizard) with
> the
> >> following SQL in the query section. When I click on the
> >> next button, I get an error "There is an error in the
> >> query. Invalid object name '#productdetails'". I also
> >> tried to compile the below statements into a stored
> >> procedure, but I get the same error when I try to
> generate
> >> the report using the stored procedure.
> >>
> >> However I found out that if I create the report manually
> >> (without the wizard) and type all the field names as per
> >> the output of the query, the query runs successfully in
> the
> >> Data tab and I am able to generate the report.
> >>
> >> Well, considering the fact that I have about 800 reports
> >> to be based on stored procedures using # temporary
> tables,
> >> it would be a collosal task to manually create so many
> >> reports. I am looking for an automated way of doing this
> >> task.
> >>
> >> Please help!
> >
> >
> >.
> >|||It sure works:) I hope it worked through the wizard. That
would have saved me a lottttt of time. Some of my reports
have 40 columns :(
>--Original Message--
>Temporary table used in stored procedures from SQL Server
work just fine. I
>do this all the time. I have had trouble going against
Sybase but works
>great for SQL Server. Make sure you have set the command
type to
>StoredProcedure. There there is a little used button that
looks like the
>refresh button for IE. If you hoover over it, it will say
refresh fields.
>Click on it and your field list will update to the
correct fields returned.
>I did this with the code you posted. You can be in either
query designers.
>No need to add fields by hand. I only do this if I have a
calculated field I
>want to add (a handy little trick to remember).
>Bruce L-C
>"Amar Karande" <akarande@.yahoo.com> wrote in message
>news:249dd01c45f8e$ae354d20$a501280a@.phx.gbl...
>> Bruce,
>> I am using Generic Query Designer and it does not work
>> there either, unless you explicitly define the fields in
>> the Dataset properties. It seems like reporting services
>> engine is not able to retrieve fields from the temporary
>> table. Guess why? Because it does not exist.
>> As per your second suggestion, I think that might not
work
>> too well in my case, because the report layouts
(columns)
>> are very different.
>> The million dollar question for me is, would I have to
>> manually create reports from stored procedures, i.e.
>> define fields manually in the dataset? If thats the
case,
>> it will take me forever to migrate to Reporting
Services.
>> I am sure there should be a way around it. Atleast I
hope
>> so :(
>> Thanks,
>> Amar
>> >--Original Message--
>> >Report Designer has a graphical query designer (VDT)
and
>> text based query
>> >designer (GQD - Generic Query Designer). When you are
in
>> Data view you can
>> >switch between the two by clicking the third button
from
>> the left on the
>> >query designer toolbar. Temp tables can be used
provided
>> you use the GQD.
>> >
>> >The GQD has a couple of variations: one for stored
>> procedures and on for
>> >table direct. You can activate these by changing the
>> command type to stored
>> >procedure or table direct on the Data Set dialog.
>> >
>> >Report Wizard only uses the VDT which means it will not
>> work with temp
>> >tables.
>> >
>> >Here are a couple of suggestions for reusing reports
and
>> data sources:
>> >
>> >Have you checked into using shared data sources? These
>> allow you to define a
>> >data source once and reuse it among all the reports in
a
>> project.
>> >
>> >If your reports have a similar structure approximate
>> template behavior by
>> >creating the specific report you want and then placing
it
>> in
>> >C:\ProgramFiles\Microsoft SQL Server\80\Tools\Report
>> >Designer\ProjectItems\ReportProject directory. These
>> reports "templates"
>> >will show up in Report Designer's Add New Item dialog
>> along with the Report
>> >Wizard, Report, and Data Source templates when you add
a
>> new report to a
>> >project.
>> >
>> >--
>> >Bruce Johnson [MSFT]
>> >Microsoft SQL Server Reporting Services
>> >
>> >This posting is provided "AS IS" with no warranties,
and
>> confers no rights.
>> >
>> >
>> >"Amar Karande" <akarande@.yahoo.com> wrote in message
>> >news:2497501c45f84$90d4e650$a401280a@.phx.gbl...
>> >> I am encountering error while creating a report using
>> SQL
>> >> with # temporary tables. Here's a sample code using
the
>> >> Adventureworks database:
>> >>
>> >> CREATE TABLE #PRODUCTDETAILS(
>> >> [WEIGHT] [FLOAT] NULL ,
>> >> [PRODUCTNUMBER] [NVARCHAR] (25) COLLATE
>> >> SQL_LATIN1_GENERAL_CP1_CI_AS NULL ,
>> >> [STANDARDPRICE] [MONEY] NULL
>> >> ) ON [PRIMARY]
>> >>
>> >> INSERT INTO #PRODUCTDETAILS
>> >> SELECT WEIGHT,
>> >> PRODUCTNUMBER,
>> >> STANDARDPRICE
>> >> FROM PRODUCT A,
>> >> PRODUCTVENDOR B
>> >> WHERE A.PRODUCTID = B.PRODUCTID
>> >>
>> >> SELECT * FROM #PRODUCTDETAILS
>> >>
>> >>
>> >> I tried to create a new report (using the wizard)
with
>> the
>> >> following SQL in the query section. When I click on
the
>> >> next button, I get an error "There is an error in the
>> >> query. Invalid object name '#productdetails'". I also
>> >> tried to compile the below statements into a stored
>> >> procedure, but I get the same error when I try to
>> generate
>> >> the report using the stored procedure.
>> >>
>> >> However I found out that if I create the report
manually
>> >> (without the wizard) and type all the field names as
per
>> >> the output of the query, the query runs successfully
in
>> the
>> >> Data tab and I am able to generate the report.
>> >>
>> >> Well, considering the fact that I have about 800
reports
>> >> to be based on stored procedures using # temporary
>> tables,
>> >> it would be a collosal task to manually create so
many
>> >> reports. I am looking for an automated way of doing
this
>> >> task.
>> >>
>> >> Please help!
>> >
>> >
>> >.
>> >
>
>.
>

Error upon creation of Integration Services

After I aborted my installation of the tools that come with Katmai, I could not create Integration Services project nor add package to an existing project. I get the following error

Constructor on type 'Microsoft.DataTransformationServices.Wizards.EtlProjectWizardInitializer' not found.

I've removed anything that had the word 'Katmai' in Add/REmove programs. I've also reinstalled the 2005 tools. Still no luck. I'm just wondering if anyone here has encountered this error.
I guess the abort did not rollback completely, but then its just my guess.
Did you try re-installing katmai tools and do a complete un-install after that?.|||Hi sir. I did a complete uninstall of Katmai db and tools. I'll try to reinstall it again, maybe it will help. I just repaired my VS2005Pro installation thinking it can solve the problem but still no luck. Sad
|||

[Microsoft follow-up]

Possible katmai bug here guys.

|||

This sounds like one of the known bugs for Katmai.

If this is the same issue that I'm thinking of, it's because the component which handles our project creation is pointing to the Katmai files.

In the registry, the keys under (CLSID, CurVer):

HKEY_CLASSES_ROOT\Microsoft.SqlServer.Management.UI.WizardManager

Should be the same as:

HKEY_CLASSES_ROOT\Microsoft.SqlServer.Management.UI.WizardManager.9

The values should be:

CLSID = {4503861B-5694-45AE-94DD-BC6541316FB7}

CurVer = Microsoft.SqlServer.Management.UI.WizardManager.9

If CurVer is Microsoft.SqlServer.Management.UI.WizardManager.10, then this is the issue that we've seen.

Note, I can't recommend tweaking the registry by hand... but if uninstalling SQL Server and Visual Studio doesn't fix the issue, this might be an alternative.

It's odd that you're still hitting it after uninstalling everything, but I guess aborting the installation might have left you in a bad state. I know that a number of setup related issues have been resolved since the June CTP, and hopefully the issue that put you into this state was one of them. Make sure that when you reinstall, you have no instances of Visual Studio running.

~Matt

|||Moving to the Katmai SSIS forum.|||

There is a workaround to get the SQL Server 2005 tools working when it is installed with Katmai server.

You need to update this file "<drive>:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\Business Intelligence Projects\DataTransformationsProject.vsz".

Replace the "Microsoft.SqlServer.Management.UI.WizardManager" with "Microsoft.SqlServer.Management.UI.WizardManager.9". Save the change and restart the SQL Server 2005 tools. You should be able to create the new projects.

|||This weekend, I reinstalled both my VS2005Pro and SQL2005Dev as a final brute force solution. I was hoping that this would also erase in the registry the entry key that points to the non-existing or invalid dll. I noticed that even for the supposed "fresh" install, the layout of my IDE did not change and the problem was still there.

Thanks so much for the replies guys. Feng, I will apply your solution.

|||I applied both solutions here. I don't care which one did it but the important thing is my headache is over. Thank you so much again! More power to you guys!

Error upon creation of Integration Services

After I aborted my installation of the tools that come with Katmai, I could not create Integration Services project nor add package to an existing project. I get the following error

Constructor on type 'Microsoft.DataTransformationServices.Wizards.EtlProjectWizardInitializer' not found.

I've removed anything that had the word 'Katmai' in Add/REmove programs. I've also reinstalled the 2005 tools. Still no luck. I'm just wondering if anyone here has encountered this error.
I guess the abort did not rollback completely, but then its just my guess.
Did you try re-installing katmai tools and do a complete un-install after that?.|||Hi sir. I did a complete uninstall of Katmai db and tools. I'll try to reinstall it again, maybe it will help. I just repaired my VS2005Pro installation thinking it can solve the problem but still no luck. Sad
|||

[Microsoft follow-up]

Possible katmai bug here guys.

|||

This sounds like one of the known bugs for Katmai.

If this is the same issue that I'm thinking of, it's because the component which handles our project creation is pointing to the Katmai files.

In the registry, the keys under (CLSID, CurVer):

HKEY_CLASSES_ROOT\Microsoft.SqlServer.Management.UI.WizardManager

Should be the same as:

HKEY_CLASSES_ROOT\Microsoft.SqlServer.Management.UI.WizardManager.9

The values should be:

CLSID = {4503861B-5694-45AE-94DD-BC6541316FB7}

CurVer = Microsoft.SqlServer.Management.UI.WizardManager.9

If CurVer is Microsoft.SqlServer.Management.UI.WizardManager.10, then this is the issue that we've seen.

Note, I can't recommend tweaking the registry by hand... but if uninstalling SQL Server and Visual Studio doesn't fix the issue, this might be an alternative.

It's odd that you're still hitting it after uninstalling everything, but I guess aborting the installation might have left you in a bad state. I know that a number of setup related issues have been resolved since the June CTP, and hopefully the issue that put you into this state was one of them. Make sure that when you reinstall, you have no instances of Visual Studio running.

~Matt

|||Moving to the Katmai SSIS forum.|||

There is a workaround to get the SQL Server 2005 tools working when it is installed with Katmai server.

You need to update this file "<drive>:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\Business Intelligence Projects\DataTransformationsProject.vsz".

Replace the "Microsoft.SqlServer.Management.UI.WizardManager" with "Microsoft.SqlServer.Management.UI.WizardManager.9". Save the change and restart the SQL Server 2005 tools. You should be able to create the new projects.

|||This weekend, I reinstalled both my VS2005Pro and SQL2005Dev as a final brute force solution. I was hoping that this would also erase in the registry the entry key that points to the non-existing or invalid dll. I noticed that even for the supposed "fresh" install, the layout of my IDE did not change and the problem was still there.

Thanks so much for the replies guys. Feng, I will apply your solution.

|||I applied both solutions here. I don't care which one did it but the important thing is my headache is over. Thank you so much again! More power to you guys!

Error upon adding configuration (After Katmai uninstall)

Hi guys. This problem is somewhat related to my other problem here. This time, whenever I add a configuration file to a package I get the an error

Constructor on type 'Microsoft.DataWarehouse.Wizards.WizardInitializer' not found (EnvDTE).

All these weird messages came out after I uninstalled Katmai June CTP. I already employed similar solutions suggested by the kind people in the thread of my first problem. I'm just not sure which wizard file and registry key to modify.
It was fixed after I installed July CTP

Error upon adding configuration (After Katmai uninstall)

Hi guys. This problem is somewhat related to my other problem here. This time, whenever I add a configuration file to a package I get the an error

Constructor on type 'Microsoft.DataWarehouse.Wizards.WizardInitializer' not found (EnvDTE).

All these weird messages came out after I uninstalled Katmai June CTP. I already employed similar solutions suggested by the kind people in the thread of my first problem. I'm just not sure which wizard file and registry key to modify.
It was fixed after I installed July CTP

error uploading sample reports

Every time I goto upload the sample reports that come with Reporting Services (AdventureWorks), I get the following error message. I have built a simple report from scratch and uploaded it to the report server and it was OK. I only get the error with the sample reports. Anyone have a fix for this.I can't figure it out.

Reporting Services Error

An error has occurred during report processing. (rsProcessingAborted) Get Online Help Cannot create a connection to data source 'AdventureWorks'. (rsErrorOpeningConnection) Get Online Help SQL Server does not exist or access denied.Are you sure the AdventureWorks2000 database got installed during setup? The reports use a database connection string of server=(local).

Error upgrading to Sql 2000 from Sql 7

Everything proceeds fine but when it is running the file
called messages.sql, there is an error.
Error running script : messages.sql(1)
The process then stops. Any ideas what this is ? All that
the script file messages.sql does is insert in
master..sysmessages. I increased the log size but that did
not help either.
Any help is appreciated. Thanks in advance.Jack,
See
FIX: Upgrade from SQL Server 7.0 May Abort with Messages.sql and You Cannot
Connect to SQL Server
http://www.support.microsoft.com/?id=300676
--
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"Jack" <jacka8@.excite.com> wrote in message
news:054e01c3636f$d71d7ee0$a101280a@.phx.gbl...
> Everything proceeds fine but when it is running the file
> called messages.sql, there is an error.
> Error running script : messages.sql(1)
> The process then stops. Any ideas what this is ? All that
> the script file messages.sql does is insert in
> master..sysmessages. I increased the log size but that did
> not help either.
> Any help is appreciated. Thanks in advance.|||Thanks, Dinesh. That was a bulls eye.
Didnt Microsoft test an upgrade before releasing the CD ?
Anyways...
>--Original Message--
>Jack,
>See
>FIX: Upgrade from SQL Server 7.0 May Abort with
Messages.sql and You Cannot
>Connect to SQL Server
>http://www.support.microsoft.com/?id=300676
>--
>Dinesh.
>SQL Server FAQ at
>http://www.tkdinesh.com
>"Jack" <jacka8@.excite.com> wrote in message
>news:054e01c3636f$d71d7ee0$a101280a@.phx.gbl...
>> Everything proceeds fine but when it is running the file
>> called messages.sql, there is an error.
>> Error running script : messages.sql(1)
>> The process then stops. Any ideas what this is ? All
that
>> the script file messages.sql does is insert in
>> master..sysmessages. I increased the log size but that
did
>> not help either.
>> Any help is appreciated. Thanks in advance.
>
>.
>

Error Updating Installed Files

Well I need to know HOW TO REMOVE MANUALLY every pieace of the Database Services for my SQL Server Express CTP previous installation because the final release won't let me update this Database Services, any suggestion besides removing manually the services? thank you all

You should be able to remove the CTP from the Add/Remove Programs window, have you tried that? Add/Remove is the only way to uninstall SQL Server.

Regards,

Mike Wachal

|||

yes I removed it first that way but the same problem, I googled a bit and I found that removing the whole directory I could solve this and I did it also deleted some registry keys that I dont remember which one ups anyway I guess the problem was the SQL Server directory thanks

|||

Good to hear you've gotten it figured out, thanks for posting back to the forum.

- Mike

|||

Hi

When I tried to install the SQL Server 2005 version I got the following error

The setup has encountered an unexpected error while Updating Installed Files. The error is: Fatal error during installation.

Can you please let me know how did you resolved this error.

Funny thing is I have nothing installed on the box except IIS(Internet Information Services) still getting this error. When I google it looks like all the people who face this error because they have beta installations on their boxes.

Thanks in Advance. Your reply may helps me a lot.

Kiran

Error Updating Installed Files

Well I need to know HOW TO REMOVE MANUALLY every pieace of the Database Services for my SQL Server Express CTP previous installation because the final release won't let me update this Database Services, any suggestion besides removing manually the services? thank you all

You should be able to remove the CTP from the Add/Remove Programs window, have you tried that? Add/Remove is the only way to uninstall SQL Server.

Regards,

Mike Wachal

|||

yes I removed it first that way but the same problem, I googled a bit and I found that removing the whole directory I could solve this and I did it also deleted some registry keys that I dont remember which one ups anyway I guess the problem was the SQL Server directory thanks

|||

Good to hear you've gotten it figured out, thanks for posting back to the forum.

- Mike

|||

Hi

When I tried to install the SQL Server 2005 version I got the following error

The setup has encountered an unexpected error while Updating Installed Files. The error is: Fatal error during installation.

Can you please let me know how did you resolved this error.

Funny thing is I have nothing installed on the box except IIS(Internet Information Services) still getting this error. When I google it looks like all the people who face this error because they have beta installations on their boxes.

Thanks in Advance. Your reply may helps me a lot.

Kiran

Error updating dynamic datagrid with SQL server

Hello, I have a datagrid which is populated with data from an MS SQL server database.

When I run an update query it always throws an exception - what is the most likely cause for this given that I am using the code below:

1public void DataGrid_Update(Object sender, DataGridCommandEventArgs e)2 {3 String update ="UPDATE Fruit SET Product = @.ID, Quantity = @.Q, Price = @.P, Total = @.T where Product = @.Id";45 SqlCommand command =new SqlCommand(update, conn);67command.Parameters.Add(new SqlParameter("@.ID", SqlDbType.NVarChar, 50));8 command.Parameters.Add(new SqlParameter("@.Q", SqlDbType.NVarChar, 50));9 command.Parameters.Add(new SqlParameter("@.P", SqlDbType.NVarChar, 50));10 command.Parameters.Add(new SqlParameter("@.T", SqlDbType.NVarChar, 50));11 command.Parameters["@.ID"].Value = DataGrid.DataKeys[(int)e.Item.ItemIndex];12 command.Connection.Open();1314try15 {16 command.ExecuteNonQuery();17 Message.InnerHtml ="Update complete!" + update;18 DataGrid.EditItemIndex = -1;19 }20catch (SqlException exc)21 {22 Message.InnerHtml ="Update error.";23 }2425 command.Connection.Close();2627 BindGrid();28 }

All of the row types in MS SQL server are set to nvarchar(50) - as I thought this would eliminate any inconsistencies in types.

Thanks anyone

Hi,

Can you show us the error message which can help us to solve the problem.

Thanks.

|||

Sorry if this does not make sense although I printed the SQL exception to screen.

I also changed my code a bit as I needed to change the look of the website therefore the error line number has changed to 65.

Updateerror.System.Data.SqlClient.SqlException: The parameterized query '(@.IDnvarchar(50),@.Q nvarchar(50),@.P nvarchar(50),@.T nvarchar(50' expectsthe parameter '@.Q', which was not supplied. atSystem.Data.SqlClient.SqlConnection.OnError(SqlException exception,Boolean breakConnection) atSystem.Data.SqlClient.SqlInternalConnection.OnError(SqlExceptionexception, Boolean breakConnection) atSystem.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObjectstateObj) at System.Data.SqlClient.TdsParser.Run(RunBehaviorrunBehavior, SqlCommand cmdHandler, SqlDataReader dataStream,BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReaderds, RunBehavior runBehavior, String resetOptionsString) atSystem.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehaviorcmdBehavior, RunBehavior runBehavior, Boolean returnStream, Booleanasync) atSystem.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehaviorcmdBehavior, RunBehavior runBehavior, Boolean returnStream, Stringmethod, DbAsyncResult result) atSystem.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResultresult, String methodName, Boolean sendToPipe) atSystem.Data.SqlClient.SqlCommand.ExecuteNonQuery() atASP.asp_aspx.MyDataGrid_Update(Object sender, DataGridCommandEventArgse) in c:\Inetpub\wwwroot\asp.aspx:line 65

Cheers

|||

Hi,

From the error message, i think the situation is that the parameters isn't supplied to the sql statement correctly. You can insert a breakpoint in "command.ExecuteNonQuery();" and check the local variable such as @.ID, @.Q, @.P and update statement. You can find out which parameters is not working properly.

Hope that helps. Thanks.

|||

How would I insert a breakpoint in "command.ExecuteNonQuery();". I guess just "break;" just after the statement - but would that give any more error output. Please suggest how I should do this.

Cheers

|||

Hi,

What I mean is one kind of debug tool. Just move your mouse to ""command.ExecuteNonQuery();" sentence and right click, a menu will be shown and find breakpoint and click on "Insert BreakPoint". And then run your applicaiton, it will interuppt while running to the breakpoint, and then, in the below window of your Visual Studio, you'll find a Local tab, under the tab, you can see all the current value of local variable, just check these to find if each parameters do have provided the input value properly.

Thanks.

Error Updating DB2 on MVS-MF from a Linked Server

Need to be able to run update queries on DB2 on IBM MF from a Linked Server. Select and Insert queries work but Update and Delete queries don't. DB2 connect is installed and ODBC System dsn's are created for DEV and Production DB2 environments.

The ODBC drivers can be selected when running Imports/Exports but can't be specified through a linked server.

Any Ideas?

Tom...

Linked Servers do not directly support ODBC drivers, but you can plug in ODBC drivers by using a OLE DB to ODBC bridge technology 'Microsoft OLE DB Provider for ODBC (MSDASQL)'. This componentships with MDAC but is not available on 64-bit at this time.

Although option would be to use Microsoft's DB2 OLE DB Provider directly with Linked Server available for download on http://www.microsoft.com/downloads/details.aspx?FamilyId=50b97994-8453-4998-8226-fa42ec403d17&DisplayLang=en

Microsoft OLEDB Provider for DB2

The Microsoft OLE DB Provider for DB2 is a COM component for integrating vital data stored in IBM DB2 databases with new solutions based on Microsoft SQL Server 2005 Enterprise Edition and Developer Edition. SQL Server developers and administrators can use the provider with Integration Services, Analysis Services, Replication, Reporting Services, and Distributed Query Processor. Run the self-extracting download package to create an installation folder. The single setup program will install the provider and tools on x86, x64, and IA64 computers. The package includes product updates in the form of an integrated Service Pack 1. Read the installation guide and Readme for more information.

Error updating data in table that uses a trigger?

Hello. I am new to SQL Server Management Studio 2005 and am using it to connect to a database on another machine running SQL Server 2000. Everything seems to work well, except when I try to edit table data on a particular table that has an update trigger associated with it. I am receiving the error:

-

The data in row 1 was not committed.

Error Source: Microsoft.VisualStudio.DataTools.

Error Message: The row value(s) updated or deleted either do not make the row unique or they alter multiple rows(5 rows).

Correct the errors and retry or press ESC to chancel the changes.

--

I want it to update those the 5 rows in the other tables...that's the whole point of having the trigger!

This used to work fine from Enterprise Manager 2000 and If I issue the update query manually from the new integrated "Query Analyzer" it is also ok. Is there some way to deactivate this new feature from the table viewer?

Thanks very much!

That error message occurred once for because there was a constraint which the deletion violated. I believe I had a field set to "NOT NULL" and the deletion was attempting to delete just that field for some reason.|||Also make sure that there are not two rows where every column is exactly the same.|||

Thanks for responding. My modification is not causing duplicate records to be created, nor am I violating any of my table rules (such as not NULL).

What I have is a trigger associated with my table so that whenever a record is updated it runs a stored procedure which then updates related information in other tables. It is not an error, but a very essential function of my database.

If I issue a manual update query (with query analyzer) I receive no errors and my trigger runs perfectly. It's only when I try to update a record interactively with the "Open Table" viewer/interface that I receive the error.

This new feature is very disruptive to the way I work and I was hoping that there was an option somewhere to turn it off, or make it so that it only applies to real errors such as duplicate records being created.

Thanks....

|||Can you run Profiler and gather a trace to see what it's doing differently than QA?|||

It's not really doing anything different, it's just that the new interactive "table viewer" has some sort of error checking routine that prohibits the update from executing because it sees that the query will affect data in other tables... which is what it was designed to do and worked flawlessly with Enterprise Manager 2000.

Am I the only person here who uses triggers to update data in other tables?

Thanks...

|||

You're absolutely not... I have the same problem. Very frustrating having to run the old version of Enterprise Manager just to update a few values.

Did you manage to find a fix for this?

|||Nope. No fix yet (that I'm aware of). Maybe if we keep this thread visible someone higher up can recommend that it be addressed in the next service pack.|||

Please file a defect report with the MSDN Feedback Center (http://lab.msdn.microsoft.com/productfeedback/).

If you can include a minimal script to create sample tables and a stored procedure to set up the test, that will help quite a bit.

Thanks,
Steve

|||

This appears to be a bug in the how SMSS is interperting the ADO 'feedback' area.

I have a table (T1) with a trigger that updates another table (T2) on INSERT and UPDATE.

1. UPDATE T1 SET C1 = 'value' WHERE ID=2 works fines

2. Trapping the SSMS generated 'sp_executesql' statement using Profiler and then executing it works fine.

3. Using SSMS to update the same row results in the error above.

Note that both1 and 2 above result in messages as follows:

(1 row(s) affected)

(1 row(s) affected)

If memory serves me right these 'messages' are both passed back in the ADO 'feedback' area and can be processed by the code of SSMS. Seems the code wasn't tested with replications scenarios.

Im on W2K3 and SQL 2005 SP plus hot fixes.

|||

There is an open Microsoft Connect issue... you can track the progress here:
https://connect.microsoft.com:443/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=125566

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/

|||I'm not sure if this will help any of you but I was able to get around this by putting a SET NOCOUNT ON at the beginning of my trigger.

Error updating data in table that uses a trigger?

Hello. I am new to SQL Server Management Studio 2005 and am using it to connect to a database on another machine running SQL Server 2000. Everything seems to work well, except when I try to edit table data on a particular table that has an update trigger associated with it. I am receiving the error:

-

The data in row 1 was not committed.

Error Source: Microsoft.VisualStudio.DataTools.

Error Message: The row value(s) updated or deleted either do not make the row unique or they alter multiple rows(5 rows).

Correct the errors and retry or press ESC to chancel the changes.

--

I want it to update those the 5 rows in the other tables...that's the whole point of having the trigger!

This used to work fine from Enterprise Manager 2000 and If I issue the update query manually from the new integrated "Query Analyzer" it is also ok. Is there some way to deactivate this new feature from the table viewer?

Thanks very much!

That error message occurred once for because there was a constraint which the deletion violated. I believe I had a field set to "NOT NULL" and the deletion was attempting to delete just that field for some reason.|||Also make sure that there are not two rows where every column is exactly the same.|||

Thanks for responding. My modification is not causing duplicate records to be created, nor am I violating any of my table rules (such as not NULL).

What I have is a trigger associated with my table so that whenever a record is updated it runs a stored procedure which then updates related information in other tables. It is not an error, but a very essential function of my database.

If I issue a manual update query (with query analyzer) I receive no errors and my trigger runs perfectly. It's only when I try to update a record interactively with the "Open Table" viewer/interface that I receive the error.

This new feature is very disruptive to the way I work and I was hoping that there was an option somewhere to turn it off, or make it so that it only applies to real errors such as duplicate records being created.

Thanks....

|||Can you run Profiler and gather a trace to see what it's doing differently than QA?|||

It's not really doing anything different, it's just that the new interactive "table viewer" has some sort of error checking routine that prohibits the update from executing because it sees that the query will affect data in other tables... which is what it was designed to do and worked flawlessly with Enterprise Manager 2000.

Am I the only person here who uses triggers to update data in other tables?

Thanks...

|||

You're absolutely not... I have the same problem. Very frustrating having to run the old version of Enterprise Manager just to update a few values.

Did you manage to find a fix for this?

|||Nope. No fix yet (that I'm aware of). Maybe if we keep this thread visible someone higher up can recommend that it be addressed in the next service pack.|||

Please file a defect report with the MSDN Feedback Center (http://lab.msdn.microsoft.com/productfeedback/).

If you can include a minimal script to create sample tables and a stored procedure to set up the test, that will help quite a bit.

Thanks,
Steve

|||

This appears to be a bug in the how SMSS is interperting the ADO 'feedback' area.

I have a table (T1) with a trigger that updates another table (T2) on INSERT and UPDATE.

1. UPDATE T1 SET C1 = 'value' WHERE ID=2 works fines

2. Trapping the SSMS generated 'sp_executesql' statement using Profiler and then executing it works fine.

3. Using SSMS to update the same row results in the error above.

Note that both1 and 2 above result in messages as follows:

(1 row(s) affected)

(1 row(s) affected)

If memory serves me right these 'messages' are both passed back in the ADO 'feedback' area and can be processed by the code of SSMS. Seems the code wasn't tested with replications scenarios.

Im on W2K3 and SQL 2005 SP plus hot fixes.

|||

There is an open Microsoft Connect issue... you can track the progress here:
https://connect.microsoft.com:443/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=125566

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/

|||I'm not sure if this will help any of you but I was able to get around this by putting a SET NOCOUNT ON at the beginning of my trigger.

Error updating data in table that uses a trigger?

Hello. I am new to SQL Server Management Studio 2005 and am using it to connect to a database on another machine running SQL Server 2000. Everything seems to work well, except when I try to edit table data on a particular table that has an update trigger associated with it. I am receiving the error:

-

The data in row 1 was not committed.

Error Source: Microsoft.VisualStudio.DataTools.

Error Message: The row value(s) updated or deleted either do not make the row unique or they alter multiple rows(5 rows).

Correct the errors and retry or press ESC to chancel the changes.

--

I want it to update those the 5 rows in the other tables...that's the whole point of having the trigger!

This used to work fine from Enterprise Manager 2000 and If I issue the update query manually from the new integrated "Query Analyzer" it is also ok. Is there some way to deactivate this new feature from the table viewer?

Thanks very much!

That error message occurred once for because there was a constraint which the deletion violated. I believe I had a field set to "NOT NULL" and the deletion was attempting to delete just that field for some reason.|||Also make sure that there are not two rows where every column is exactly the same.|||

Thanks for responding. My modification is not causing duplicate records to be created, nor am I violating any of my table rules (such as not NULL).

What I have is a trigger associated with my table so that whenever a record is updated it runs a stored procedure which then updates related information in other tables. It is not an error, but a very essential function of my database.

If I issue a manual update query (with query analyzer) I receive no errors and my trigger runs perfectly. It's only when I try to update a record interactively with the "Open Table" viewer/interface that I receive the error.

This new feature is very disruptive to the way I work and I was hoping that there was an option somewhere to turn it off, or make it so that it only applies to real errors such as duplicate records being created.

Thanks....

|||Can you run Profiler and gather a trace to see what it's doing differently than QA?|||

It's not really doing anything different, it's just that the new interactive "table viewer" has some sort of error checking routine that prohibits the update from executing because it sees that the query will affect data in other tables... which is what it was designed to do and worked flawlessly with Enterprise Manager 2000.

Am I the only person here who uses triggers to update data in other tables?

Thanks...

|||

You're absolutely not... I have the same problem. Very frustrating having to run the old version of Enterprise Manager just to update a few values.

Did you manage to find a fix for this?

|||Nope. No fix yet (that I'm aware of). Maybe if we keep this thread visible someone higher up can recommend that it be addressed in the next service pack.|||

Please file a defect report with the MSDN Feedback Center (http://lab.msdn.microsoft.com/productfeedback/).

If you can include a minimal script to create sample tables and a stored procedure to set up the test, that will help quite a bit.

Thanks,
Steve

|||

This appears to be a bug in the how SMSS is interperting the ADO 'feedback' area.

I have a table (T1) with a trigger that updates another table (T2) on INSERT and UPDATE.

1. UPDATE T1 SET C1 = 'value' WHERE ID=2 works fines

2. Trapping the SSMS generated 'sp_executesql' statement using Profiler and then executing it works fine.

3. Using SSMS to update the same row results in the error above.

Note that both1 and 2 above result in messages as follows:

(1 row(s) affected)

(1 row(s) affected)

If memory serves me right these 'messages' are both passed back in the ADO 'feedback' area and can be processed by the code of SSMS. Seems the code wasn't tested with replications scenarios.

Im on W2K3 and SQL 2005 SP plus hot fixes.

|||

There is an open Microsoft Connect issue... you can track the progress here:
https://connect.microsoft.com:443/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=125566

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/

|||I'm not sure if this will help any of you but I was able to get around this by putting a SET NOCOUNT ON at the beginning of my trigger.

Error updating data in table that uses a trigger?

Hello. I am new to SQL Server Management Studio 2005 and am using it to connect to a database on another machine running SQL Server 2000. Everything seems to work well, except when I try to edit table data on a particular table that has an update trigger associated with it. I am receiving the error:

-

The data in row 1 was not committed.

Error Source: Microsoft.VisualStudio.DataTools.

Error Message: The row value(s) updated or deleted either do not make the row unique or they alter multiple rows(5 rows).

Correct the errors and retry or press ESC to chancel the changes.

--

I want it to update those the 5 rows in the other tables...that's the whole point of having the trigger!

This used to work fine from Enterprise Manager 2000 and If I issue the update query manually from the new integrated "Query Analyzer" it is also ok. Is there some way to deactivate this new feature from the table viewer?

Thanks very much!

That error message occurred once for because there was a constraint which the deletion violated. I believe I had a field set to "NOT NULL" and the deletion was attempting to delete just that field for some reason.|||Also make sure that there are not two rows where every column is exactly the same.|||

Thanks for responding. My modification is not causing duplicate records to be created, nor am I violating any of my table rules (such as not NULL).

What I have is a trigger associated with my table so that whenever a record is updated it runs a stored procedure which then updates related information in other tables. It is not an error, but a very essential function of my database.

If I issue a manual update query (with query analyzer) I receive no errors and my trigger runs perfectly. It's only when I try to update a record interactively with the "Open Table" viewer/interface that I receive the error.

This new feature is very disruptive to the way I work and I was hoping that there was an option somewhere to turn it off, or make it so that it only applies to real errors such as duplicate records being created.

Thanks....

|||Can you run Profiler and gather a trace to see what it's doing differently than QA?|||

It's not really doing anything different, it's just that the new interactive "table viewer" has some sort of error checking routine that prohibits the update from executing because it sees that the query will affect data in other tables... which is what it was designed to do and worked flawlessly with Enterprise Manager 2000.

Am I the only person here who uses triggers to update data in other tables?

Thanks...

|||

You're absolutely not... I have the same problem. Very frustrating having to run the old version of Enterprise Manager just to update a few values.

Did you manage to find a fix for this?

|||Nope. No fix yet (that I'm aware of). Maybe if we keep this thread visible someone higher up can recommend that it be addressed in the next service pack.|||

Please file a defect report with the MSDN Feedback Center (http://lab.msdn.microsoft.com/productfeedback/).

If you can include a minimal script to create sample tables and a stored procedure to set up the test, that will help quite a bit.

Thanks,
Steve

|||

This appears to be a bug in the how SMSS is interperting the ADO 'feedback' area.

I have a table (T1) with a trigger that updates another table (T2) on INSERT and UPDATE.

1. UPDATE T1 SET C1 = 'value' WHERE ID=2 works fines

2. Trapping the SSMS generated 'sp_executesql' statement using Profiler and then executing it works fine.

3. Using SSMS to update the same row results in the error above.

Note that both1 and 2 above result in messages as follows:

(1 row(s) affected)

(1 row(s) affected)

If memory serves me right these 'messages' are both passed back in the ADO 'feedback' area and can be processed by the code of SSMS. Seems the code wasn't tested with replications scenarios.

Im on W2K3 and SQL 2005 SP plus hot fixes.

|||

There is an open Microsoft Connect issue... you can track the progress here:
https://connect.microsoft.com:443/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=125566

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/

|||I'm not sure if this will help any of you but I was able to get around this by putting a SET NOCOUNT ON at the beginning of my trigger.

Error updating data in table that uses a trigger?

Hello. I am new to SQL Server Management Studio 2005 and am using it to connect to a database on another machine running SQL Server 2000. Everything seems to work well, except when I try to edit table data on a particular table that has an update trigger associated with it. I am receiving the error:

-

The data in row 1 was not committed.

Error Source: Microsoft.VisualStudio.DataTools.

Error Message: The row value(s) updated or deleted either do not make the row unique or they alter multiple rows(5 rows).

Correct the errors and retry or press ESC to chancel the changes.

--

I want it to update those the 5 rows in the other tables...that's the whole point of having the trigger!

This used to work fine from Enterprise Manager 2000 and If I issue the update query manually from the new integrated "Query Analyzer" it is also ok. Is there some way to deactivate this new feature from the table viewer?

Thanks very much!

That error message occurred once for because there was a constraint which the deletion violated. I believe I had a field set to "NOT NULL" and the deletion was attempting to delete just that field for some reason.|||Also make sure that there are not two rows where every column is exactly the same.|||

Thanks for responding. My modification is not causing duplicate records to be created, nor am I violating any of my table rules (such as not NULL).

What I have is a trigger associated with my table so that whenever a record is updated it runs a stored procedure which then updates related information in other tables. It is not an error, but a very essential function of my database.

If I issue a manual update query (with query analyzer) I receive no errors and my trigger runs perfectly. It's only when I try to update a record interactively with the "Open Table" viewer/interface that I receive the error.

This new feature is very disruptive to the way I work and I was hoping that there was an option somewhere to turn it off, or make it so that it only applies to real errors such as duplicate records being created.

Thanks....

|||Can you run Profiler and gather a trace to see what it's doing differently than QA?|||

It's not really doing anything different, it's just that the new interactive "table viewer" has some sort of error checking routine that prohibits the update from executing because it sees that the query will affect data in other tables... which is what it was designed to do and worked flawlessly with Enterprise Manager 2000.

Am I the only person here who uses triggers to update data in other tables?

Thanks...

|||

You're absolutely not... I have the same problem. Very frustrating having to run the old version of Enterprise Manager just to update a few values.

Did you manage to find a fix for this?

|||Nope. No fix yet (that I'm aware of). Maybe if we keep this thread visible someone higher up can recommend that it be addressed in the next service pack.|||

Please file a defect report with the MSDN Feedback Center (http://lab.msdn.microsoft.com/productfeedback/).

If you can include a minimal script to create sample tables and a stored procedure to set up the test, that will help quite a bit.

Thanks,
Steve

|||

This appears to be a bug in the how SMSS is interperting the ADO 'feedback' area.

I have a table (T1) with a trigger that updates another table (T2) on INSERT and UPDATE.

1. UPDATE T1 SET C1 = 'value' WHERE ID=2 works fines

2. Trapping the SSMS generated 'sp_executesql' statement using Profiler and then executing it works fine.

3. Using SSMS to update the same row results in the error above.

Note that both1 and 2 above result in messages as follows:

(1 row(s) affected)

(1 row(s) affected)

If memory serves me right these 'messages' are both passed back in the ADO 'feedback' area and can be processed by the code of SSMS. Seems the code wasn't tested with replications scenarios.

Im on W2K3 and SQL 2005 SP plus hot fixes.

|||

There is an open Microsoft Connect issue... you can track the progress here:
https://connect.microsoft.com:443/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=125566

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/

|||I'm not sure if this will help any of you but I was able to get around this by putting a SET NOCOUNT ON at the beginning of my trigger.

Error updating AS400 table

SQL2000 SP3a
I have a statement as follows which attempts to insert data into an AS400
table using a linked server.
[b]SET XACT_ABORT ON
GO
BEGIN DISTRIBUTED TRAN
INSERT OPENQUERY(LS_HMVCASW1,
'SELECT
FIELD
FROM
WARDOUR1.PCUPDDTA.KENNY
WHERE 1=0') --ADD WHERE 1=0 TO STOP QUERY RETURNING ANY VALUES
SELECT
'X'
COMMIT TRAN
SET XACT_ABORT OFF
GO[/b]
I get the following error:
[b]OLE DB provider 'MSDASQL' reported an error. The provider did not give
any information about the error.
OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowsetChange::InsertRow
returned 0x80004005: The provider did not give any information about the
error.].[/b]
Journaling is set on on the AS400 tables. As far as I can make out, the
provider supports distributed transactions - question is how? The user in
the LS has correct permissions on AS400.
Any help much appreciated.The error does imply Access Denied. Use your AS400 query interface, log on
as the user this job is running under, and manually test the SQL
Jeff
"Kendo Nagasaki" <Kendo Nagasaki@.discussions.microsoft.com> wrote in message
news:034E693C-0530-4719-B771-A472C9E83D9B@.microsoft.com...
> SQL2000 SP3a
> I have a statement as follows which attempts to insert data into an AS400
> table using a linked server.
> [b]SET XACT_ABORT ON
> GO
> BEGIN DISTRIBUTED TRAN
> INSERT OPENQUERY(LS_HMVCASW1,
> 'SELECT
> FIELD
> FROM
> WARDOUR1.PCUPDDTA.KENNY
> WHERE 1=0') --ADD WHERE 1=0 TO STOP QUERY RETURNING ANY VALUES
> SELECT
> 'X'
> COMMIT TRAN
> SET XACT_ABORT OFF
> GO[/b]
> I get the following error:
> [b]OLE DB provider 'MSDASQL' reported an error. The provider did not give
> any information about the error.
> OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowsetChange::InsertRow
> returned 0x80004005: The provider did not give any information about the
> error.].[/b]
>
> Journaling is set on on the AS400 tables. As far as I can make out, the
> provider supports distributed transactions - question is how? The user in
> the LS has correct permissions on AS400.
> Any help much appreciated.|||I cannot log into the green screen using this profile as it has been set up
to boot you off immediately you log on, but I can link to the table from
Access using the same system DSN and user profile, and I can add/edit data
through that, so that to me means permissions are ok.
"Jeff Dillon" wrote:
> The error does imply Access Denied. Use your AS400 query interface, log on
> as the user this job is running under, and manually test the SQL
> Jeff
> "Kendo Nagasaki" <Kendo Nagasaki@.discussions.microsoft.com> wrote in message
> news:034E693C-0530-4719-B771-A472C9E83D9B@.microsoft.com...
> > SQL2000 SP3a
> >
> > I have a statement as follows which attempts to insert data into an AS400
> > table using a linked server.
> >
> > [b]SET XACT_ABORT ON
> > GO
> > BEGIN DISTRIBUTED TRAN
> > INSERT OPENQUERY(LS_HMVCASW1,
> > 'SELECT
> > FIELD
> > FROM
> > WARDOUR1.PCUPDDTA.KENNY
> > WHERE 1=0') --ADD WHERE 1=0 TO STOP QUERY RETURNING ANY VALUES
> > SELECT
> > 'X'
> >
> > COMMIT TRAN
> > SET XACT_ABORT OFF
> > GO[/b]
> >
> > I get the following error:
> >
> > [b]OLE DB provider 'MSDASQL' reported an error. The provider did not give
> > any information about the error.
> > OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowsetChange::InsertRow
> > returned 0x80004005: The provider did not give any information about the
> > error.].[/b]
> >
> >
> > Journaling is set on on the AS400 tables. As far as I can make out, the
> > provider supports distributed transactions - question is how? The user in
> > the LS has correct permissions on AS400.
> >
> > Any help much appreciated.
>
>|||After applying a Client Access SP, I've got it working ... sometimes. If I
remove the BEGIN TRAN and COMMIT TRAN it works. Leave those in and I get :
[b]The operation could not be performed because the OLE DB provider
'MSDASQL' was unable to begin a distributed transaction.
OLE DB error trace [OLE/DB Provider 'MSDASQL'
ITransactionJoin::JoinTransaction returned 0x8004d00a].
[/b]
But if I stop and restart SQL, the TRAN stuff then works.. but only once,
which is bizarre. If I run it a second time it errors again. The field I'm
updating doesn't need to be unique.
Any ideas?
"Jeff Dillon" wrote:
> The error does imply Access Denied. Use your AS400 query interface, log on
> as the user this job is running under, and manually test the SQL
> Jeff
> "Kendo Nagasaki" <Kendo Nagasaki@.discussions.microsoft.com> wrote in message
> news:034E693C-0530-4719-B771-A472C9E83D9B@.microsoft.com...
> > SQL2000 SP3a
> >
> > I have a statement as follows which attempts to insert data into an AS400
> > table using a linked server.
> >
> > [b]SET XACT_ABORT ON
> > GO
> > BEGIN DISTRIBUTED TRAN
> > INSERT OPENQUERY(LS_HMVCASW1,
> > 'SELECT
> > FIELD
> > FROM
> > WARDOUR1.PCUPDDTA.KENNY
> > WHERE 1=0') --ADD WHERE 1=0 TO STOP QUERY RETURNING ANY VALUES
> > SELECT
> > 'X'
> >
> > COMMIT TRAN
> > SET XACT_ABORT OFF
> > GO[/b]
> >
> > I get the following error:
> >
> > [b]OLE DB provider 'MSDASQL' reported an error. The provider did not give
> > any information about the error.
> > OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowsetChange::InsertRow
> > returned 0x80004005: The provider did not give any information about the
> > error.].[/b]
> >
> >
> > Journaling is set on on the AS400 tables. As far as I can make out, the
> > provider supports distributed transactions - question is how? The user in
> > the LS has correct permissions on AS400.
> >
> > Any help much appreciated.
>
>

Error updating a DateTime field

Hi, I'm having trouble updating a DateTime field in my SQL database. Here is what I'm trying to do...I retrieve the existing value in the DateTime field (usually a bum date like 1/1/1900 00:00:00:00), then put it in a variable. Later, depending on some conditions, I'll either update the DateTime field to today's date (which works great) or set it back equal to the existing value from the variable (this one messes up and says "SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM. "). There is a ton more than this but here are the relevant snippets:
<code>
Dim CompDate As DateTime
Dim aComm As SQLCommand
Dim aReader As SQLDataReader
Dim bSQL,bConn As String
bSQL= "SELECT CompleteDate,StatusOfMarkout FROM Tickets WHERE TicketName=" _ & CHR(39) & Trim(Ticket.Text) & CHR(39)
bConn = serverStuff aConn = New SQLConnection(bConn)
aComm = New SQLCommand(bSQL,aConn)
aConn.Open()
result = aComm.ExecuteReader()
'fills controls with data
While result.Read()
CompDate = result("CompleteDate")
PreviousMarkoutStatus.Text = result("StatusOfMarkout")
End While
result.Close()
aConn.Close()
sSqlCmd ="Update OneCallTickets CompleteDate=@.CompleteDate, StatusOfMarkout=@.StatusOfMarkout WHERE TicketFileName=@.TicketFileName"
dim SqlCon as New SqlConnection(serverStuff)
dim SqlCmd as new SqlCommand(sSqlCmd, SqlCon)
If Flag1List.SelectedItem.Value = "No Change" Then
SqlCmd.Parameters.Add(new SqlParameter("@.Flag1", SqlDbType.NVarChar,35))
SqlCmd.Parameters("@.Flag1").Value = PreviousMarkoutStatus.Text
SqlCmd.Parameters.Add(new SqlParameter("@.CompleteDate", SqlDbType.DateTime, 8))
SqlCmd.Parameters("@.CompleteDate").Value = CompDate
Else
SqlCmd.Parameters.Add(new SqlParameter("@.Flag1", SqlDbType.NVarChar,35))
SqlCmd.Parameters("@.Flag1").Value = CurrentStatus.Text
SqlCmd.Parameters.Add(new SqlParameter("@.CompleteDate", SqlDbType.DateTime, 8))
SqlCmd.Parameters("@.CompleteDate").Value = Today()
End If
SqlCon.Open()
SqlCmd.ExecuteNonQuery()
SqlCon.Close()
</code>
Can anybody help me with this? Thanks a bunchIs your CompDate a DateTime or is it a string? #1 make sure it is a DateTime.
You might also try using the Convert function in your procedure to convert the argument to a SQL DateTime and see what happens.|||

Yes, the value I'm reading from the database is 100% a datetime. Could you give me an example of how to convert? Thanks

|||

I think you need the DateDiff function of both VB .NET and SQL Server and also change your data type to SmallDateTime it has less resolution if the seconds are not important. Try the links below for sample code using TimeSpan with DateDiff. Hope this helps.
http://blogs.msdn.com/vbfaq/

http://www.stanford.edu/~bsuter/sql-datecomputations.html

|||Hmm, I guess I don't understand. I read through those links and all I could find was how to calculate the difference between two dates. I couldn't really find an answer in there?|||CONVERT(DATETIME, Your_Date_Field)|||

When I try that here:
SqlCmd.Parameters.Add(new SqlParameter("@.CompleteDate", SqlDbType.DateTime, 8))
SqlCmd.Parameters("@.CompleteDate").Value = CONVERT(DATETIME, CompDate)
I get a Compiler Error Message: BC30684: 'CONVERT' is a type and cannot be used as an expression.
Should I be using it somewhere else?

|||I was assuming you are using a stored procedure to do the work. The CONVERT function is a T_SQL function and should be done inside of a stored procedure or SQL statement.

Error updating a data source

I have a strange problem and not sure where to go.
If I go into Report Manager and create a datasource, RS will create the
datasource and it will work properly. However if I go into that datasource
and edit the connection string, I get an error that the item could not be
found. The log file shows:
<Header>
<Product>Microsoft SQL Server Reporting Services Version
8.00.878.00</Product>
<Locale>en-US</Locale>
<TimeZone>Central Standard Time</TimeZone>
<Path>C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\LogFiles\ReportServerWebApp__02_19_2005_13_00_31.log</Path>
<SystemName>TRANQ</SystemName>
<OSName>Microsoft Windows NT 5.0.2195.0</OSName>
<OSVersion>5.0.2195.0</OSVersion>
</Header>
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
MaxScheduleWait to default value of '1' second(s) because it was not
specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
DatabaseQueryTimeout to default value of '30' second(s) because it was not
specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing InstanceName
to default value of 'MSSQLSERVER.1' because it was not specified in
Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
ProcessRecycleOptions to default value of '0' because it was not specified
in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
RunningRequestsScavengerCycle to default value of '30' second(s) because it
was not specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
RunningRequestsDbCycle to default value of '30' second(s) because it was not
specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
RunningRequestsAge to default value of '30' second(s) because it was not
specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
CleanupCycleMinutes to default value of '10' minute(s) because it was not
specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
SecureConnectionLevel to default value of '1' because it was not specified
in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
DisplayErrorLink to 'True' as specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
WebServiceUseFileShareStorage to default value of 'False' because it was not
specified in Configuration file.
aspnet_wp!ui!aa0!2/19/2005-13:01:39:: e ERROR:
System.Web.Services.Protocols.SoapException: The item
'/TSIReports/Reports/test' cannot be found. -->
Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: The
item '/TSIReports/Reports/test' cannot be found.
at
Microsoft.ReportingServices.Library.RSService._SetDataSourceContents(String
path, DataSourceDefinition dataSourceDefinition)
at
Microsoft.ReportingServices.Library.RSService.SetDataSourceContents(CallParameters parameters)
at Microsoft.ReportingServices.Library.RSService.ExecuteBatch(Guid batchId)
at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
-- End of inner exception stack trace --
at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
aspnet_wp!ui!aa0!2/19/2005-13:01:40:: e ERROR: HTTP status code --> 200
--Details--
System.Web.Services.Protocols.SoapException:
System.Web.Services.Protocols.SoapException: The item
'/TSIReports/Reports/test' cannot be found. -->
Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: The
item '/TSIReports/Reports/test' cannot be found.
at
Microsoft.ReportingServices.Library.RSService._SetDataSourceContents(String
path, DataSourceDefinition dataSourceDefinition)
at
Microsoft.ReportingServices.Library.RSService.SetDataSourceContents(CallParameters parameters)
at Microsoft.ReportingServices.Library.RSService.ExecuteBatch(Guid batchId)
at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
-- End of inner exception stack trace --
at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
at Microsoft.ReportingServices.UI.BaseProperties.ApplyChanges()
at Microsoft.ReportingServices.UI.DataSourceProperties.ApplyChanges()
at Microsoft.ReportingServices.UI.BaseApplyPage.ApplyBtn_Click(Object
sender, EventArgs e)
at Microsoft.ReportingServices.UI.ScriptButton.OnClick(EventArgs e)
at Microsoft.ReportingServices.UI.ScriptButton.RaisePostBackEvent(String
eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain()
aspnet_wp!ui!aa0!2/19/2005-13:01:41:: e ERROR: Exception in ShowErrorPage:
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String
errMsg) at at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String
errMsg)
It does not matter if I update the data source programatically either, the
result is the same. I see nothing on this server that is different than any
other servers that I have setup and worked with. I am a admin on the box and
RS is running locally. I have uninstalled and reinstalled to no avail.
Any ideas? It seems like some type of rights issue, but as admin, I am a
content manager and that is applied at the home page level, so should trickle
down to all objects and folders. It is a 2000 box with SP4, RS with SP1.
ThanksI'm not 100% sure about your problem in particular, but I have found
that editing datasources after they have been created in a bad thing,
unless you change the XML file by hand.
Jeff Morgan wrote:
> I have a strange problem and not sure where to go.
> If I go into Report Manager and create a datasource, RS will create the
> datasource and it will work properly. However if I go into that datasource
> and edit the connection string, I get an error that the item could not be
> found. The log file shows:
> <Header>
> <Product>Microsoft SQL Server Reporting Services Version
> 8.00.878.00</Product>
> <Locale>en-US</Locale>
> <TimeZone>Central Standard Time</TimeZone>
> <Path>C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
> Services\LogFiles\ReportServerWebApp__02_19_2005_13_00_31.log</Path>
> <SystemName>TRANQ</SystemName>
> <OSName>Microsoft Windows NT 5.0.2195.0</OSName>
> <OSVersion>5.0.2195.0</OSVersion>
> </Header>
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> MaxScheduleWait to default value of '1' second(s) because it was not
> specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> DatabaseQueryTimeout to default value of '30' second(s) because it was not
> specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing InstanceName
> to default value of 'MSSQLSERVER.1' because it was not specified in
> Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> ProcessRecycleOptions to default value of '0' because it was not specified
> in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> RunningRequestsScavengerCycle to default value of '30' second(s) because it
> was not specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> RunningRequestsDbCycle to default value of '30' second(s) because it was not
> specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> RunningRequestsAge to default value of '30' second(s) because it was not
> specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> CleanupCycleMinutes to default value of '10' minute(s) because it was not
> specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> SecureConnectionLevel to default value of '1' because it was not specified
> in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> DisplayErrorLink to 'True' as specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> WebServiceUseFileShareStorage to default value of 'False' because it was not
> specified in Configuration file.
> aspnet_wp!ui!aa0!2/19/2005-13:01:39:: e ERROR:
> System.Web.Services.Protocols.SoapException: The item
> '/TSIReports/Reports/test' cannot be found. -->
> Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: The
> item '/TSIReports/Reports/test' cannot be found.
> at
> Microsoft.ReportingServices.Library.RSService._SetDataSourceContents(String
> path, DataSourceDefinition dataSourceDefinition)
> at
> Microsoft.ReportingServices.Library.RSService.SetDataSourceContents(CallParameters parameters)
> at Microsoft.ReportingServices.Library.RSService.ExecuteBatch(Guid batchId)
> at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
> -- End of inner exception stack trace --
> at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
> aspnet_wp!ui!aa0!2/19/2005-13:01:40:: e ERROR: HTTP status code --> 200
> --Details--
> System.Web.Services.Protocols.SoapException:
> System.Web.Services.Protocols.SoapException: The item
> '/TSIReports/Reports/test' cannot be found. -->
> Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: The
> item '/TSIReports/Reports/test' cannot be found.
> at
> Microsoft.ReportingServices.Library.RSService._SetDataSourceContents(String
> path, DataSourceDefinition dataSourceDefinition)
> at
> Microsoft.ReportingServices.Library.RSService.SetDataSourceContents(CallParameters parameters)
> at Microsoft.ReportingServices.Library.RSService.ExecuteBatch(Guid batchId)
> at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
> -- End of inner exception stack trace --
> at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
> at Microsoft.ReportingServices.UI.BaseProperties.ApplyChanges()
> at Microsoft.ReportingServices.UI.DataSourceProperties.ApplyChanges()
> at Microsoft.ReportingServices.UI.BaseApplyPage.ApplyBtn_Click(Object
> sender, EventArgs e)
> at Microsoft.ReportingServices.UI.ScriptButton.OnClick(EventArgs e)
> at Microsoft.ReportingServices.UI.ScriptButton.RaisePostBackEvent(String
> eventArgument)
> at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
> sourceControl, String eventArgument)
> at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
> at System.Web.UI.Page.ProcessRequestMain()
> aspnet_wp!ui!aa0!2/19/2005-13:01:41:: e ERROR: Exception in ShowErrorPage:
> System.Threading.ThreadAbortException: Thread was being aborted.
> at System.Threading.Thread.AbortInternal()
> at System.Threading.Thread.Abort(Object stateInfo)
> at System.Web.HttpResponse.End()
> at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
> at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String
> errMsg) at at System.Threading.Thread.AbortInternal()
> at System.Threading.Thread.Abort(Object stateInfo)
> at System.Web.HttpResponse.End()
> at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
> at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String
> errMsg)
>
> It does not matter if I update the data source programatically either, the
> result is the same. I see nothing on this server that is different than any
> other servers that I have setup and worked with. I am a admin on the box and
> RS is running locally. I have uninstalled and reinstalled to no avail.
> Any ideas? It seems like some type of rights issue, but as admin, I am a
> content manager and that is applied at the home page level, so should trickle
> down to all objects and folders. It is a 2000 box with SP4, RS with SP1.
> Thanks
>