Showing posts with label following. Show all posts
Showing posts with label following. Show all posts

Tuesday, March 27, 2012

Can not initialize report server or run rsactivate

I get the following error when running the RSActivate utility:
"Unable to find Reporting Services WMI namespace = on <machinename>. Reporting Services may not be installed"
This is an urgent problem so any suggestions would be welcomed.
*****************************************
* This message was posted via http://www.sqlmonster.com
*
* Report spam or abuse by clicking the following URL:
* http://www.sqlmonster.com/Uwe/Abuse.aspx?aid=d737907db3624cb18a4c69da471c4572
*****************************************Double-check that that WMI Service is started in the Services Manager/MMC.
Edgar,
"Jared Smith via SQLMonster.com" wrote:
> I get the following error when running the RSActivate utility:
> "Unable to find Reporting Services WMI namespace => on <machinename>. Reporting Services may not be installed"
> This is an urgent problem so any suggestions would be welcomed.
> *****************************************
> * This message was posted via http://www.sqlmonster.com
> *
> * Report spam or abuse by clicking the following URL:
> * http://www.sqlmonster.com/Uwe/Abuse.aspx?aid=d737907db3624cb18a4c69da471c4572
> *****************************************
>

can not drop user from database

I'm getting the can't drop user error. Is there a way to change the schema owner via smo? I've tried the following code to change the schema owner back to a different user. I don't get an error or exception but the schema owner doesn't change.

Database database = new Server("my server").Databases["my Database"];

database.Schemas["db_owner"].Owner = "db_owner";

Never mind, the following worked.

Database database = new Server("my server").Databases["my Database"];

database.Schemas["db_owner"].Owner = "db_owner";

database.Schemas["db_owner"].Alter();

|||

John, giving that your question is SMO related, I split it from the thread you posted it in and I moved it to the SMO forum.

Thanks
Laurentiu

Sunday, March 25, 2012

Can not create a connection to Oracle data source when report is processing

hello,

I am getting following error message when I try to view a report from reporting services. The report runs fine but after while i get the following error message. The error message will go away if i open the report manage from the server and run the report once. The report will run fine for a while from anywhere but afterwhile i get following error message.

An error has occurred during report processing. (rsProcessingAborted) Get Online Help

Cannot create a connection to data source 'OracleConnProc'. (rsErrorOpeningConnection)

Error while trying to retrieve text for error ORA-12154

can someone please help me.

Most likely there is a problem with the file system permissions of your Oracle client installation on the report server machine. The file system permissions probably prevent the account configured to run the RS Web Service to load certain Oracle client configuration files.

Have you looked at the following KB article? http://support.microsoft.com/default.aspx?scid=kb;en-us;870668

-- Robert

|||

Hello Robert,

I followed steps from your suggested article. I am still having same problem, but at the same time I could not verify my changes as suggested in the article.

Note To verify the configured account for the Reporting Services Web Service, you can open the RSReportServer.config file. You will find informaiton that is similar to the following:

<WebServiceAccount>NT Authority\NetworkService</WebServiceAccount>

I was thinking to reinstall oracle client on my reporting server, but please let me know if you have any other suggestion.

Thanks,

Vimal

Can not Copy and Paste

Hi,

For some reason I can not cut and past objects in BIDS?

I receive the following error:

TITLE: Microsoft Visual Studio

An error occurred while objects were being copied. SSIS Designer could not serialize the SSIS runtime objects.


ADDITIONAL INFORMATION:

Could not copy object 'XSQL CICDB Synonym' to the clipboard.
(Microsoft.DataTransformationServices.Design)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%u00ae+Visual+Studio%u00ae+2005&ProdVer=8.0.50727.42&EvtSrc=Microsoft.DataTransformationServices.Design.SR&EvtID=SerializeComponentsFailed&LinkId=20476

Invalid access to memory location. (Exception from HRESULT: 0x800703E6) (Microsoft.SqlServer.ManagedDTS)


BUTTONS:

OK

Any ideas why?

Thanks!

just a hunch: try rebooting your machine.|||

Rebooted several times. Does not resolve issue.

Thanks!

|||

willajo wrote:

Rebooted several times. Does not resolve issue.

Thanks!

just a hunch: try re-installing BIDS.sql

Thursday, March 22, 2012

Can not connect to SQL Server

A user who has been connected to our server for several years can not longer
connect.
The error through ODBC shows the following :
Connection failed:
SQLState: '01000'
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Connection Open
(Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 6
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Specified SQL Server not
found.
No one else in the firm is having troubles connecting to the server. The
server has SP4 applied.Can he ping the server by hostname? Check to his ODBC connection to ensure
that it is correct. It sounds like a name resolution problem.
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Snoopstah" <Snoopstah@.discussions.microsoft.com> wrote in message
news:84167888-D06E-4E37-8030-103ABF66F29D@.microsoft.com...
>A user who has been connected to our server for several years can not
>longer
> connect.
> The error through ODBC shows the following :
> Connection failed:
> SQLState: '01000'
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Connection Open
> (Connect()).
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 6
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Specified SQL Server
> not
> found.
> No one else in the firm is having troubles connecting to the server. The
> server has SP4 applied.|||They can ping and connect to other named instances on the server.
I have since found if they put "SERVERNAME\PortNumber" instead of
"SERVERNAME\INSTANCENAME" in their definition it all works.
Why is that ?
"Hilary Cotter" wrote:
> Can he ping the server by hostname? Check to his ODBC connection to ensure
> that it is correct. It sounds like a name resolution problem.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Snoopstah" <Snoopstah@.discussions.microsoft.com> wrote in message
> news:84167888-D06E-4E37-8030-103ABF66F29D@.microsoft.com...
> >A user who has been connected to our server for several years can not
> >longer
> > connect.
> >
> > The error through ODBC shows the following :
> > Connection failed:
> > SQLState: '01000'
> > [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Connection Open
> > (Connect()).
> > Connection failed:
> > SQLState: '08001'
> > SQL Server Error: 6
> > [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Specified SQL Server
> > not
> > found.
> >
> > No one else in the firm is having troubles connecting to the server. The
> > server has SP4 applied.
>
>

Can not connect to SQL Server

A user who has been connected to our server for several years can not longer
connect.
The error through ODBC shows the following :
Connection failed:
SQLState: '01000'
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Connection Op
en
(Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 6
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Specified SQL
Server not
found.
No one else in the firm is having troubles connecting to the server. The
server has SP4 applied.Can he ping the server by hostname? Check to his ODBC connection to ensure
that it is correct. It sounds like a name resolution problem.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Snoopstah" <Snoopstah@.discussions.microsoft.com> wrote in message
news:84167888-D06E-4E37-8030-103ABF66F29D@.microsoft.com...
>A user who has been connected to our server for several years can not
>longer
> connect.
> The error through ODBC shows the following :
> Connection failed:
> SQLState: '01000'
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Connection
Open
> (Connect()).
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 6
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Specified S
QL Server
> not
> found.
> No one else in the firm is having troubles connecting to the server. The
> server has SP4 applied.|||They can ping and connect to other named instances on the server.
I have since found if they put "SERVERNAME\PortNumber" instead of
"SERVERNAME\INSTANCENAME" in their definition it all works.
Why is that ?
"Hilary Cotter" wrote:

> Can he ping the server by hostname? Check to his ODBC connection to ensure
> that it is correct. It sounds like a name resolution problem.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Snoopstah" <Snoopstah@.discussions.microsoft.com> wrote in message
> news:84167888-D06E-4E37-8030-103ABF66F29D@.microsoft.com...
>
>sql

Can not connect to SQL Server

A user who has been connected to our server for several years can not longer
connect.
The error through ODBC shows the following :
Connection failed:
SQLState: '01000'
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Connection Open
(Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 6
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Specified SQL Server not
found.
No one else in the firm is having troubles connecting to the server. The
server has SP4 applied.
Can he ping the server by hostname? Check to his ODBC connection to ensure
that it is correct. It sounds like a name resolution problem.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Snoopstah" <Snoopstah@.discussions.microsoft.com> wrote in message
news:84167888-D06E-4E37-8030-103ABF66F29D@.microsoft.com...
>A user who has been connected to our server for several years can not
>longer
> connect.
> The error through ODBC shows the following :
> Connection failed:
> SQLState: '01000'
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Connection Open
> (Connect()).
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 6
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Specified SQL Server
> not
> found.
> No one else in the firm is having troubles connecting to the server. The
> server has SP4 applied.
|||They can ping and connect to other named instances on the server.
I have since found if they put "SERVERNAME\PortNumber" instead of
"SERVERNAME\INSTANCENAME" in their definition it all works.
Why is that ?
"Hilary Cotter" wrote:

> Can he ping the server by hostname? Check to his ODBC connection to ensure
> that it is correct. It sounds like a name resolution problem.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Snoopstah" <Snoopstah@.discussions.microsoft.com> wrote in message
> news:84167888-D06E-4E37-8030-103ABF66F29D@.microsoft.com...
>
>

Can not connect to SQL Express from a different computer

Hello,

I have the following problem: I can not connect to an instance of SQL Express from a computer different than the one that the SQL Express is installed on.

When trying to connect through Management Express Studio Express CTP I get the following error:

****

TITLE: Connect to Server

Cannot connect to (nameofserver)\SQLEXPRESS.


ADDITIONAL INFORMATION:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476

****

I can connect to the Express instance without problems from the same computer on which the server is installed on.

SQL Express is installed on a computer running Windows 2003 with SP1.

That computer also has SQL Server 2000, Workgroup Edition installed.

Both, SQL Express and Management Studio have been downloaded form the MSDN web site last week (so, I believe, they're the latest available versions).

In the SQL Server Configuration Manager, under SQL Server 2005 Network Configuration -> Protocols for SQLEXPRESS, Shared Memory, Named Pipes and TCP/IP are enabled, VIA is disabled.

In the SQL Server Configuration Manager, under SQL Server 2005 Native Client Configuration -> Client Protocols, Shared Memory, Named Pipes and TCP/IP are enabled, VIA is disabled.

After enabling these protocols the computer was restarted.

SQL Server Browser service is running.

Both, SQL Server and SQL Server Browser, were set to run under the deafult NetworkService account during setup.

There is a warning in the Event Log (Application section) logged by the SQLBrowser which says:

The configuration of the AdminConnection\TCP protocol in the SQL instance SQLEXPRESS is not valid.

I've searched a lot and tried a lot of different things, but I have not been able to resolve this issue. Please help.

Have you checked the following link: http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx ?|||

Thanks for the link.

I have already tried all the things listed in the article multiple times (enabled protocols, SQL Browser Service running, there is no firewall on the server, I disabled firewall on the client when trying to connect).

(I haven't tried the registry thing because I'm dealing with the final relase of SQL Express and not the CTP.)

I believe my problem has to do with the warning that's logged by the SQL Server Browser service in the Event Log:

The configuration of the AdminConnection\TCP protocol in the SQL instance SQLEXPRESS is not valid.

I have found a couple of references to the same message on the Internet, but none of them offered a solution.

Any other suggestions?

|||

I am also seeing these same symptoms, except I'm just trying to access SQL Express from the same machine it is installed on. I've followed all of the suggested steps I could find, and still get the error message about configuration of AdminConnection\TCP protocol not being valid. I've also, in desperation, disabled the firewall altogether: that didn't change the behavior at all.

I can't get a TCP Connect to SQL Express to work to save my soul.

Can not connect to distributor because distributor_admin is not defined as remote login

Hello everyone,
We set up replication yesterday and it runs beautifully ... once. After
the first replication, we get the following error whenever we try to
access any of the replication admin screens, with the exception of the
"disable replication" screen:
Error 18483: Could not connect to server XXXX because
'distributor_admin' is not defined as a remote login at the server.
Our setup consists of two SQL Server machines, a primary server which
acts as a publisher and a secondary which acts as both distributor and
subscriber. Replication setup works great, as does the initial snapshot
copy. The transaction agent works perfectly as well.
The error goes away if I disable publishing on both machines and set it
up again, but then it breaks as soon as I complete the initial
replication.
Any help? This has everyone here stumped.
Thanks!!
Sorry - posted this to the wrong group. Please ignore.
rich@.adgooroo.com wrote:
> Hello everyone,
> We set up replication yesterday and it runs beautifully ... once. After
> the first replication, we get the following error whenever we try to
> access any of the replication admin screens, with the exception of the
> "disable replication" screen:
> Error 18483: Could not connect to server XXXX because
> 'distributor_admin' is not defined as a remote login at the server.
> Our setup consists of two SQL Server machines, a primary server which
> acts as a publisher and a secondary which acts as both distributor and
> subscriber. Replication setup works great, as does the initial snapshot
> copy. The transaction agent works perfectly as well.
> The error goes away if I disable publishing on both machines and set it
> up again, but then it breaks as soon as I complete the initial
> replication.
> Any help? This has everyone here stumped.
> Thanks!!

Tuesday, March 20, 2012

Can not call SET ROWCOUNT in a UDF - Example

I forgot to supply an example. The following is a minimal function that
gives the error
CREATE FUNCTION KUKU()
RETURNS INT
BEGIN
SET ROWCOUNT 1
return 1
END
"Boaz Ben-Porat" <bbp@.milestone.dk> wrote in message
news:O2BhOfTFGHA.3200@.tk2msftngp13.phx.gbl...
> When I call SET ROWCOUNT <number> inside a User Defined Function I get the
> following error:
> Error 443: Invalid use of 'UNKNOWN TOKEN' within a function.
> I couldn't find anything about this error in the BOL.
> Any solution ?
> TIA
> Boaz Ben-Porat
> Milestone systems
> Debmark
>A scalar UDF, by definition, returns exactly one "row", so what do you need
to override it for, and what do you consider to be a "row"? This returns a
single value... there are no rows or columns...
"Boaz Ben-Porat" <bbp@.milestone.dk> wrote in message
news:eqhochTFGHA.216@.TK2MSFTNGP15.phx.gbl...
>I forgot to supply an example. The following is a minimal function that
>gives the error
> CREATE FUNCTION KUKU()
> RETURNS INT
> BEGIN
> SET ROWCOUNT 1
> return 1
> END
>
>
> "Boaz Ben-Porat" <bbp@.milestone.dk> wrote in message
> news:O2BhOfTFGHA.3200@.tk2msftngp13.phx.gbl...
>

can not access reports

This was working before but all of a sudden when I try to access reports server
http://myserver/reports/
I get the following error:
Access to the path "C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportManager\global.asax" is denied.
Please help..Looks like permissions or users have changed. The Web service user needs
access to this file. Make sure the Web service identity user has
permissions to that file.
| Thread-Topic: can not access reports
| thread-index: AcXEcWiSSksr+4EXS/e+bsnVf1Lr4w==| X-WBNR-Posting-Host: 216.89.4.2
| From: "=?Utf-8?B?c3Fsc3Rlcg==?=" <nospam@.nospam.com>
| Subject: can not access reports
| Date: Wed, 28 Sep 2005 14:13:01 -0700
| Lines: 12
| Message-ID: <CED59F58-B2D0-4768-B03B-64B9590467A1@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.reportingsvcs:53316
| X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
|
| This was working before but all of a sudden when I try to access reports
server
|
| http://myserver/reports/
|
| I get the following error:
|
| Access to the path "C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
| Services\ReportManager\global.asax" is denied.
|
| Please help..
|
|
|

Monday, March 19, 2012

can no longer connect to SQL Server express error:40

Hi,

I have been working for a few weeks on a local SQL server (express) on my computer all worked ok, until 2 days ago I got the following error message:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)

Where can I find the setting for remote connections? Also any idea why this happened?

rgds

Frank

Hi,

see my Screencasts on my website for enabling / configuring Remote Connections.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

Sunday, March 11, 2012

Can it be done with mdx?

I have the following calculated member included in a dataset for a report:

WITH MEMBER MEASURES.TwoYearsSum AS
AGGREGATE({[DIM_Time].[calendar_Year].CURRENTMEMBER,
[DIM_Year].[calendar_Year].CURRENTMEMBER.PREVMEMBER},
[Measures].[customer_id Distinct Count])

What I need is to further filter out in this aggregate measure "customer_id
distinct count" only for the customer_id with the minimum sales_date based
on the first aggregate condition
"AGGREGATE({[DIM_Time].[calendar_Year].CURRENTMEMBER,
[DIM_Time].[calendar_Year].CURRENTMEMBER.PREVMEMBER}...."

The dimensions include in the olap cube are:

dimensions: [dim_time]
[dim_time].[calendar_year]
[dim_time].[sales_date]
dimensions: [dim_customer]
[dim_customer].[customer_id]
dimensions: [dim_store]
[dim_time].[store].[city]
[dim_time].[store].[store_name]

Could you explain what you want at a higher level, with data examples? It's not clear how the minimum sales_date relates to the 2 years being aggregated.|||

Hi Deepak Puri:

Thank you for your reply.

For example data in the olap cube:

customer_id.........city............calendar_year.............sales_date

1..............vancouver............2006.....................10-apr-2006.......min sales_date

1..............vancouver...........2006.....................15-dec-2006

1................calgary.............2007......................26-feb-2007

1..............new york.............2007.....................16-feb-2007

2................calgary............2006.....................13-mar-2006.......min sales_date

2..............new york............2007.....................18-may-2007

2...............calgary.............2007......................29-nov-2007

2..............new york............2007......................10-jul-2007

if the two years aggregate is 2006 and 2007, then the dataset for the distinct customer_id count should return the follows:

city..................distinct_count

vancouver..................1........................only the row with the sales_date 10-apr-2006 (min sales_date) is counted

calgary......................1.......................only the row with the sales-date 13-mar-2006 (min sales_date) is counted

new york...................0........................customer_id can only be counted once, all other records are not couted for other cities.

I hope my explaination is clear.

Thanks

|||

Translating your problem (as I understood it) to Adventure Works, here's a sample query for the count of customers for whom the earliest sale in the selected time period (2002 and 2003) occurred in a particular Product Category. To facilitate verification of the results, the query is limited to customers in Calgary. I adapted a sample from Chris Webb's blog to filter the earliest order date for each customer:

Code Snippet

WITH SET [FirstSales] AS

FILTER(NONEMPTY(

[Customer].[Customer Geography].[Customer].MEMBERS

* [Date].[Date].[Date].MEMBERS

, [Measures].[Internet Sales Amount])

AS MYSET,

MYSET.CURRENTORDINAL = 1 or

NOT(MYSET.CURRENT.ITEM(0) IS MYSET.ITEM(MYSET.CURRENTORDINAL-2).ITEM(0)))

Member [Measures].[CustomersW/FirstSales] as

Count(NonEmpty([FirstSales], [Measures].[Internet Sales Amount])),

FORMAT_STRING = '#,#'

select

{[Measures].[Internet Sales Amount],

[Measures].[CustomersW/FirstSales]} on 0,

[Product].[Product Categories].[Category] on 1

from [Adventure Works]

where ({[Date].[Calendar].[Calendar Year].&[2002],

[Date].[Calendar].[Calendar Year].&[2003]},

[Customer].[Customer Geography].[City].&[Calgary]&[AB])

Internet Sales Amount CustomersW/FirstSales
Accessories $254.23 3
Bikes $12,199.16 5
Clothing $112.97 3
Components (null) 0

Can it be a bug in SQL CE?

Hi!

I use SQL CE with VS.NET 2003. I find the following bug second time.

The table has an "ID int IDENTITY(0,1) PRIMARY KEY,". That is my row identity.

I add rows to the table, then I made some select and update queries. Then I realized that the ID order not in the general order (from 0 to ........)

For example: 6,7,8,0,1,2,3,4,5.

Of course row 6,7 and 8 was added the very last.

The content of each row is not mixed, only the ID order.

Is it a very confused, because we develop mobile invoice programs for PDAs.

What I did wrong?

Thank you!

Do you mean rows are not sorted by ID should you retrieve them with select or IDs are created not in order of insertions? Say, you have integer column in addition to ID, and you've inserted numbers from 0 to 3 into it. Do you get data like this:

2 2

1 1

0 0

3 3

Or like this:

2 0

1 1

0 2

3 3

|||

Duplicate thread from the same user: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=229153&SiteID=1

Follow only the above given thread. This thread will not be monitored any more.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

can insert into but can't update a text column

I can insert into but can't update a text column - see following example :
1) create a table with a text column
CREATE TABLE [dbo].[TestLongText] (
[Id] [int] IDENTITY (1, 1) NOT NULL ,
[FileContent] [text] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
2) insert text from another table into this table
insert into TestLongText(FileContent) select FileContent from
OtherTableWithTextCol where Id = 2
-- works fine
3) try to update this text column with identical text from the other table
update TestLongText set FileContent = (select FileContent from
OtherTableWithTextCol where Id = 2) where id = 1
-- returns this error: The text, ntext, and image data types are invalid in
this subquery or aggregate expression.
Try something like:
[code]
update TestLongText
set FileContent = o.FileContent
from TestLongText t,OtherTableWithTextCol o
where o.Id = 2 and t.Id =1
[/code]
Cristian Lefter, SQL Server MVP
"David Laub" <dlaub@.wheels.com> wrote in message
news:Oa%23NfYUNFHA.3560@.TK2MSFTNGP14.phx.gbl...
>I can insert into but can't update a text column - see following example :
> 1) create a table with a text column
> CREATE TABLE [dbo].[TestLongText] (
> [Id] [int] IDENTITY (1, 1) NOT NULL ,
> [FileContent] [text] NOT NULL
> ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
> 2) insert text from another table into this table
> insert into TestLongText(FileContent) select FileContent from
> OtherTableWithTextCol where Id = 2
> -- works fine
> 3) try to update this text column with identical text from the other table
> update TestLongText set FileContent = (select FileContent from
> OtherTableWithTextCol where Id = 2) where id = 1
> -- returns this error: The text, ntext, and image data types are invalid
> in
> this subquery or aggregate expression.
>
|||Thanks!! That solved it - i forgot about doing an update based on a
join instead of a subquery!
*** Sent via Developersdex http://www.codecomments.com ***

Can MDX or latch a value based on a signal?

Dear All,

Persume that I have a cube with the following measures and dimension:

DimTime, measures.LatchSignal, measures.Voltage

0,1,4

1,0,5

2,0,6

3,0,5

4,1,3

5,0,7

6,0,5

7,1,6

8,0,7

Is there anyway I can repeat the value of voltage on and after the time when latch signal = 1, so that the result is rendered as follows:

DimTime, measures.LatchSignal, measures.Voltage, measure.latchedVoltage

0,1,4,4

1,0,5,4

2,0,6,4

3,0,5,4

4,1,3,3

5,0,7,3

6,0,5,3

7,1,6,6

8,0,7,6

Thanks and regards,

Tony Chun Tung Siu

Hi Tony!

Why do you try to make it in MDX. What the problem do you solve?

I would make it in DSV in oder to get

0,1,4,4

1,0,5,NULL

2,0,6,NULL

3,0,5,NULL

4,1,3,3

5,0,7,NULL

6,0,5,NULL

7,1,6,6

8,0,7,NULL

then apply lastnonempty aggregation function for the measure latchedVoltage

|||

Hi

I just wanna plot a graph for such signal implementation. This works!.

Thanks

Tony

can insert into but can't update a text column

I can insert into but can't update a text column - see following example :
1) create a table with a text column
CREATE TABLE [dbo].[TestLongText] (
[Id] [int] IDENTITY (1, 1) NOT NULL ,
[FileContent] [text] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
2) insert text from another table into this table
insert into TestLongText(FileContent) select FileContent from
OtherTableWithTextCol where Id = 2
-- works fine
3) try to update this text column with identical text from the other table
update TestLongText set FileContent = (select FileContent from
OtherTableWithTextCol where Id = 2) where id = 1
-- returns this error: The text, ntext, and image data types are invalid in
this subquery or aggregate expression.Try something like:
[code]
update TestLongText
set FileContent = o.FileContent
from TestLongText t,OtherTableWithTextCol o
where o.Id = 2 and t.Id =1
[/code]
Cristian Lefter, SQL Server MVP
"David Laub" <dlaub@.wheels.com> wrote in message
news:Oa%23NfYUNFHA.3560@.TK2MSFTNGP14.phx.gbl...
>I can insert into but can't update a text column - see following example :
> 1) create a table with a text column
> CREATE TABLE [dbo].[TestLongText] (
> [Id] [int] IDENTITY (1, 1) NOT NULL ,
> [FileContent] [text] NOT NULL
> ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
> 2) insert text from another table into this table
> insert into TestLongText(FileContent) select FileContent from
> OtherTableWithTextCol where Id = 2
> -- works fine
> 3) try to update this text column with identical text from the other table
> update TestLongText set FileContent = (select FileContent from
> OtherTableWithTextCol where Id = 2) where id = 1
> -- returns this error: The text, ntext, and image data types are invalid
> in
> this subquery or aggregate expression.
>|||Thanks!! That solved it - i forgot about doing an update based on a
join instead of a subquery!
*** Sent via Developersdex http://www.codecomments.com ***

can insert into but can't update a text column

I can insert into but can't update a text column - see following example :
1) create a table with a text column
CREATE TABLE [dbo].[TestLongText] (
[Id] [int] IDENTITY (1, 1) NOT NULL ,
[FileContent] [text] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
2) insert text from another table into this table
insert into TestLongText(FileContent) select FileContent from
OtherTableWithTextCol where Id = 2
-- works fine
3) try to update this text column with identical text from the other table
update TestLongText set FileContent = (select FileContent from
OtherTableWithTextCol where Id = 2) where id = 1
-- returns this error: The text, ntext, and image data types are invalid in
this subquery or aggregate expression.Try something like:
[code]
update TestLongText
set FileContent = o.FileContent
from TestLongText t,OtherTableWithTextCol o
where o.Id = 2 and t.Id =1
[/code]
Cristian Lefter, SQL Server MVP
"David Laub" <dlaub@.wheels.com> wrote in message
news:Oa%23NfYUNFHA.3560@.TK2MSFTNGP14.phx.gbl...
>I can insert into but can't update a text column - see following example :
> 1) create a table with a text column
> CREATE TABLE [dbo].[TestLongText] (
> [Id] [int] IDENTITY (1, 1) NOT NULL ,
> [FileContent] [text] NOT NULL
> ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
> 2) insert text from another table into this table
> insert into TestLongText(FileContent) select FileContent from
> OtherTableWithTextCol where Id = 2
> -- works fine
> 3) try to update this text column with identical text from the other table
> update TestLongText set FileContent = (select FileContent from
> OtherTableWithTextCol where Id = 2) where id = 1
> -- returns this error: The text, ntext, and image data types are invalid
> in
> this subquery or aggregate expression.
>

Thursday, March 8, 2012

Can I use the foreach loop to obtain the sub folder names within a folder?

I have a set of folders with the following structure:

MainFolder

1999

SpreadsheetA.xls

SpreadsheetB.xls

SpreadsheetC.xls

2000

SpreadsheetA.xls

SpreadsheetB.xls

SpreadsheetC.xls

etc.

Is there a way that I can use the foreach loop container to loop the sub folders? My plan was to get the folder name and path into a variable, use this to build the connection string for each file in this folder, carry out the upload for that folder, then move onto the next folder and do the same thing, but I cannot see a way to do this.

Thanks,

Sam

If the list of folders is known and finite then you can just type them into the ForEach Item Enumerator.

If the list changes then you'll need to do something a bit cleverer. Like writing your own Enumerator.

-Jamie

|||

sam2005 wrote:

I have a set of folders with the following structure:

MainFolder

1999

SpreadsheetA.xls

SpreadsheetB.xls

SpreadsheetC.xls

2000

SpreadsheetA.xls

SpreadsheetB.xls

SpreadsheetC.xls

etc.

Is there a way that I can use the foreach loop container to loop the sub folders? My plan was to get the folder name and path into a variable, use this to build the connection string for each file in this folder, carry out the upload for that folder, then move onto the next folder and do the same thing, but I cannot see a way to do this.

Thanks,

Sam


Have you tried the 'traverse sub folders' option on the ForEach object (on the collection pane)

Saturday, February 25, 2012

Can I use MDSE instead of SQL 2000 ??

Hey guru's out there I'm attempting to run a test box with mdse instead of sql 2000 with the commerce kit..i get the following error message...when attempting to access iis: The service is installed and running on xp...

HELP

Server Error in '/CommerceVBSDK' Application.

SQL Server does not exist or access denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: SQL Server does not exist or access denied.

Source Error:

Line 28: Dim products As ASPNET.StarterKit.Commerce.ProductsDB = New ASPNET.StarterKit.Commerce.ProductsDB()
Line 29:
Line 30: MyList.DataSource = products.GetProductCategories()
Line 31: MyList.DataBind()
Line 32:

Source File: C:\Program Files\ASP.NET Starter Kits\ASP.NET Commerce (VBSDK)\CommerceVBSDK\_Menu.ascx Line: 30

Stack Trace:

[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
ASPNET.StarterKit.Commerce.ProductsDB.GetProductCategories()
ASP._Menu_ascx.Page_Load(Object sender, EventArgs e) in C:\Program Files\ASP.NET Starter Kits\ASP.NET Commerce (VBSDK)\CommerceVBSDK\_Menu.ascx:30
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Page.ProcessRequestMain() +731Try creating a blank Database with OSQL and give ASP.NET account DBO permissions in the Database before installing the Commerce Starter kit. Hope this thelps.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmsde2kwrk/html/msde2000webapp.asp

Kind regards,
Gift Peddie