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

Sunday, March 25, 2012

ASP writing data to SQL Server 2000

I am having a problem with an ASP program that inserts data into a table on
SQL Server 2000.

No error msg is returned upon submission and the confirmation msg that
displays after the commit command is sent to the server displays, but when
we go to the DB, the data sent isn't there. This is an occassional
occurance and usually the data is there, just some times, it isn't. Other
forms function just fine, using the *exact* same file to perform the submit
function (all the forms "include" the same submit page). The only
difference we can find is a trigger on the table having problems which
executes upon update, capturing the information about who updated the record
when. From what we can see, this is the only programmatic difference. The
other thought tickling our minds was the possiblity of a simultaneous
submission, since all the users submit with the same db user name via the
form, if user 1's data gets written but not yet commited, user 2's data is
submitted, then the commit transaction is submitted by user 1 as the program
steps run in sequence, would the commit by user one cause eiither of the
records inserted but not commited to be lost? If so, why wouldn't that be causing problems on other forms ...Can you post some of the code that is being used? Particularly the trigger code... Also, use profiler to watch what is being sent to the SQL Server to determine if it is a SQL issue, or a ASP code issue.|||

Thank you Louis,

I will look into getting profiler turned on.

The trigger is as follows (specific variables replaced with generic names):

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


CREATE TRIGGER [trig_Table_doUpdateTimestamp] ON [dbo].[Table_1_0]
FOR UPDATE
AS
set nocount on
declare @.var1 datetime
declare @.var2 varchar(50)
declare @.var3 varchar(50)
declare @.var4 varchar(50)
declare @.var5 varchar(30)
set @.var1 = (select sourc_var1 from inserted)
set @.var2 = (select sourc_var2 from inserted)
set @.var3 = (select sourc_var3 from inserted)
set @.var4 = (select sourc_var4 from inserted)
set @.var5 = (select sourc_var5 from inserted)
update Table_1_0 set lastUpdateDT = getdate(), numberChanges = ( ( numberChanges + abs(numberChanges) ) /2 ) + 1 , lastupdateUser = SUSER_SNAME()
where sourc_var1 = @.var1 and sourc_var2 = @.var2 and sourc_var3 = @.var3 and sourc_var4 = @.var4 and sourc_var5 = @.var5
GO

SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

ASP upload image file

Im writing an asp page which allows users to upload files which are then
saved in a database table as an image. The problem is that the webpage is on
one server and the data is stored on another server, I can save the image to
the server the webpages are on but not the other, just get the error:
ADODB.Recordset error '800a0cb3'
Current Recordset does not support updating. This may be a limitation of the
provider, or of the selected locktype.
Is it possible to do this?
Chris,
is the db on the same internal network as the webserver?
if it is i dont think thats your problem, post some code.
Mike
www.michaelevanchik.com
"chris2583" wrote:

> Im writing an asp page which allows users to upload files which are then
> saved in a database table as an image. The problem is that the webpage is on
> one server and the data is stored on another server, I can save the image to
> the server the webpages are on but not the other, just get the error:
> ADODB.Recordset error '800a0cb3'
> Current Recordset does not support updating. This may be a limitation of the
> provider, or of the selected locktype.
> Is it possible to do this?
|||For Each File In Uploader.Files.Items
' Open the table you are saving the file to
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open "select * from test",conn,2,2
RS.AddNew ' create a new record
RS("filename") = File.FileName
RS("filesize") = File.FileSize
RS("contenttype") = File.ContentType
' Save the file to the database
File.SaveToDatabase RS("filedata")
' Commit the changes and close
RS.Update
RS.Close
Next
All the servers are on the same internal network. I have an included asp
page which has the FileUploader class. This is the code that works, when I
change source parameter in the RS.Open line to the table on the other server
it fails on the RS.AddNew line.
"Michael Evanchik" wrote:

> Chris,
> is the db on the same internal network as the webserver?
> if it is i dont think thats your problem, post some code.
> Mike
> www.michaelevanchik.com
>
sql

ASP upload image file

Im writing an asp page which allows users to upload files which are then
saved in a database table as an image. The problem is that the webpage is on
one server and the data is stored on another server, I can save the image to
the server the webpages are on but not the other, just get the error:
ADODB.Recordset error '800a0cb3'
Current Recordset does not support updating. This may be a limitation of the
provider, or of the selected locktype.
Is it possible to do this?Chris,
is the db on the same internal network as the webserver?
if it is i dont think thats your problem, post some code.
Mike
www.michaelevanchik.com
"chris2583" wrote:

> Im writing an asp page which allows users to upload files which are then
> saved in a database table as an image. The problem is that the webpage is
on
> one server and the data is stored on another server, I can save the image
to
> the server the webpages are on but not the other, just get the error:
> ADODB.Recordset error '800a0cb3'
> Current Recordset does not support updating. This may be a limitation of t
he
> provider, or of the selected locktype.
> Is it possible to do this?|||For Each File In Uploader.Files.Items
' Open the table you are saving the file to
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open "select * from test",conn,2,2
RS.AddNew ' create a new record
RS("filename") = File.FileName
RS("filesize") = File.FileSize
RS("contenttype") = File.ContentType
' Save the file to the database
File.SaveToDatabase RS("filedata")
' Commit the changes and close
RS.Update
RS.Close
Next
All the servers are on the same internal network. I have an included asp
page which has the FileUploader class. This is the code that works, when I
change source parameter in the RS.Open line to the table on the other server
it fails on the RS.AddNew line.
"Michael Evanchik" wrote:

> Chris,
> is the db on the same internal network as the webserver?
> if it is i dont think thats your problem, post some code.
> Mike
> www.michaelevanchik.com
>

Thursday, March 22, 2012

ASP Programming Question (build a calendar and connect with SQL Se

Hi anyone,
I wish to build an ASP calendar table and when I click on the calendar
specific date, it will automatically add the date into the SQL Server table.
The table must be in Year, month and date
--
regards seowhuaHi
Please visit at http://www.aspfaq.com/show.asp?id=2519 written by Aaron
"seowhua" <seowhua@.discussions.microsoft.com> wrote in message
news:3552695A-4AF2-4AE9-9AA6-8723A1B33230@.microsoft.com...
> Hi anyone,
> I wish to build an ASP calendar table and when I click on the calendar
> specific date, it will automatically add the date into the SQL Server
> table.
> The table must be in Year, month and date
> --
> regards seowhua

Tuesday, March 20, 2012

asking help on Full Outer Join on multi-tables

Asking help from a challenge problem in SQL.

Table a: Phone aMonth aCost Company
1231231233 08/01 4.95 AA
1231231233 07/01 4.95 AA
.....
Table b: Phone bMonth bCost Company
1231231233 10/01 12.87 AA
1231231233 09/01 13.87 AA
1231231233 08/01 15.87 AA
1231231233 07/01 17.87 AA
1231231233 06/01 11.87 AA
.....
Table c: Phone cMonth cCost Company
1231231233 10/01 1.00 AA
1231231233 09/01 1.5 AA
1231231233 08/01 1.5 AA
1231231233 07/01 1.0 AA
.....

Now I need to FULL JOIN These three tables to get a view :
My query in SQL is as following:

Create View MonthView AS
select
case when
(case when a.Phone is null then b.Phone else a.Phone end) is null then c.Phone else
(case when a.Phone is null then b.Phone else a.Phone end) end as Phone,
case when
(case when a.aMonth is null then b.bMonth else a.aMonth end) is null then c.cMonth else
(case when a.aMonth is null then b.bMonth else a.aMonth end) end as TranMonth,
case when
(case when a.company is null then b.company else a.company end) is null then c.company else
(case when a.company is null then b.company else a.company end) end as company,
a.aCost, b.bCost, c.cCost
from a full JOIN b
on a.Phone=b.Phone and a.aMonth=b.bMonth and a.company=b.company
full JOIN c
on a.Phone=c.Phone and a.aMonth=c.cMonth and a.company=c.company

Suppose I will get a view like this:
Phone TranMonth aCost bCost cCost Company
1231231233 10/01 NULL 12.87 1.00 AA
1231231233 09/01 NULL 13.87 1.50 AA
1231231233 08/01 4.95 15.87 1.50 AA
1231231233 07/01 4.95 17.87 1.00 AA
1231231233 06/01 NULL 11.87 NULL AA

However, I got a view as

Phone TranMonth aCost bCost cCost Company
1231231233 10/01 NULL NULL 1.00 AA
1231231233 10/01 NULL 12.87 NULL AA
1231231233 09/01 NULL 13.87 NULL AA
1231231233 09/01 NULL NULL 1.50 AA
1231231233 08/01 4.95 15.87 1.50 AA
1231231233 07/01 4.95 17.87 1.00 AA
1231231233 06/01 NULL 11.87 NULL AA

I know that is because of the FULL JOIN of three tables with the case statement will cost this duplicated TranMonth problem. If I just bring down into 2 views which that the 1st view FULL
JOIN two tables a and b, then the 2nd view FULL JOIN the 1st view and table c. However, I can't simply do that.

I can't just change the
table a FULL JOIN table c ON
a.Phone=c.Phone and a.aMonth=c.cMonth and a.company=c.company
into
table b FULL JOIN table c ON
b.Phone=c.Phone and b.bMonth=c.cMonth and b.company=c.company
This will solve this example phone: 1231231233 but will cost the same problem with other phone numbers.

What I need to do is modify the view and make it get the correct result. Is anyone can give me any piece of suggestion would be very very appreciated.

Thank you very much in advanced.If all you need is a hint, GROUP BY.

Look at Coalesce() too, it won't fix any problems, but it will make the syntax a lot cleaner.

-PatP|||Thank Pat for replying.

Could you talk more about the GROUP BY? And I will try to do more research by myself as well.

I will post on my answer if I got any.

If all you need is a hint, GROUP BY.

Look at Coalesce() too, it won't fix any problems, but it will make the syntax a lot cleaner.

-PatP|||I could talk for hours about GROUP BY, but it would bore you to tears... I'll let you chew on this one a bit (a couple of hours), and if you don't have a solution by then I'll offer one. I'm betting that you find your own solution long before then though, because you seem to have a good grasp of the fundamentals and just needed a nudge in the right direction.

-PatP|||Thanks again.

I will try to get my own solution before you fall sleep.

I could talk for hours about GROUP BY, but it would bore you to tears... I'll let you chew on this one a bit (a couple of hours), and if you don't have a solution by then I'll offer one. I'm betting that you find your own solution long before then though, because you seem to have a good grasp of the fundamentals and just needed a nudge in the right direction.

-PatP|||Well, I don't think I can get it.

Please help on the detail.

Thanks again.

I will try to get my own solution before you fall sleep.|||Try:CREATE TABLE leau_a (
Phone VARCHAR(20)
, Month CHAR(5)
, Cost DECIMAL(5,2)
, Company VARCHAR(20)
)

CREATE TABLE leau_b (
Phone VARCHAR(20)
, Month CHAR(5)
, Cost DECIMAL(5,2)
, Company VARCHAR(20)
)

CREATE TABLE leau_c (
Phone VARCHAR(20)
, Month CHAR(5)
, Cost DECIMAL(5,2)
, Company VARCHAR(20)
)

INSERT INTO leau_a (
Phone, Month, Cost, Company
) SELECT '1231231233', '08/01', 4.95, 'AA'
UNION ALL SELECT '1231231233', '07/01', 4.95, 'AA'

INSERT INTO leau_b (
Phone, Month, Cost, Company
) SELECT '1231231233', '10/01', 12.87, 'AA'
UNION ALL SELECT '1231231233', '09/01', 13.87, 'AA'
UNION ALL SELECT '1231231233', '08/01', 15.87, 'AA'
UNION ALL SELECT '1231231233', '07/01', 17.87, 'AA'
UNION ALL SELECT '1231231233', '06/01', 11.87, 'AA'

INSERT INTO leau_c (
Phone, Month, Cost, Company
) SELECT '1231231233', '10/01', 1.00, 'AA'
UNION ALL SELECT '1231231233', '09/01', 1.5, 'AA'
UNION ALL SELECT '1231231233', '08/01', 1.5, 'AA'
UNION ALL SELECT '1231231233', '07/01', 1.0, 'AA'

SELECT Coalesce(a.Phone, b.Phone, c.Phone) AS Phone
, Coalesce(a.Month, b.Month, c.Month) AS Month
, Sum(a.Cost) AS aCost
, Sum(b.Cost) AS bCost
, Sum(c.Cost) AS cCost
, Coalesce(a.Company, b.Company, c.Company) AS Company
FROM leau_a AS a
FULL JOIN leau_b AS b
ON (b.Phone = a.Phone
AND b.Month = a.Month
AND b.Company = a.Company)
FULL JOIN leau_c AS c
ON (c.Phone = Coalesce(a.Phone, b.Phone)
AND c.Month = Coalesce(a.Month, b.Month)
AND c.Company = Coalesce(a.Company, b.Company))
GROUP BY Coalesce(a.Phone, b.Phone, c.Phone)
, Coalesce(a.Month, b.Month, c.Month)
, Coalesce(a.Company, b.Company, c.Company)-patP|||I finally follow your query and get my result. They are correct now.

So in this way, I think I not only can solve this view, but also another view which is FULL JOIN 5 views.

I really appreciate your great help.

Monday, March 19, 2012

Asked a while back - think Ill try again!

This pertains to SQL Server 2000

Do others have the problems that we have in our company, where we have
a field from a table, and need to know all the SQL Server processes
that may change that value? I'm still hoping somebody can tell me of a
tool, or set of queries or something that will document the fields in
the tables and the processes that affect them, along with the values
that it sets. For example:

TableA.FieldA:
sp_InsertNewRec: sets field to Null when new record created
sp_ChangeStatus: sets field to the value of the parameter passed in
tr_LogChanges: sets field to be the current datetime

Maybe we're just too sloppy at my company, but it seems to be fairly
obvious need to have some sort of automated process that can provide
that documentation. With thousands of fields, hundreds of stored
procedures, triggers, DTS's etc..., documenting this information is a
VERY daunting task. Any help at all would be appreciated.

GaryOn 6 Nov 2003 15:19:44 -0800, garyderousse@.yahoo.com (Gary DeRousse)
wrote:
>Do others have the problems that we have in our company, where we have
>a field from a table, and need to know all the SQL Server processes
>that may change that value? I'm still hoping somebody can tell me of a
>tool, or set of queries or something that will document the fields in
>the tables and the processes that affect them, along with the values
>that it sets. For example:

It would perhaps be possible, though not trivial, to construct a
report that extracts what fields and what tables are affected by
procs, triggers, functions, etc. by parsing the entire database's SQL
(which you can create in Enterprise Manager).

It would be very difficult to describe the functionality that said
proc does on said table, since the SQL language is so dynamic. Such
basic technical documentation should have been done by the coder when
the procedure was created, if this level of thoroughness was desired.
You'll find out that reverse engineering a SQL server application is
fairly time consuming. :)
___________
To replay by email, chop off the head!

ASC/DESC Clustered Index - will it make a difference in this scenario?

Imagine the following scenario-

Identity(1,1) column ID is primary key and only clustered index key.

Rows will be inserted regularly into this table, hundreds per day.

Queries will be mostly selecting on the most recent records.

In a year, the row will have half a million records or so and only the most recent records will be used. There will be a forward-rolling hot spot, of most recent records.

Does the direction of the ID column in the clustered index make a difference?

I'm thinking no, because query plan will go to that leaf in an index seek regardless of whether it is old or new, "bottom" or "top" of index, especially if the query is very specific on the ID.

I've read this

http://mattadamson.blogspot.com/2005/05/choosing-between-ascending-or.html

but it didn't address (or perhaps didn't need to) this sort of scenario.
You would get the hot spot regardless of the direction of the sort. I do question why you would create this key as a clustered index, though. You may find better performance in the application that uses this data if another index more appropriate to the application's access is chosen for the clustered index. (Your primary key is many times not your best choice for your clustered index.)|||

Allen White wrote:

You would get the hot spot regardless of the direction of the sort. I do question why you would create this key as a clustered index, though. You may find better performance in the application that uses this data if another index more appropriate to the application's access is chosen for the clustered index. (Your primary key is many times not your best choice for your clustered index.)

Not trying to avoid the hotspot. The primary key as IDENTITY as clustered index is very oftentimes, in my experience, the best way to go. I'm not alone, check out articles by Kim Tripp among others. I understand that in this scenario the inserts and selects are all going to be happening in the hotspot, but that's where leveraging SNAPSHOT isolation can help.

I'm pretty certain that ASC/DESC won't make a difference in this scenario but I'd welcome any more input.

Sunday, March 11, 2012

ASC/DESC Clustered Index - will it make a difference in this scenario?

Imagine the following scenario-

Identity(1,1) column ID is primary key and only clustered index key.

Rows will be inserted regularly into this table, hundreds per day.

Queries will be mostly selecting on the most recent records.

In a year, the row will have half a million records or so and only the most recent records will be used. There will be a forward-rolling hot spot, of most recent records.

Does the direction of the ID column in the clustered index make a difference?

I'm thinking no, because query plan will go to that leaf in an index seek regardless of whether it is old or new, "bottom" or "top" of index, especially if the query is very specific on the ID.

I've read this

http://mattadamson.blogspot.com/2005/05/choosing-between-ascending-or.html

but it didn't address (or perhaps didn't need to) this sort of scenario.
You would get the hot spot regardless of the direction of the sort. I do question why you would create this key as a clustered index, though. You may find better performance in the application that uses this data if another index more appropriate to the application's access is chosen for the clustered index. (Your primary key is many times not your best choice for your clustered index.)|||

Allen White wrote:

You would get the hot spot regardless of the direction of the sort. I do question why you would create this key as a clustered index, though. You may find better performance in the application that uses this data if another index more appropriate to the application's access is chosen for the clustered index. (Your primary key is many times not your best choice for your clustered index.)

Not trying to avoid the hotspot. The primary key as IDENTITY as clustered index is very oftentimes, in my experience, the best way to go. I'm not alone, check out articles by Kim Tripp among others. I understand that in this scenario the inserts and selects are all going to be happening in the hotspot, but that's where leveraging SNAPSHOT isolation can help.

I'm pretty certain that ASC/DESC won't make a difference in this scenario but I'd welcome any more input.

AS400 member

I need to query data through SSIS from what I was told is an AS400 DB2 member table. I am assuming this is a sub-table of the main table. I was going to write a correlated sub-query in SQL to get this data, however our AS400 contracted programmer says that there is an easier way and she pointed me to the main table's member. I do not know how to go about accessing this.

Has anybody had experience with this? The AS400 programmer is familiar with SQL syntax, however she does not know how to have SQL grab the data from a member table.

If all else fails, I will just construct my correlated sub-query.

Thanks for the information.

I assume you are using a multi-member physical file PF(the AS400 refers to files rather than tables). The default member is *FIRST and generally speaking they are only created with a single member (you could treat it like a normal table). Multi-member is a throw back to the days of card files and tape files where you had header/detail/trailer records (typically banks/insurance) with different record layouts (long before SQL was conceived. the 70s). You can get a list with the command DSPFD Library/File *MBRLIST

If you want to retrieve data from the above Library/File.member in SQL you can try the following (i have never needed to run sql on multi-member files)

Select * from Library/File.member OR Select * from Library/File(member) OR

Select * from Library.File(member)

Let me know if you need more help

|||

These types doesnot work.

I have a situation. Its like we to migrate from IBM DB2 to SQl Server. But how will we move mulri membered files? Can anyone help?

|||

Just make sure you have the latest Client Access (OLEDB) drivers for DB400. there is a user group for As400 (now called iSeries) where i am sure u will get resolution (comp.sys.ibm.as400.misc)

As far as migration is concerned

You will have 2 kinds of multi-member files.

Each member has the same columns

AS400 and SELECT *

I am migrating from 2000 to 2005 and dts to SSIS on several projects. I have not been able to successfully (without error) pull from an AS400 table using "SELECT *". If I reference all field names, it works fine. SELECT * actually works in the sense that it pulls over all the data, but it fails at the end, almost like an unepected end of stream. Normally it wouldn't be a problem tp qualify each field, but when I do the data gets sorted. In this instance I can't have it sorted because (without going into the stupid details) the production needs to match the development to suit my boss.

Connection = .Net Provider for OleDb/IBM DB2 UDB for iSeries IBMDA400 OLE DB Provider

Data Source = DataReader Source (I have yet to be able to use and OLE Source for AS400 without error, although my colleagues can - weird)

Here is the error I get when I change:

SELECT FieldName1, FieldName2, FieldName3 FROM LIBRARY.FILENAME

to

SELECT * FROM LIBRARY.FILENAME

Error: 0xC0047038 at DTF_LoadSqlServer_BOSS_Tebosspf8H, DTS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "OLE_SRC_Tebosspf8H" (4492) returned error code 0x80004003. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.

Error: 0xC0047021 at DTF_LoadSqlServer_BOSS_Tebosspf8H, DTS.Pipeline: SSIS Error Code DTS_E_THREADFAILED. Thread "SourceThread0" has exited with error code 0xC0047038. There may be error messages posted before this with more information on why the thread has exited.

I

Any suggestions? Is there a property on the task or connection that will fix this? Or any idea why I can't use an OLE Source to pull from AS400?

I know it may not be an answer you're looking for, but I've had great luck using the Microsoft OLE DB for DB2 driver. It's included with one of their feature packs.

AS2005: Building a parent-child hierarchy on a table that also includes a surrogate key

Hi,

Any assistance with this will be most useful as I'm struggling to find a difinitive answer anywhere.

I have a table that includes a Surrogate Key column (primary key), a Child ID column, a Parent ID column and a Description column.

When building a parent-child dimension through the Analysis Services 2005 wizard the first decision comes on the 'Select the Main Dimension Table' screen. The Surrogate Key has to be selected as the 'Key Column' (for the relationship to the Fact Table) and the Description column is selected for the 'Column containing the member name (optional)'.

The next screen is 'Select Dimension Attributes' - do I select Child ID, Parent ID or both? And do I need to make any changes to the 'Attribute Key Column' and 'Attribute Name Column' fields in here (I cannot see why you would need to)?

Finally, the 'Define Parent-Child Relationship' screen highlights the issues around selecting the Surrogate Key as the 'Key Column' previously. Even though the DSV has the relationship between Child ID and Parent ID clearly defined, the dimension wizard attempts to build a parent-child hierarchy using the Surrogate Key and Parent ID.

I have tried building this dimension using the Child ID as the 'Key Column' instead and the structure seemed to turn out okay. However, as there is no relationship between Child ID and the Fact Table this arrangement meant that the cube process resulted in no data being displayed.

If anyone can please shed light on this frustrating issue I will be very grateful.

Thanks,

Stu

Some earlier posts in this forum have discussed similar parent-child scenarios. One solution which should work, but may increase cube processing time, is to substitute a Named Query for the fact table. This Named Query would join the fact and dimension tables on the Surrogate Key, so that the Child ID gets added as a field to the resultant fact table. Then the dimension can be built from another Named Query on the dimension table, which eliminates the Surrogate Key. The Child ID could now be the key column, which you said worked OK.|||

Thanks Deepak.

I'm aware that there are several work arounds but very surprised that this cannot just be resolved within Analysis Services (excluding the use of named queries in the DSV).

Regards,

Stuart

Thursday, March 8, 2012

AS2005 OWC11 HTTP - Connection Problem.

I am trying to get an OWC11 pivot table ActiveX component to work over the internet with AS2005. I have read so many articles, and I have moved forward, but there doesn't seem to be any final answer.

Here is the set up. 1 Server that is running IIS6, WIN2003, SQL2005/SP1. I set up the connection string as

PivotTable1.ConnectionString = Provider=MSOLAP.3;Data Source=http://<ip to server>/olap/msdmpump.dll;Initial Catalog=<olapDatabaseName>
PivotTable1.DataMember = "<CUBE NAME>"

I set up the HTTP pump described in this article: http://www.microsoft.com/technet/prodtechnol/sql/2005/httpasws.mspx

I set up an IUSR role for the cube to be read.

I set up SQL and AS for remote access over TCP/IP.

I even set the AS2005 for anonymous access. I wll turn this back after the test.

Everything works fine at the intranet level, but as soon as I'm outside the domain.. boom, it won't connect.. I ran the SQL profiler, and gotten the cryptic XML parsingg error for IUSR log-in. At any rate, I'm all out of ideas and tricks.

I saw similar lines of discussion, but never a successful conclusion as of yet. Any suggestions would be much appreciated.

-Young K

<html xmlns="http://www.w3.org/1999/xhtml" >
<head
<title>Test</title>
</head>

<body>

<object classid="clsid:0002E55a-0000-0000-C000-000000000046" id="PivotTable1">
<param name="XMLData" value="<xml
xmlns:x="urn:schemas-microsoft-com:office:excel">
<x:PivotTable>
<x:OWCVersion>11.0.0.5531 </x:OWCVersion>
<x:DisplayScreenTips/>
<x:CubeProvider>msolap</x:CubeProvider>
<x:CacheDetails/>
<x:PivotView>
<x:IsNotFiltered/>
</x:PivotView>
</x:PivotTable>
</xml>">
<table width='100%' cellpadding='0' cellspacing='0' border='0'
height='8'><tr><td bgColor='#336699' height='25' width='10%'> </td><td
bgColor='#666666'width='85%'><font face='Tahoma' color='white' size='4'><b>
Missing: Microsoft Office Web Components</b></font></td></tr><tr><td
bgColor='#cccccc' width='15'> </td><td bgColor='#cccccc' width='500px'><br>
<font face='Tahoma' size='2'>This page requires the Microsoft Office Web
Components.<p align='center'> <a
href='http://www.microsoft.com/downloads/details.aspx?FamilyID=7287252c-402e-4f72-97a5
-e0fd290d4b76&DisplayLang=en'>Click
here to install Microsoft Office Web Components.</a>.

</font>

<font
face='Tahoma' size='2'>This page also requires Microsoft Internet Explorer
5.01 or higher.

<p align='center'><a
href='http://www.microsoft.com/windows/ie/default.htm'> Click here to install
the latest Internet Explorer</a>.</font><br>&nbsp;</td></tr></table>
</object>
<br>
<br>
<input type="button" id="button1" value="click here">
<script language="vbscript">
sub button1_onclick()
PivotTable1.ConnectionString = Provider=MSOLAP.3;Data Source=http://<ip to server>/olap/msdmpump.dll;Initial Catalog=<olapDatabaseName>
PivotTable1.DataMember = "<CUBE NAME>"

Dim oPivot
Set oPivot = PivotTable1.Object
'Set the timeout to 10 secondsr
oPivot.Connection.CommandTimeout = 10

end sub
</script>

</body>
</html>

My bad. I installed the OLEDB 9 on the client machine and it works like a charm. Go me, go.

PivotTable1.ConnectionString = "Provider=MSOLAP.3;Persist Security Info=True;Data Source=http://[target server]/olap/msmdpump.dll;Initial Catalog=PNGReportOLAP;User Id=[user id];Password=[password]"

I used that connection string. Yowsers.. It has taken me two days. But it is working. Have fun, y'all.

Young K.

|||

My bad. I installed the OLEDB 9 on the client machine and it works like a charm. Go me, go.

PivotTable1.ConnectionString = "Provider=MSOLAP.3;Persist Security Info=True;Data Source=http://[target server]/olap/msmdpump.dll;Initial Catalog=PNGReportOLAP;User Id=[user id];Password=[password]"

I used that connection string. Yowsers.. It has taken me two days. But it is working. Have fun, y'all.

Young K.

|||

My bad. I installed the OLEDB 9 on the client machine and it works like a charm. Go me, go.

PivotTable1.ConnectionString = "Provider=MSOLAP.3;Persist Security Info=True;Data Source=http://[target server]/olap/msmdpump.dll;Initial Catalog=PNGReportOLAP;User Id=[user id];Password=[password]"

I used that connection string. Yowsers.. It has taken me two days. But it is working. Have fun, y'all.

Young K.

|||

My bad. I installed the OLEDB 9 on the client machine and it works like a charm. Go me, go.

PivotTable1.ConnectionString = "Provider=MSOLAP.3;Persist Security Info=True;Data Source=http://[target server]/olap/msmdpump.dll;Initial Catalog=PNGReportOLAP;User Id=[user id];Password=[password]"

I used that connection string. Yowsers.. It has taken me two days. But it is working. Have fun, y'all.

Young K.

|||I went into same problem long ago, what i did was giving the IUSR a permission on the Analysis server. I think its a bad idea, but as you said, I was running out of ideas "any comment is welcomed". I have some issues regarding initializing the Pivote table client side, its some how slow. Any ideas are welcomed|||

I am trying to do what you did.The xml string that is assigned to PivotTable.XMLData.Thexml string is shown below. I use analysis services and sql server 2000.

<xml xmlns:x="urnTongue Tiedchemas-microsoft-comSurpriseffice:excel">

- <xStick out tongueivotTable>

<xSurpriseWCVersion>12.0.0.4518</xSurpriseWCVersion>

<x:NoDisplayAlerts />

<xBig SmileisplayScreenTips />

<x:MaxHeight>523</x:MaxHeight>

<x:MaxWidth>923</x:MaxWidth>

<x:CubeProvider>msolap.2</x:CubeProvider>

<xBig SmileisplayFieldList />

<x:CacheDetails />

<x:ConnectionString>Provider=SQLOLEDB;Cache Authentication=False;Initial Catalog=Test_OLAP;Data Source=http://<ip>/Bin/msdmpump.dll; Impersonation Level=Impersonate;Mode=ReadWrite;Auto Synch Period=20000;Default Isolation Mode=0;Default MDX Visual Mode=0;MDX Compatibility=0;MDX Unique Name Style=0;Non Empty Threshold=0;SQLQueryMode=Calculated;Safety Options=1;Secured Cell Value=0;SQL Compatibility=0;Compression Level=0;Real Time Olap=False;Packet Size=4096</x:ConnectionString>

<xBig SmileataMember>TestCube</xBig SmileataMember>

- <xStick out tongueivotView>

<x:IsNotFiltered />

<x:UseProviderFormatting />

</xStick out tongueivotView>

</xStick out tongueivotTable>

</xml>

I am not sure what you mean by instaling OLEDB 9 solves your problem.In my case,I can see the embeded Pivot table and the Pivot table field list.But am not seeing the dimensions.Rather an icon with a plug is shown.I am able to acces the ms.asp page on the <ip> server. Is there any way to debug and find out the problem.

AS2005 OWC11 HTTP - Connection Problem.

I am trying to get an OWC11 pivot table ActiveX component to work over the internet with AS2005. I have read so many articles, and I have moved forward, but there doesn't seem to be any final answer.

Here is the set up. 1 Server that is running IIS6, WIN2003, SQL2005/SP1. I set up the connection string as

PivotTable1.ConnectionString = Provider=MSOLAP.3;Data Source=http://<ip to server>/olap/msdmpump.dll;Initial Catalog=<olapDatabaseName>
PivotTable1.DataMember = "<CUBE NAME>"

I set up the HTTP pump described in this article: http://www.microsoft.com/technet/prodtechnol/sql/2005/httpasws.mspx

I set up an IUSR role for the cube to be read.

I set up SQL and AS for remote access over TCP/IP.

I even set the AS2005 for anonymous access. I wll turn this back after the test.

Everything works fine at the intranet level, but as soon as I'm outside the domain.. boom, it won't connect.. I ran the SQL profiler, and gotten the cryptic XML parsingg error for IUSR log-in. At any rate, I'm all out of ideas and tricks.

I saw similar lines of discussion, but never a successful conclusion as of yet. Any suggestions would be much appreciated.

-Young K

<html xmlns="http://www.w3.org/1999/xhtml" >
<head
<title>Test</title>
</head>

<body>

<object classid="clsid:0002E55a-0000-0000-C000-000000000046" id="PivotTable1">
<param name="XMLData" value="<xml
xmlns:x="urn:schemas-microsoft-com:office:excel">
<x:PivotTable>
<x:OWCVersion>11.0.0.5531 </x:OWCVersion>
<x:DisplayScreenTips/>
<x:CubeProvider>msolap</x:CubeProvider>
<x:CacheDetails/>
<x:PivotView>
<x:IsNotFiltered/>
</x:PivotView>
</x:PivotTable>
</xml>">
<table width='100%' cellpadding='0' cellspacing='0' border='0'
height='8'><tr><td bgColor='#336699' height='25' width='10%'> </td><td
bgColor='#666666'width='85%'><font face='Tahoma' color='white' size='4'><b>
Missing: Microsoft Office Web Components</b></font></td></tr><tr><td
bgColor='#cccccc' width='15'> </td><td bgColor='#cccccc' width='500px'><br>
<font face='Tahoma' size='2'>This page requires the Microsoft Office Web
Components.<p align='center'> <a
href='http://www.microsoft.com/downloads/details.aspx?FamilyID=7287252c-402e-4f72-97a5
-e0fd290d4b76&DisplayLang=en'>Click
here to install Microsoft Office Web Components.</a>.

</font>

<font
face='Tahoma' size='2'>This page also requires Microsoft Internet Explorer
5.01 or higher.

<p align='center'><a
href='http://www.microsoft.com/windows/ie/default.htm'> Click here to install
the latest Internet Explorer</a>.</font><br>&nbsp;</td></tr></table>
</object>
<br>
<br>
<input type="button" id="button1" value="click here">
<script language="vbscript">
sub button1_onclick()
PivotTable1.ConnectionString = Provider=MSOLAP.3;Data Source=http://<ip to server>/olap/msdmpump.dll;Initial Catalog=<olapDatabaseName>
PivotTable1.DataMember = "<CUBE NAME>"

Dim oPivot
Set oPivot = PivotTable1.Object
'Set the timeout to 10 secondsr
oPivot.Connection.CommandTimeout = 10

end sub
</script>

</body>
</html>

My bad. I installed the OLEDB 9 on the client machine and it works like a charm. Go me, go.

PivotTable1.ConnectionString = "Provider=MSOLAP.3;Persist Security Info=True;Data Source=http://[target server]/olap/msmdpump.dll;Initial Catalog=PNGReportOLAP;User Id=[user id];Password=[password]"

I used that connection string. Yowsers.. It has taken me two days. But it is working. Have fun, y'all.

Young K.

|||

My bad. I installed the OLEDB 9 on the client machine and it works like a charm. Go me, go.

PivotTable1.ConnectionString = "Provider=MSOLAP.3;Persist Security Info=True;Data Source=http://[target server]/olap/msmdpump.dll;Initial Catalog=PNGReportOLAP;User Id=[user id];Password=[password]"

I used that connection string. Yowsers.. It has taken me two days. But it is working. Have fun, y'all.

Young K.

|||

My bad. I installed the OLEDB 9 on the client machine and it works like a charm. Go me, go.

PivotTable1.ConnectionString = "Provider=MSOLAP.3;Persist Security Info=True;Data Source=http://[target server]/olap/msmdpump.dll;Initial Catalog=PNGReportOLAP;User Id=[user id];Password=[password]"

I used that connection string. Yowsers.. It has taken me two days. But it is working. Have fun, y'all.

Young K.

|||

My bad. I installed the OLEDB 9 on the client machine and it works like a charm. Go me, go.

PivotTable1.ConnectionString = "Provider=MSOLAP.3;Persist Security Info=True;Data Source=http://[target server]/olap/msmdpump.dll;Initial Catalog=PNGReportOLAP;User Id=[user id];Password=[password]"

I used that connection string. Yowsers.. It has taken me two days. But it is working. Have fun, y'all.

Young K.

|||I went into same problem long ago, what i did was giving the IUSR a permission on the Analysis server. I think its a bad idea, but as you said, I was running out of ideas "any comment is welcomed". I have some issues regarding initializing the Pivote table client side, its some how slow. Any ideas are welcomed|||

I am trying to do what you did.The xml string that is assigned to PivotTable.XMLData.Thexml string is shown below. I use analysis services and sql server 2000.

<xml xmlns:x="urnTongue Tiedchemas-microsoft-comSurpriseffice:excel">

- <xStick out tongueivotTable>

<xSurpriseWCVersion>12.0.0.4518</xSurpriseWCVersion>

<x:NoDisplayAlerts />

<xBig SmileisplayScreenTips />

<x:MaxHeight>523</x:MaxHeight>

<x:MaxWidth>923</x:MaxWidth>

<x:CubeProvider>msolap.2</x:CubeProvider>

<xBig SmileisplayFieldList />

<x:CacheDetails />

<x:ConnectionString>Provider=SQLOLEDB;Cache Authentication=False;Initial Catalog=Test_OLAP;Data Source=http://<ip>/Bin/msdmpump.dll; Impersonation Level=Impersonate;Mode=ReadWrite;Auto Synch Period=20000;Default Isolation Mode=0;Default MDX Visual Mode=0;MDX Compatibility=0;MDX Unique Name Style=0;Non Empty Threshold=0;SQLQueryMode=Calculated;Safety Options=1;Secured Cell Value=0;SQL Compatibility=0;Compression Level=0;Real Time Olap=False;Packet Size=4096</x:ConnectionString>

<xBig SmileataMember>TestCube</xBig SmileataMember>

- <xStick out tongueivotView>

<x:IsNotFiltered />

<x:UseProviderFormatting />

</xStick out tongueivotView>

</xStick out tongueivotTable>

</xml>

I am not sure what you mean by instaling OLEDB 9 solves your problem.In my case,I can see the embeded Pivot table and the Pivot table field list.But am not seeing the dimensions.Rather an icon with a plug is shown.I am able to acces the ms.asp page on the <ip> server. Is there any way to debug and find out the problem.

Wednesday, March 7, 2012

AS/400 DB2 and Analysis services

I am trying to build a cube.

The data is on the AS/400

I can make a successful connection and can see the table.

When I pull the tables in a Data Source View and try to make my own relationships,

there is no columns. In fact when I try to Explore data, it return an error:

Object reference not set to an instance of an object.

Can someone tell me how to resolve this?

Hi,

Can you please tell me if this happens with Analysis Services SP1 and using Microsoft's OleDB provider for DB2 (that is the only provider supported)? Also, in case you tried, does it work against UDB?

--
Raymond

This posting is provided "AS IS" with no warranties, and confers no rights.|||

Hi,

Try to use the IBM Client Access ODBC Driver.

Regards, Christian

|||

Looks like I don have the proper version. I download the Microsoft OLEDB Provider for DB2.

Went to install it and got this:

Setup cannot continue because a supported version of SQL Server 2005 is not installed. Supported versions include Enterprise, Developer, or Enterprise Evaluation.

Thanks.

BTW I did try the IBM DB2 UDB version 5.x and that is what I was trying to use. Apparently, IBM has reported a bug. They working on it and it won't be available until the next fix. Whenever that will be.....

As tables grow, how to make text beside table stay fixed on a page

I have a table on the left hand side of a page and some fixed text on the right hand side of the page. Unfortunately, as the table grows, the text on the right hand side of the page is forced down the page. How can I keep the text fixed at a particular point on a page, no matter the size of the table on the left?
Thanks,
Mike DeardorffAnything that starts below the table will get pushed down as the table
grows.
The easiest way to prevent this is to move the textbox.
The second easiest way is to put the textbox (and potentially other items
beside the table) into a rectangle which starts before the bottom of the
table.
--
This post is provided 'AS IS' with no warranties, and confers no rights. All
rights reserved. Some assembly required. Batteries not included. Your
mileage may vary. Objects in mirror may be closer than they appear. No user
serviceable parts inside. Opening cover voids warranty. Keep out of reach of
children under 3.
"MDeardorff" <MDeardorff@.discussions.microsoft.com> wrote in message
news:2AFFC019-A5BD-463B-B4C3-A7B8CDBC4D42@.microsoft.com...
> I have a table on the left hand side of a page and some fixed text on the
right hand side of the page. Unfortunately, as the table grows, the text on
the right hand side of the page is forced down the page. How can I keep the
text fixed at a particular point on a page, no matter the size of the table
on the left?
> Thanks,
> Mike Deardorff

Saturday, February 25, 2012

AS 2005 Slowly Changing Dimension - adding new rows when no change

Hi , I am using the Integration Services slowly changing dimension to move data from a SQL Server 2000 database table to a SQL Server 2005 table.

The other problem is the package is not tracking changes it is spending a lot of time doing lookups (it's slow), but ends up creating new records when there has not been a change.

I'm quite sure the business key is set up correctly (I'm using the PK from the source table).

The database I am transferring from has non Unicode data types (ie varchar and char) and the destination database has Unicode data types (ie nvarchar).

Also some of the fields in the dB are NULL - does this have an effect (ie one null doesn't equal another null)? Or shouldn't that matter?sorted out his issue

http://forums.microsoft.com/MSDN/showpost.aspx?postid=1475782&siteid=1

AS 2000, Excel 2003 and calulated measures

Hi

I have created a calculated measure - which when i view in the Analysis Manager - Browse it displays what I need.

In my Excel Pivot Table I cannot see the field when I Show Field List? is it possible to have calc members in Excel 2003?

however, my initial problem is this (and I am hoping someone can come up with a better solution):

I have a fact table that is simply number of hours worked per month and linked to dimensions such as the customer. Each Customer has a budgeted time (which is on the customer dimension) - I need to include this budget.

I have a separate cube that is the detail of the budget and I have tried creating a virtual cube - the problem with this is the budget is only visible if I use dimensions from that cube and the hours are only visible when I use dimensions from that cube - I would liek to see them together. (the dimensions in both cubes are identical)

Anyone?

Steve

Sounds like you have a bunch of private dimensions in your cubes. Its been a while since I worked on 2K, but i think global dimensions (dimensions that can be shared in virtual cubes) are called "shared dimensions". If you used the wizard to create the dimensions and cubes I think it defaults to adding dimensions as private.

|||

That may solve the virtual cube issue - thanks.

Any idea why I cannot see a calculated member in Excel while I can see it in the MMC browser?

Thanks

|||

Shared dimensions and virtual cubes work a treat - thanks.

Apparently, a calculated measure that is based on a dimension table does not appear in Excel 2003!!

AS 2000 DTS data extraction from cube to flat file

Currently we have a DTS that extracts data from a cube to a SQL Server table and then from SQL Server to a flat file.

This is taking a considerable time is there a faster way of doing this?

Thanks.
Mark.Moving to Integration Services forum

Articles in more than one Category - How to organize tables?

Greetings,
I have one table, named Article, and one table name Category.
The problem is, one Article could be in just one or in several categories.
What is the best way to connect data between Article and Category according to fast search performance?
I have several ideas:
1. To have third cross table Article_Category with fields Article_ID and Category_ID, and search Article_Category table
2. To have several INTEGER columns in Article table (like Category_ID1, Category_ID2,..) and search those columns
3. Add one VARCHAR field in Article table where I could write Category ID's delimited by some character (e.g. by comma), and do text search in only that column.
What is recommended for solving problems like this?

Option 1 makes the most sense. This is how many-to-many relationships are generally implemented.

|||Thanks for advice Adam|||Yes, that is how I implemented them, it works well. Then you can use an inner join to join the article info to the category info.|||

Will you have:
Option A: Many-to-Many (category 1 has article 1 and 2, category 2 has article 3, etc)

Option B: 1-to-Many (Category 1 has article 2, category 2 has article 2, category 3 has article 5, etc)
If B, you can put your article_id in your category table. This would give you the fastest search performance and allow your joins to be simpler.

Nick

|||Hi bmains,
how large are your tables?
Do you run it on Web with ASP.NET?
Do you satisfied with search speed?|||Hi Nick,
one Category will have many articles,
one Article could be in more than one category.

There is 500 000 articles and almost 2000 categories.
Regards|||

If you are talking a join between the join table and the two main tables, then no, I wouldn't worry about speed; it shouldn't be worse performance-wise. Though, if you are talking a lot of joins, then you need to worry more. outer joins are worse than inner joins; inner joins aren't bad; here we have a requirement that you have to try to rewrite a query to use an inner join if possible, when an outer join is used.

articles default

hi all, I was trying to set the articles to "delete data in the existing table that matches the row filter" in the publications "article>articles>table articles>snapshot" of the publication but everytime i reopen that property tab the publication restore to the default setting of 
"drop exisiting table and recreate it" 
i"m using sql server 2000. snapshot replication
-- thanks, joey
You can make use of dynamic snapshot to filter out the data.