Showing posts with label create. Show all posts
Showing posts with label create. Show all posts

Thursday, March 22, 2012

ASP Page to run a Report

I am trying to create a report (form) to run from an ASP page with one
single prompt. The ASP pagre would then populate the parameter below
as it passes the data to Report Manager. I am tring to skip the step
of opening IE and go straight to the PDF.
Example
Enter Shipment# [2022222]
[Sumbit] [Quit]
shipnum=variable above
http://rpt-serv/ReportServer?/sales%2fC+of+C&shipnum=2022222&rs:Format=PDF
Does anyone have a sample ASP page they would be willing to share?
Thanks
BobThis may be way more than what you need, but search this newsgroup for my
post on 12/11/07 with the terms "Classic ASP" or Google ""Reporting Service
in Classic ASP" to do exactly what I think you want. Once the PDF is
rendered you can open it in IE, save it, or save it directly as a file on a
server (by taking the stream and writing it).
"Bob" <bob@.ebearings.com> wrote in message
news:fa89138c-aa86-41c8-bdc2-c0fe620972d9@.e4g2000hsg.googlegroups.com...
>I am trying to create a report (form) to run from an ASP page with one
> single prompt. The ASP pagre would then populate the parameter below
> as it passes the data to Report Manager. I am tring to skip the step
> of opening IE and go straight to the PDF.
> Example
> Enter Shipment# [2022222]
> [Sumbit] [Quit]
> shipnum=variable above
> http://rpt-serv/ReportServer?/sales%2fC+of+C&shipnum=2022222&rs:Format=PDF
> Does anyone have a sample ASP page they would be willing to share?
> Thanks
> Bob

Tuesday, March 20, 2012

ASP 2.0 sql syntax change?

I was simply trying to create a sql command using ASP 2.0 but the syntax appears to have changed. I was trying to write the following:

SqlCommand

cmdUpdateData =newSqlCommand("AddMessage", myConnection);

cmdUpdateData.CommandType = CommandType.StoredProcedure;

But, intellisence will not offer me the second 'CommandType' on the second line?? It works fine using ASP 1.1 but not here on 2.0

Can anyone please help?

Looks ok to me. Are you importing system.data and system.data.sqlclient?|||

Yes I was lacking the system.data namespace!

Many thanks,

James

|||

That all works fine now, but a little further down my code where I fill the datagrid I have another problem with the changing sysntax.

In visual studio 2003 I would use the following:

try

{

//first open the connection

myConnection.Open();

//fill data set with data from sql data adapter

myAdapter.Fill(ds);

//bind the data grid to the datasetthis.dgdShowStudents.DataSource=ds;this.dgdShowStudents.DataKeyField="StudentId";this.dgdShowStudents.DataBind();

However, using ASP2.0 intellisence does not pick up on DataKeyField. Should I be using something else? or do I have to use the wizard for filling a grid. I'd rather do it with code?

|||Is it a datagrid or a gridview?|||GridView. I assumed it would take the same code as the DataGrid|||

If you are using the gridview, I would normally bind it to a sqldatasource control instead of using code. It's a lot simplier and it handles some things very nicely for you (Sortable columns, caching, etc).

The gridview is similiar, but not the same as a datagrid. As for the datakeys, the gridview supports multiple column binding, which I don't believe the datagrid did. I believe the property you are looking for is called DataKeyNames for the gridview.

|||

Many thanks for the help,

James

ASP + reporting services

I want create a handle on an ASPX page for emailing a report that was created with SQL reporting services.
eg. on a button click, the report should be run and emailed.
can someone please help me out.
thanks!Edit: Sorry! Gotta watch which link I'm hitting!!

Monday, March 19, 2012

Ask Index creation principle

hi,
i want to know the basic principle to create simple index or composite
index, e.g.
Table1
col1, col2, col3, col4, col5
select * from Table1 where col1 = 0
select * from Table1 where col1 = 1 and col2 = 'testing'
select * from Table 1 where col1= 2 and col4 = 5 and col5 = 'abc'
should i create simple index on col1, col2, col4 and col5 respectively? or
create
1. a simple index on col1
2. a composite index on col1 and col2
3. a composite index on col1, col4 and col5
thanks!
Hello Mullin,
When designing an index strategy one has to find a balance. This balance
is goverened by typical workloads sent to the server. So, what you need
to do is run profiler on your machine for a typical workload - this
could be for 24 hour period, or the working day for instance.
You then need to look though your profiler trace (tracing to a table
will be ideal) for the most common queries to your database. If this
table appears regularly in your common queries, then make sure the most
popular queries are indexed.
You also need to rely on the user experience of the application using
this data. If the user experience is satisfactory then you don't need to
add indexes. Only add indexes where necessary as they add overhead.
So, from your example below, let's say that query number 2 appears the
most in your profiler trace. You could then place a composite index on
col1 and col2.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Mullin Yu wrote:
> hi,
> i want to know the basic principle to create simple index or composite
> index, e.g.
> Table1
> col1, col2, col3, col4, col5
> select * from Table1 where col1 = 0
> select * from Table1 where col1 = 1 and col2 = 'testing'
> select * from Table 1 where col1= 2 and col4 = 5 and col5 = 'abc'
> should i create simple index on col1, col2, col4 and col5 respectively? or
> create
> 1. a simple index on col1
> 2. a composite index on col1 and col2
> 3. a composite index on col1, col4 and col5
> thanks!
>

Ask Index creation principle

hi,
i want to know the basic principle to create simple index or composite
index, e.g.
Table1
col1, col2, col3, col4, col5
select * from Table1 where col1 = 0
select * from Table1 where col1 = 1 and col2 = 'testing'
select * from Table 1 where col1= 2 and col4 = 5 and col5 = 'abc'
should i create simple index on col1, col2, col4 and col5 respectively? or
create
1. a simple index on col1
2. a composite index on col1 and col2
3. a composite index on col1, col4 and col5
thanks!Hello Mullin,
When designing an index strategy one has to find a balance. This balance
is goverened by typical workloads sent to the server. So, what you need
to do is run profiler on your machine for a typical workload - this
could be for 24 hour period, or the working day for instance.
You then need to look though your profiler trace (tracing to a table
will be ideal) for the most common queries to your database. If this
table appears regularly in your common queries, then make sure the most
popular queries are indexed.
You also need to rely on the user experience of the application using
this data. If the user experience is satisfactory then you don't need to
add indexes. Only add indexes where necessary as they add overhead.
So, from your example below, let's say that query number 2 appears the
most in your profiler trace. You could then place a composite index on
col1 and col2.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Mullin Yu wrote:
> hi,
> i want to know the basic principle to create simple index or composite
> index, e.g.
> Table1
> col1, col2, col3, col4, col5
> select * from Table1 where col1 = 0
> select * from Table1 where col1 = 1 and col2 = 'testing'
> select * from Table 1 where col1= 2 and col4 = 5 and col5 = 'abc'
> should i create simple index on col1, col2, col4 and col5 respectively? or
> create
> 1. a simple index on col1
> 2. a composite index on col1 and col2
> 3. a composite index on col1, col4 and col5
> thanks!
>

Ask Index creation principle

hi,
i want to know the basic principle to create simple index or composite
index, e.g.
Table1
col1, col2, col3, col4, col5
select * from Table1 where col1 = 0
select * from Table1 where col1 = 1 and col2 = 'testing'
select * from Table 1 where col1= 2 and col4 = 5 and col5 = 'abc'
should i create simple index on col1, col2, col4 and col5 respectively? or
create
1. a simple index on col1
2. a composite index on col1 and col2
3. a composite index on col1, col4 and col5
thanks!Hello Mullin,
When designing an index strategy one has to find a balance. This balance
is goverened by typical workloads sent to the server. So, what you need
to do is run profiler on your machine for a typical workload - this
could be for 24 hour period, or the working day for instance.
You then need to look though your profiler trace (tracing to a table
will be ideal) for the most common queries to your database. If this
table appears regularly in your common queries, then make sure the most
popular queries are indexed.
You also need to rely on the user experience of the application using
this data. If the user experience is satisfactory then you don't need to
add indexes. Only add indexes where necessary as they add overhead.
So, from your example below, let's say that query number 2 appears the
most in your profiler trace. You could then place a composite index on
col1 and col2.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Mullin Yu wrote:
> hi,
> i want to know the basic principle to create simple index or composite
> index, e.g.
> Table1
> col1, col2, col3, col4, col5
> select * from Table1 where col1 = 0
> select * from Table1 where col1 = 1 and col2 = 'testing'
> select * from Table 1 where col1= 2 and col4 = 5 and col5 = 'abc'
> should i create simple index on col1, col2, col4 and col5 respectively? or
> create
> 1. a simple index on col1
> 2. a composite index on col1 and col2
> 3. a composite index on col1, col4 and col5
> thanks!
>

ask help for licence problem

I am using asp and crystal report to create a report on web.

However, due to the licence problem, I need to clear the user's login session info each time after they access the report.

The probelm, when user returns to other page, since the session info is clear, user needs to login again.

Can anyone help me to solve this problem? Thanks a lot!It seems problem in Session valriable. Increase the lifetime of session

Ascii Code search

Hi;
I'm tring to create a sql query in 6.5 that will find any unprintable
characters in a text field. I'm trying to use a where clause that looks
for specific ASCII codes but cant seem to get it work. Does anyone have
any ideas how to do this.
Thanks
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
David,
You can use below technique. In my example, I used CHAR(99) which is the letter 'c'. Replace this with the
ASCII code for the unprintable character you want to find.
SELECT *
FROM
(
SELECT 'abcdef' AS colname
UNION
SELECT 'abdef' AS colname
) AS d
WHERE CHARINDEX(CHAR(99), colname) > 0
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"David Cervelli" <cervelli@.adelphia.net> wrote in message news:OkpMIugiEHA.1348@.tk2msftngp13.phx.gbl...
> Hi;
> I'm tring to create a sql query in 6.5 that will find any unprintable
> characters in a text field. I'm trying to use a where clause that looks
> for specific ASCII codes but cant seem to get it work. Does anyone have
> any ideas how to do this.
> Thanks
>
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
|||Tibor
I finally tried this and it works great but I have a few issues that I
hope you might be able to help.
I'm using version 6.5 so a varchar is only 255 characters.
I'm trying to search a text field that is much larger then 255.
Your soltuion does a good job at searching a text field but not a text
field.
If I convert the text to varchar it only looks at the first 255
characters.
Do you have any suggestions?
Thanks in advance.
David
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||If the function doesn't support the "text" datatype, then you probably have to use functions such as
TEXTPTR, READTEXT etc to loop through your data and use the function on chunks of data. Not very
fun...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"David Cervelli" <dcervelli@.ssgnet.com> wrote in message
news:uRwc0zXkEHA.3632@.TK2MSFTNGP09.phx.gbl...
>
> Tibor
> I finally tried this and it works great but I have a few issues that I
> hope you might be able to help.
> I'm using version 6.5 so a varchar is only 255 characters.
> I'm trying to search a text field that is much larger then 255.
> Your soltuion does a good job at searching a text field but not a text
> field.
> If I convert the text to varchar it only looks at the first 255
> characters.
> Do you have any suggestions?
> Thanks in advance.
> David
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!

Ascii Code search

Hi;
I'm tring to create a sql query in 6.5 that will find any unprintable
characters in a text field. I'm trying to use a where clause that looks
for specific ASCII codes but cant seem to get it work. Does anyone have
any ideas how to do this.
Thanks
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!David,
You can use below technique. In my example, I used CHAR(99) which is the let
ter 'c'. Replace this with the
ASCII code for the unprintable character you want to find.
SELECT *
FROM
(
SELECT 'abcdef' AS colname
UNION
SELECT 'abdef' AS colname
) AS d
WHERE CHARINDEX(CHAR(99), colname) > 0
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"David Cervelli" <cervelli@.adelphia.net> wrote in message news:OkpMIugiEHA.1348@.tk2msftngp13
.phx.gbl...
> Hi;
> I'm tring to create a sql query in 6.5 that will find any unprintable
> characters in a text field. I'm trying to use a where clause that looks
> for specific ASCII codes but cant seem to get it work. Does anyone have
> any ideas how to do this.
> Thanks
>
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!|||Tibor
I finally tried this and it works great but I have a few issues that I
hope you might be able to help.
I'm using version 6.5 so a varchar is only 255 characters.
I'm trying to search a text field that is much larger then 255.
Your soltuion does a good job at searching a text field but not a text
field.
If I convert the text to varchar it only looks at the first 255
characters.
Do you have any suggestions?
Thanks in advance.
David
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!|||If the function doesn't support the "text" datatype, then you probably have
to use functions such as
TEXTPTR, READTEXT etc to loop through your data and use the function on chun
ks of data. Not very
fun...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"David Cervelli" <dcervelli@.ssgnet.com> wrote in message
news:uRwc0zXkEHA.3632@.TK2MSFTNGP09.phx.gbl...
>
> Tibor
> I finally tried this and it works great but I have a few issues that I
> hope you might be able to help.
> I'm using version 6.5 so a varchar is only 255 characters.
> I'm trying to search a text field that is much larger then 255.
> Your soltuion does a good job at searching a text field but not a text
> field.
> If I convert the text to varchar it only looks at the first 255
> characters.
> Do you have any suggestions?
> Thanks in advance.
> David
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!

Ascii Code search

Hi;
I'm tring to create a sql query in 6.5 that will find any unprintable
characters in a text field. I'm trying to use a where clause that looks
for specific ASCII codes but cant seem to get it work. Does anyone have
any ideas how to do this.
Thanks
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!David,
You can use below technique. In my example, I used CHAR(99) which is the letter 'c'. Replace this with the
ASCII code for the unprintable character you want to find.
SELECT *
FROM
(
SELECT 'abcdef' AS colname
UNION
SELECT 'abdef' AS colname
) AS d
WHERE CHARINDEX(CHAR(99), colname) > 0
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"David Cervelli" <cervelli@.adelphia.net> wrote in message news:OkpMIugiEHA.1348@.tk2msftngp13.phx.gbl...
> Hi;
> I'm tring to create a sql query in 6.5 that will find any unprintable
> characters in a text field. I'm trying to use a where clause that looks
> for specific ASCII codes but cant seem to get it work. Does anyone have
> any ideas how to do this.
> Thanks
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

ASCII and Reporting Services

Can Reporting Services create an ascii file? We are searchring for a tool that can handle with predefinied queries to generate week figures, month figures etc. These figures will be used in paper publications as well as in electronical publications.
Is it better to use DTS?
--
Message posted via http://www.sqlmonster.comOne of the formats you can pick to render in is csv. You can also render in
XML. So, it depends on what you are wanting to do.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Helma Schapendonk-Maas via SQLMonster.com" <forum@.SQLMonster.com> wrote in
message news:eb94c01cd0524e8b8a7ef893548c9ddf@.SQLMonster.com...
> Can Reporting Services create an ascii file? We are searchring for a tool
that can handle with predefinied queries to generate week figures, month
figures etc. These figures will be used in paper publications as well as in
electronical publications.
> Is it better to use DTS?
> --
> Message posted via http://www.sqlmonster.com|||Even if you render in csv, its not a true csv. If you open up that csv in
excel, all the colums appears in one column, you have to than use that wizard
- Data-> text to column to create true csv. Another avidence of that file
not being ASCII, if you save that file you exported as csv, you will see
UNICODE in your save as dialogue. This has been a problem since day one.
This is the biggest issue why we can't use RS for our reports, because all of
our customer needs true csv and don't know how to use Data -> text to column
wizard of excel.
Thanks
Vipul
"Bruce L-C [MVP]" wrote:
> One of the formats you can pick to render in is csv. You can also render in
> XML. So, it depends on what you are wanting to do.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "Helma Schapendonk-Maas via SQLMonster.com" <forum@.SQLMonster.com> wrote in
> message news:eb94c01cd0524e8b8a7ef893548c9ddf@.SQLMonster.com...
> > Can Reporting Services create an ascii file? We are searchring for a tool
> that can handle with predefinied queries to generate week figures, month
> figures etc. These figures will be used in paper publications as well as in
> electronical publications.
> > Is it better to use DTS?
> >
> > --
> > Message posted via http://www.sqlmonster.com
>
>|||You can specify the format ascii as CSV Rendering Device Information Setting
if you add
&rc:Encoding=ASCII to the url generating the export
"Vipul Shah" wrote:
> Even if you render in csv, its not a true csv. If you open up that csv in
> excel, all the colums appears in one column, you have to than use that wizard
> - Data-> text to column to create true csv. Another avidence of that file
> not being ASCII, if you save that file you exported as csv, you will see
> UNICODE in your save as dialogue. This has been a problem since day one.
> This is the biggest issue why we can't use RS for our reports, because all of
> our customer needs true csv and don't know how to use Data -> text to column
> wizard of excel.
> Thanks
> Vipul
> "Bruce L-C [MVP]" wrote:
> > One of the formats you can pick to render in is csv. You can also render in
> > XML. So, it depends on what you are wanting to do.
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> >
> > "Helma Schapendonk-Maas via SQLMonster.com" <forum@.SQLMonster.com> wrote in
> > message news:eb94c01cd0524e8b8a7ef893548c9ddf@.SQLMonster.com...
> > > Can Reporting Services create an ascii file? We are searchring for a tool
> > that can handle with predefinied queries to generate week figures, month
> > figures etc. These figures will be used in paper publications as well as in
> > electronical publications.
> > > Is it better to use DTS?
> > >
> > > --
> > > Message posted via http://www.sqlmonster.com
> >
> >
> >|||Here is an example of a Jump to URL link I use. This causes Excel to come up
with the data in a separate window:
="javascript:void(window.open('" & Globals!ReportServerUrl &
"?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
"&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
Very nice and very fast.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"RDC" <RDC @.discussions.microsoft.com> wrote in message
news:9F3DC72D-8965-4B78-91C3-8D61B23C7E36@.microsoft.com...
> You can specify the format ascii as CSV Rendering Device Information
> Setting
> if you add
> &rc:Encoding=ASCII to the url generating the export
>
> "Vipul Shah" wrote:
>> Even if you render in csv, its not a true csv. If you open up that csv
>> in
>> excel, all the colums appears in one column, you have to than use that
>> wizard
>> - Data-> text to column to create true csv. Another avidence of that
>> file
>> not being ASCII, if you save that file you exported as csv, you will see
>> UNICODE in your save as dialogue. This has been a problem since day
>> one.
>> This is the biggest issue why we can't use RS for our reports, because
>> all of
>> our customer needs true csv and don't know how to use Data -> text to
>> column
>> wizard of excel.
>> Thanks
>> Vipul
>> "Bruce L-C [MVP]" wrote:
>> > One of the formats you can pick to render in is csv. You can also
>> > render in
>> > XML. So, it depends on what you are wanting to do.
>> >
>> > --
>> > Bruce Loehle-Conger
>> > MVP SQL Server Reporting Services
>> >
>> >
>> > "Helma Schapendonk-Maas via SQLMonster.com" <forum@.SQLMonster.com>
>> > wrote in
>> > message news:eb94c01cd0524e8b8a7ef893548c9ddf@.SQLMonster.com...
>> > > Can Reporting Services create an ascii file? We are searchring for a
>> > > tool
>> > that can handle with predefinied queries to generate week figures,
>> > month
>> > figures etc. These figures will be used in paper publications as well
>> > as in
>> > electronical publications.
>> > > Is it better to use DTS?
>> > >
>> > > --
>> > > Message posted via http://www.sqlmonster.com
>> >
>> >
>> >

Sunday, March 11, 2012

AS400 ODBC connection

I was able to successfully create a linked server to AS400 box without
any problem. But now, due to some reason the following query does not
return any data (0 rows)
Select * from openQuery(CWBIS800, 'select * from lib.tb where cmln =
10001001')
whereas the following query does return the correct record.
Select * from openQuery(CWBIS800, 'select * from lib.tb') where cmln =
10001001
I dont like the later query as this basically fetches all the records
from as400 (network traffic) and then applies the where clause on SQL
server side. Any idea how to fix the previous query ? please help
Sandeep Khandelwal
KeyBank
What is the data type for cmln? Did you try the first query
- exactly what is in between the single quotes - using
Client Access or on the AS400 itself?
-Sue
On 17 Sep 2004 12:47:53 -0700, Sandeep.khandelwal@.gmail.com
(Sandeep) wrote:

>I was able to successfully create a linked server to AS400 box without
>any problem. But now, due to some reason the following query does not
>return any data (0 rows)
>Select * from openQuery(CWBIS800, 'select * from lib.tb where cmln =
>10001001')
>whereas the following query does return the correct record.
>Select * from openQuery(CWBIS800, 'select * from lib.tb') where cmln =
>10001001
>I dont like the later query as this basically fetches all the records
>from as400 (network traffic) and then applies the where clause on SQL
>server side. Any idea how to fix the previous query ? please help
>
>Sandeep Khandelwal
>KeyBank

AS2005: write a cube to a local .cub via xmla?

Hi,

i wonder if it is possible to write a cube (in AS2005) to a local .CUB file using xmla instead of the "old" CREATE GLOBAL CUBE statement ...
I haven't found anything in the msdn ... perhaps I've been blind?

background of this question:
http://forums.microsoft.com/msdn/ShowPost.aspx?postid=463952&siteid=1

Thanks for your answers and for tolerating my bad english
best regards,
Sven

Yes, it is possible. The easiest way to get an example of how to do it is to run a CREATE GLOBAL CUBE statement on your cube while you have a Profiler trace running - the CREATE GLOBAL CUBE statement gets translated to AS's XML/A scripting language in the background and you'll see that script in the trace. You can then change it as you need and possibly fix your problem.

Chris

|||Thanks for your quick reply!

We used the Profiler before and found the xmla-statement that is used

to create the new cube ... no problem so far; it creates a new database

with the cube as we want it to be.

But we didn't find the xmla-statement that writes the cube into the .cub file.

There are 3 lines in the Profiler where the filename of the .cub

appears: 2 times in the context of a copy of the original CREATE GLOBAL

CUBE statement and the last time in the line where we found the

statement that creates the cube.

The Profiler says something like this:

"CREATE GLOBAL CUBE-Instruction | FILENAME=c:\newcube.cub | DDL | <batch>...</batch>"

The <batch> we can extract to create our cube, but the part before is no scripting-language we know.

Perhaps it makes sense for you? ;)

Greetings,

Sven|||I think it's just extra information flagging the fact that this is a local cube being created and where the .cub file is located, and not DDL. Certainly when I remove it and just run the Batch statement (in MDX Sample app - not SQLMS, where for some reason I can't connect to an empty .cub file to run the DDL to create the local cube) then it all works ok.|||

Hi, Can you explain how exactly you run the BATCH statement in order to get the .CUB file?

I am using ADOMD.NET.

When I run the statement using management studio, the query succeed but nothing is created and there is no place to set the local file location.

Thanks,

Ofer

|||Hi Chris,
I'm reading your book on MDX (MDX Solutions 2ndEd.) and am currently struggling with the creation of local cubes. I want to create a local cube in Excel via VBA, but notice that the CREATE CLOBAL CUBE statement doesn't correctly save all data, so I'm experimenting with the ASSL approach.
In your book you write (p. 528) "...to create a local cube using ASSL,...:You open a connection to your target (in this case a .cub file), then execute your ASSL statement."
I'm wondering how you do this, apparently not with the MDX Sample app.?
What kind of connection is that if I need to do this using VB(A), or should I use .NET?|||

Hi Christopher,

Take a look at:
http://cwebbbi.spaces.live.com/blog/cns!7B84B0F2C239489A!877.entry

Regards,

Chris

|||

in MDX Sample app - not SQLMS, where for some reason I can't connect to an empty .cub file to run the DDL to create the local cube

The reason is that local cubes don't support more than one connection to the cube file, and Management Studio usually wants to open two connections (one for AMO), even if you only want to send MDX queries.

AS2005: write a cube to a local .cub via xmla?

Hi,

i wonder if it is possible to write a cube (in AS2005) to a local .CUB file using xmla instead of the "old" CREATE GLOBAL CUBE statement ...
I haven't found anything in the msdn ... perhaps I've been blind?

background of this question:
http://forums.microsoft.com/msdn/ShowPost.aspx?postid=463952&siteid=1

Thanks for your answers and for tolerating my bad english
best regards,
Sven

Yes, it is possible. The easiest way to get an example of how to do it is to run a CREATE GLOBAL CUBE statement on your cube while you have a Profiler trace running - the CREATE GLOBAL CUBE statement gets translated to AS's XML/A scripting language in the background and you'll see that script in the trace. You can then change it as you need and possibly fix your problem.

Chris

|||Thanks for your quick reply!
We used the Profiler before and found the xmla-statement that is used to create the new cube ... no problem so far; it creates a new database with the cube as we want it to be.
But we didn't find the xmla-statement that writes the cube into the .cub file.
There are 3 lines in the Profiler where the filename of the .cub appears: 2 times in the context of a copy of the original CREATE GLOBAL CUBE statement and the last time in the line where we found the statement that creates the cube.
The Profiler says something like this:
"CREATE GLOBAL CUBE-Instruction | FILENAME=c:\newcube.cub | DDL | <batch>...</batch>"
The <batch> we can extract to create our cube, but the part before is no scripting-language we know.
Perhaps it makes sense for you? ;)
Greetings,
Sven
|||I think it's just extra information flagging the fact that this is a local cube being created and where the .cub file is located, and not DDL. Certainly when I remove it and just run the Batch statement (in MDX Sample app - not SQLMS, where for some reason I can't connect to an empty .cub file to run the DDL to create the local cube) then it all works ok.|||

Hi, Can you explain how exactly you run the BATCH statement in order to get the .CUB file?

I am using ADOMD.NET.

When I run the statement using management studio, the query succeed but nothing is created and there is no place to set the local file location.

Thanks,

Ofer

|||Hi Chris,
I'm reading your book on MDX (MDX Solutions 2ndEd.) and am currently struggling with the creation of local cubes. I want to create a local cube in Excel via VBA, but notice that the CREATE CLOBAL CUBE statement doesn't correctly save all data, so I'm experimenting with the ASSL approach.
In your book you write (p. 528) "...to create a local cube using ASSL,...:You open a connection to your target (in this case a .cub file), then execute your ASSL statement."
I'm wondering how you do this, apparently not with the MDX Sample app.?
What kind of connection is that if I need to do this using VB(A), or should I use .NET?|||

Hi Christopher,

Take a look at:
http://cwebbbi.spaces.live.com/blog/cns!7B84B0F2C239489A!877.entry

Regards,

Chris

|||

in MDX Sample app - not SQLMS, where for some reason I can't connect to an empty .cub file to run the DDL to create the local cube

The reason is that local cubes don't support more than one connection to the cube file, and Management Studio usually wants to open two connections (one for AMO), even if you only want to send MDX queries.

AS2005: write a cube to a local .cub via xmla?

Hi,

i wonder if it is possible to write a cube (in AS2005) to a local .CUB file using xmla instead of the "old" CREATE GLOBAL CUBE statement ...
I haven't found anything in the msdn ... perhaps I've been blind?

background of this question:
http://forums.microsoft.com/msdn/ShowPost.aspx?postid=463952&siteid=1

Thanks for your answers and for tolerating my bad english
best regards,
Sven

Yes, it is possible. The easiest way to get an example of how to do it is to run a CREATE GLOBAL CUBE statement on your cube while you have a Profiler trace running - the CREATE GLOBAL CUBE statement gets translated to AS's XML/A scripting language in the background and you'll see that script in the trace. You can then change it as you need and possibly fix your problem.

Chris

|||Thanks for your quick reply!

We used the Profiler before and found the xmla-statement that is used

to create the new cube ... no problem so far; it creates a new database

with the cube as we want it to be.

But we didn't find the xmla-statement that writes the cube into the .cub file.

There are 3 lines in the Profiler where the filename of the .cub

appears: 2 times in the context of a copy of the original CREATE GLOBAL

CUBE statement and the last time in the line where we found the

statement that creates the cube.

The Profiler says something like this:

"CREATE GLOBAL CUBE-Instruction | FILENAME=c:\newcube.cub | DDL | <batch>...</batch>"

The <batch> we can extract to create our cube, but the part before is no scripting-language we know.

Perhaps it makes sense for you? ;)

Greetings,

Sven|||I think it's just extra information flagging the fact that this is a local cube being created and where the .cub file is located, and not DDL. Certainly when I remove it and just run the Batch statement (in MDX Sample app - not SQLMS, where for some reason I can't connect to an empty .cub file to run the DDL to create the local cube) then it all works ok.|||

Hi, Can you explain how exactly you run the BATCH statement in order to get the .CUB file?

I am using ADOMD.NET.

When I run the statement using management studio, the query succeed but nothing is created and there is no place to set the local file location.

Thanks,

Ofer

|||Hi Chris,
I'm reading your book on MDX (MDX Solutions 2ndEd.) and am currently struggling with the creation of local cubes. I want to create a local cube in Excel via VBA, but notice that the CREATE CLOBAL CUBE statement doesn't correctly save all data, so I'm experimenting with the ASSL approach.
In your book you write (p. 528) "...to create a local cube using ASSL,...:You open a connection to your target (in this case a .cub file), then execute your ASSL statement."
I'm wondering how you do this, apparently not with the MDX Sample app.?
What kind of connection is that if I need to do this using VB(A), or should I use .NET?|||

Hi Christopher,

Take a look at:
http://cwebbbi.spaces.live.com/blog/cns!7B84B0F2C239489A!877.entry

Regards,

Chris

|||

in MDX Sample app - not SQLMS, where for some reason I can't connect to an empty .cub file to run the DDL to create the local cube

The reason is that local cubes don't support more than one connection to the cube file, and Management Studio usually wants to open two connections (one for AMO), even if you only want to send MDX queries.

Wednesday, March 7, 2012

'AS IS' Upgrade from SQL 2K to SQL 2K5

My advice is to do functionality or, preferably, load testing in a dev\test
environment. As well as create a detailed project plan. I have run into a
lot of issues with upgrades but the clients that did throrough testing made
the fixes a part of the project plan instead of a Monday morning fire fight.
Jason Massie
www: http://statisticsio.com
rss: http://feeds.feedburner.com/statisticsio
"sacgar" <sacgar@.discussions.microsoft.com> wrote in message
news:8D9F1A4F-B591-4E8D-8F63-0ACF2D0ED91C@.microsoft.com...
> Hi ,
> We are planning for ‘in place’ SQL Upgrade from SQL 2000(Ent. Edition with
> SP4) to SQL 2005 Ent.Edition with SP2 for
> 1)Replication Distribution Server that serves to PULL subscriptions.
> 2)One for the Subscriber Cluster (Active Passive)Server (its distribution
> server already upgraded to SQL 2005)
> We have gone through the requirements from Microsoft Technical Resource
> Guide but looking if somebody had any issues or any advice other than
> Upgrade
> Advisor reported before we move for Upgrade for both of above cases as
> some
> people indicated they had issue with Password Policy , Appreciate your
> reply…
>
Please go through the below article as I have faced this issue , check if
applicable in your scenario...
Thanks
Ajay
"jason" <jason-r3move@.statisticsio.com> wrote in message
news:26E92972-53B2-4063-8D68-24B72C69FB94@.microsoft.com...
> My advice is to do functionality or, preferably, load testing in a
> dev\test environment. As well as create a detailed project plan. I have
> run into a lot of issues with upgrades but the clients that did throrough
> testing made the fixes a part of the project plan instead of a Monday
> morning fire fight.
> --
> Jason Massie
> www: http://statisticsio.com
> rss: http://feeds.feedburner.com/statisticsio
>
> "sacgar" <sacgar@.discussions.microsoft.com> wrote in message
> news:8D9F1A4F-B591-4E8D-8F63-0ACF2D0ED91C@.microsoft.com...
>
|||Sorry Missed this link earlier
Please go through this link for DB Move
http://support.microsoft.com/kb/314546/
Thanks
Ajay
"Ajay" <ajudba@.gmail.com> wrote in message
news:OsXeYk0ZIHA.4272@.TK2MSFTNGP05.phx.gbl...
> Please go through the below article as I have faced this issue , check if
> applicable in your scenario...
> Thanks
> Ajay
> "jason" <jason-r3move@.statisticsio.com> wrote in message
> news:26E92972-53B2-4063-8D68-24B72C69FB94@.microsoft.com...
>

AS connection problems from Excel

I have problems to create connections to some of my cubes from Excel.

Configuration

Client- XP professional with Excel (2007, B2TR) and SQL 2005 SP2 TR client part's installed.

Server - Windows 2003 R2 with SQL AS 2005 SP2 TR.

Logged in as administrator with same password on client as server.

There are no rules configured for any of my databases.

When I try to create a new Analysis connection from Excel there is no cubes in the list of available cubes for some of my databases.

It works great for two om my databes but not for the others. I have compared my databases but I can't find anything that is different. And it works great to browse all my cubes from SQl Server BI Development Studio from my client.

Any idea?

Thanks,
Christer

If the cubes are deployed and processed, then you suppose to see it in the Excel 2007 beta 2. Can you be more specific in your question, I might can help as I am using the same configuration you have.

IMRAN

Saturday, February 25, 2012

AS / Creating cubes

Hi,
I have started to learn Analysis Services. I did the tutorial step by step,
but the last step "create the 'Sales' cube" doesn't work. I get the error
message "Unable to create cube 'sales'" - Unspecified error. It doesn't even
work with the manuelly in footmart creatd cube. What is wrong here? I have
also installed sp3a.
My other question is that is it possible to create diagramms in AS? If no,
how do you create you database diagramms?
Many thanks in advance
Do you belong to OLAP Admin group? Do you have write permission on OLAP
cube data directory?
Eric Li
SQL DBA
MCDBA
Stefan wrote:

> Hi,
> I have started to learn Analysis Services. I did the tutorial step by step,
> but the last step "create the 'Sales' cube" doesn't work. I get the error
> message "Unable to create cube 'sales'" - Unspecified error. It doesn't even
> work with the manuelly in footmart creatd cube. What is wrong here? I have
> also installed sp3a.
> My other question is that is it possible to create diagramms in AS? If no,
> how do you create you database diagramms?
> Many thanks in advance
>

AS / Creating cubes

Hi,
I have started to learn Analysis Services. I did the tutorial step by step,
but the last step "create the 'Sales' cube" doesn't work. I get the error
message "Unable to create cube 'sales'" - Unspecified error. It doesn't even
work with the manuelly in footmart creatd cube. What is wrong here? I have
also installed sp3a.
My other question is that is it possible to create diagramms in AS? If no,
how do you create you database diagramms?
Many thanks in advanceDo you belong to OLAP Admin group? Do you have write permission on OLAP
cube data directory?
Eric Li
SQL DBA
MCDBA
Stefan wrote:

> Hi,
> I have started to learn Analysis Services. I did the tutorial step by step
,
> but the last step "create the 'Sales' cube" doesn't work. I get the error
> message "Unable to create cube 'sales'" - Unspecified error. It doesn't ev
en
> work with the manuelly in footmart creatd cube. What is wrong here? I have
> also installed sp3a.
> My other question is that is it possible to create diagramms in AS? If no,
> how do you create you database diagramms?
> Many thanks in advance
>

Friday, February 24, 2012

array with sql server 2000

hello
I have created one store procedures that return a table variable

'CREATE PROCEDURE sptcondconsiglieri @.immobile_id varchar(6)
as
DECLARE @.tbl table(condomio_id Varchar(6),titlo varchar(5),nominativo varchar(256),stato int)
DECLARE @.colA nvarchar(50)
DECLARE @.MyCursor CURSOR
/*declare @.mycursor1 cursor*/

SET @.MyCursor = CURSOR FAST_FORWARD
FOR
Select nome_consigliere
From t_immoconsiglieri
where immobile_id=@.immobile_id
order by posizione
OPEN @.MyCursor
FETCH NEXT FROM @.MyCursor
INTO @.ColA
WHILE @.@.FETCH_STATUS = 0
BEGIN

Insert @.tbl
SELECT dbo.T_Condomini.Condomino_id,dbo.T_Condomini.titolo,dbo.T_Condomini.Nominativo,dbo.T_UniCond.StCon_id
FROM dbo.T_Condomini INNER JOIN
dbo.T_UniCond ON dbo.T_Condomini.Condomino_id = dbo.T_UniCond.Condomino_id INNER JOIN
dbo.T_Unita ON dbo.T_UniCond.Unita_id = dbo.T_Unita.Unita_id
WHERE (dbo.T_Condomini.Nominativo = @.ColA) AND (dbo.T_UniCond.Dta_fine = '21001231') AND (dbo.T_Unita.Immobile_id =@.immobile_id) and dbo.T_UniCond.StCon_id<>3
FETCH NEXT FROM @.MyCursor
INTO @.ColA
END

CLOSE @.MyCursor
DEALLOCATE @.MyCursor

select * from @.tbl

/*SET QUOTED_IDENTIFIER OFF*/
GO
,
When i call store procedure with vb6
Dim rs as new adodb.recordset
Set cmd = New ADODB.Command
Dim pm As New ADODB.Parameter
' conn.BeginTrans
Set cmd.ActiveConnection = conn
cmd.CommandType = adCmdStoredProc
Set pm = cmd.CreateParameter("immobile_id", adVarChar, adParamInput, 6, immobile_id)
cmd.Parameters.Append pm
cmd.CommandText = "sptcondconsiglieri"
Set rs = cmd.Execute
If Not rs.EOF Then
'
Rs is close
I dont undestand why
Tank you

Could you please provide more details?

Thanks

|||

CREATE PROCEDURE sptcondconsiglieri @.immobile_id varchar(6)
as
SET NOCOUNT ON

-- Original text followed

|||I guess using SET NOCOUNT ON resolved the problem. Several TSQL statements can produce results or messages. So to suppress some of the unwanted messages and read just the SELECT statement output for example you need to SET NOCOUNT ON in the SP. This will eliminate the DONE messages send to the client after the SELECT @.d = ... statement for example. See Books Online for more details on SET NOCOUNT ON effect on returning resultsets.