Showing posts with label whenever. Show all posts
Showing posts with label whenever. Show all posts

Tuesday, March 27, 2012

DatasourceView named query creation problem

Hi to all,
I have a problem within the editor of Named Query in Visual Studio.
Whenever I try to add a named query to a Datasourceview I receive the common "Object Reference not seto to an instance of an object". In the PC Visual studio have the SP1 installed, and the Client Components of Sql Server are installed and patched to the Sp2.
I tried to debug the IDE of visual studio using another instance of VS attached to the first but... nothing! What can I do to add a named query to my datasource view ?
Thanks in advance!
Marco

When these kind of strange problems appear I usually do a total reinstall of the software.

Is the data source SQL Server or another database?

You can also tell us about the O/S and version and other software installed on your computer/workstation.

HTH

Thomas Ivarsson

|||Oh... I would be happy if I can NOT DO a total reinstall of the software!
The Datasource is Sql Server (the same datasouce of other table in the Datasourceview), OS is WinXp sp2 continuosly update by windows update. I have a lot of software installed on my computer... (VS 6.0, VS2003, VS2005, VSS, MSOff2007, Firefox, MSSQL Express, Client Tools of SQL Server, MsnMessenger, Dameware remote control, Nero...)
I think it's a problem with the dll that create the dialogue to make the named query, although I don't know wich dll it is!
|||This problem has also appeared on my workstation (it used to work OK).
I am Windows XP, SP2, SQL 2005 SP2, VS2005 SP1.
I've also compared the contents of:
Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\DataWarehouseDesigner\UIRdmsCartridge
with
C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\DataWarehouseDesigner\UIRdmsCartridge
and they match.
I'm not sure what caused the problem to start happening - I suspect an automatic update may be the culprit.
I've also uninstalled/reinstalled & reapplied SP2 for SQL Server 2005 to no effect.
The error dialog does not have a "Details>>" button, so I cant get any further details on the issue.
Note that the error occurs before the "Add New Neamed Query" dialog box appears - when I click OK on the error the dialog box appears for a microsecond and then disappears.

Any help appreciated!
PK

Thursday, March 22, 2012

dataset parameters eliminated

I just discovered that whenever I make a change to a dataset, all the dataset parameters get automatically toasted off the face of the planet. The report parameters remain intact, but their mappings in the Parameters tab of the Dataset dialog are deleted.

Is this a bug? Is there a preventative measure I could take? I'm looking at a coupla tedious hours work to put 'em all back in to all my reports, and I don't want this to happen again.

I'ma go find the espresso machine.My specific case is this :

All of my reports have a db parameter that specifies the database name, plus one or more parameters that are passed into a stored procedure residing on that database. Therefore, an average parameter list & mappings would look like this :

@.db =Parameters!db.Value @.Ledger_Txn =Parameters!Ledger_Txn.Value @.Fiscal_Period =Parameters!Period.Value


And then the sp call looks something like this :

declare @.sp nvarchar(255)
set @.sp = @.db + '.dbo.fancy_financial_report_sp'
exec @.sp @.Ledger_Txn, @.Fiscal_Period

I had to modify my sp calls to handle the case where the database name has a period (.) in it, so it would look like this :

set @.sp = '[' + @.db + '].dbo.fancy_financial_report_sp'

Every report I made this change to, however, had all of the aforementioned Report Parameter-to-SP-parameter mappings toasted.

And then I proceeded to spend a coupla hours replacing all my parameters while listening to Bob Dylan's Infidels repeatedly. I suppose Blood On the Tracks would have been more appropriate.

|||The issue may be that Reporting Services discovers parameters, so when you're dynamically setting the stored procedure it cannot discover them. Try hard-coding the sproc to see if you still have the problem.
I have seen this happen when there are print statements or multiple recordsets in the sproc too.
Are you performing the code inside the RS dataset or in the sproc? Try passing the database in as a parameter to a central sproc instead of doing it in the report, if this is the case.sql

Wednesday, March 21, 2012

Dataset CommandType: TableDirect (Error)

In Visual Studio Report Designer data tab, whenever I try to create a new
dataset with the CommandType "TableDirect" I get the following message:
"An error has occurred while setting the Command Type property of the data
extension command. CommandType.TableDirect is not supported by the .Net
SqlClient Data Provider."
when I click OK to the dataset. I wonder why Visual Studio.NET would contain
a CommandType that is not supported. Any ideas what is causing this?
MalikSee
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDataCommandTypeClassTopic.asp
for details.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Abdul Malik Said" <diplacusis@.hotmNOSPAMail.com> wrote in message
news:uiM%23UDybEHA.1000@.TK2MSFTNGP12.phx.gbl...
> In Visual Studio Report Designer data tab, whenever I try to create a new
> dataset with the CommandType "TableDirect" I get the following message:
> "An error has occurred while setting the Command Type property of the data
> extension command. CommandType.TableDirect is not supported by the .Net
> SqlClient Data Provider."
> when I click OK to the dataset. I wonder why Visual Studio.NET would
contain
> a CommandType that is not supported. Any ideas what is causing this?
> Malik
>sql

Wednesday, March 7, 2012

databse properties causes mmc to close

Please help,
I am running SQL Server 2000 on a Windows 2000 server.
Whenever I open the Enterprise Manager and I right-click on any database and
select properties, the entire console just closes. No error or alert is cre
ated.
What should I doHave a look at Event log and see if there's anything there. Also, be sure to
update your sqlserver with latest service pack (sp3a).
-oj
http://www.rac4sql.net
"john" <anonymous@.discussions.microsoft.com> wrote in message
news:4BEAD47A-C47B-47ED-83EA-6AC9E00BE098@.microsoft.com...
> Please help,
> I am running SQL Server 2000 on a Windows 2000 server.
> Whenever I open the Enterprise Manager and I right-click on any database
and select properties, the entire console just closes. No error or alert is
created.
> What should I do|||I have SP3 loaded and I've checked the event logs but there is nothing regar
ding SQL.

Tuesday, February 14, 2012

Database Trigger on Update Table

Dear All,
I want to create a trigger on a table (A) which can copy the records
into new table(B) whenever it updates or any new record inserted into
the table (A).
Kindly create this trigger for me.
TIACREATE TRIGGER A_IU
ON A
FOR INSERT, UPDATE
AS
INSERT B
SELECT *
FROM Inserted
GO
On 28 Jun 2006 04:54:08 -0700, "Atif Iqbal" <aatif.iqbal@.gmail.com>
wrote:

>Dear All,
>I want to create a trigger on a table (A) which can copy the records
>into new table(B) whenever it updates or any new record inserted into
>the table (A).
>Kindly create this trigger for me.
>TIA|||Hi
Marco
create trigger tr_MyTable on MyTable after update
as
if @.@.ROWCOUNT = 0 return
insert MyAuditTable
select i.ID, d.MyColumn, i.MyColumn from inserted i join deleted d on
d.ID = o.Id
"Atif Iqbal" <aatif.iqbal@.gmail.com> wrote in message
news:1151495648.866045.307900@.75g2000cwc.googlegroups.com...
> Dear All,
> I want to create a trigger on a table (A) which can copy the records
> into new table(B) whenever it updates or any new record inserted into
> the table (A).
> Kindly create this trigger for me.
> TIA
>