Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Sunday, March 25, 2012

calculated measure

I have a cube with a project dimension:

User Hierarchy

Project.ProjectHierarchy

Project.GrowthPlatform

Project.Stream

Project.ProjectName

Attribute

Project.GrowthPlatform

Project.Stream

Project.ProjectName

I would create a calculated measure that is

meas1 * (meas2 / meas3) only for th ProjectName level (the lowest)

Sum(children) for the other level

How can I test the level of a dimension ?

Cosimo

IIF(Project.ProjectHierarchy.CurrentMember.Level IS Project.ProjectHierarchy.ProjectName, ...)|||

Hi,

I would try to use the SCOPE function instead of the IIF. Sometning like this should work:

SCOPE([Project].[ProjectHierarchy].[ProjectName].members,[Project].[ProjectName].members);

-- Insert calculated measure here

END SCOPE;

HTH,

Eric

|||

Thanks for the suggestion.

I'm quite new of SSAS 2005 and had some experience in AS 2000.

In AS 2000 you can do [dimension].CurrentMember ... but in SSAS 2005 every attribute is a hierarchy so I need to do [dimension].[hierarchy].CurrentMember. But I need a solution for all the hierarchyes !

So I partially solved the problem for [PROJECT].[STREAM] using the he following formula:

IIF ([PROJECT].[STREAM].CURRENTMEMBER.LEVEL_NUMBER = 0

, SUM ( [PROJECT].[STREAM].CURRENTMEMBER.CHILDREN, [Measures].[NUM HEADCOUNT SUBCO] * [Measures].[NUM FTE NO SUBCO] / [Measures].[NUM HEADCOUNT NO SUBCO] )

,[Measures].[NUM HEADCOUNT SUBCO] * [Measures].[NUM FTE NO SUBCO] / [Measures].[NUM HEADCOUNT NO SUBCO]

)

But this does not function the other hierarchy.

There is a way that can function for all the hierarchy ...

What I really need is ussing the ratio only for the lowest level [PROJECT].[PROJECT NAME] and using the sum of the children for all the others.

Cosimo

|||

I solved the problem defining four different calcolated measures, even if it could be interesting having just one calculated measure that functions for all the hierarchies.

Cosimo

Friday, February 24, 2012

C#, VB.NET & RS

Is it true thar RServices uses VB.NET syntax for functions (converting types,iif,CDate,..) apart from choosing C# IB project?
AlešYes, check
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSCREATE/htm/rcr_creating_expressions_v1_3983.asp
for details.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
<AG>; "NLB d.d." <AGNLBdd@.discussions.microsoft.com> wrote in message
news:CC0399FA-15B7-417F-B029-2243CC80B288@.microsoft.com...
> Is it true thar RServices uses VB.NET syntax for functions (converting
types,iif,CDate,..) apart from choosing C# IB project?
> Aleš

C# UDF project call C++ model (SQL Server 2005)?

I have some legacy C++ code and I am creating a C# project for UDF function
and another project for C++ classes. I always got error message when I am
trying to add reference to the class lib project:
A reference to 'classModel' could not be added. SQL Server projects can
reference only other SQL Server projects.
I tried to create the C++ project as SQL Server project too and the error
message is the same.examnotes <nick@.discussions.microsoft.com> wrote in
news:E39C7050-FC85-425C-91B3-B76040D2B164@.microsoft.com:

> I have some legacy C++ code and I am creating a C# project for UDF
> function and another project for C++ classes. I always got error
> message when I am trying to add reference to the class lib project:
> A reference to 'classModel' could not be added. SQL Server projects
> can reference only other SQL Server projects.
That is because the VS SQL Server Project doesn't allow you to reference
any other project types (or assemblies already defined in the database).
You can instead use my project type for this:
http://staff.develop.com/nielsb/Per...b8d3-4ace-a54e-
26411f9eac09.aspx (watch out for linebreaks). However, in this scenario
I wonder if that is the real problem, see below.

> I tried to create the C++ project as SQL Server project too and the
> error message is the same.
OK, so is the C++ project managed code? If not you can not use it inside
SQL Server. In that case you have to either do COM interop against the
C++ classes, or P/Invoke.
Niels
****************************************
**********
* Niels Berglund
* http://staff.develop.com/nielsb
* nielsb at develop dot com
* "A First Look at SQL Server 2005 for Developers"
* http://www.awprofessional.com/title/0321180593
****************************************
**********|||IC, thanks.
I avoid to create the UDF in C++(Managed) because not much example, support
information about C++ user defined function programming. And I am not famila
r
with managed C++ syntax.
"Niels Berglund" wrote:

> examnotes <nick@.discussions.microsoft.com> wrote in
> news:E39C7050-FC85-425C-91B3-B76040D2B164@.microsoft.com:
>
> That is because the VS SQL Server Project doesn't allow you to reference
> any other project types (or assemblies already defined in the database).
> You can instead use my project type for this:
> http://staff.develop.com/nielsb/Per...b8d3-4ace-a54e-
> 26411f9eac09.aspx (watch out for linebreaks). However, in this scenario
> I wonder if that is the real problem, see below.
>
> OK, so is the C++ project managed code? If not you can not use it inside
> SQL Server. In that case you have to either do COM interop against the
> C++ classes, or P/Invoke.
> Niels
>
> --
> ****************************************
**********
> * Niels Berglund
> * http://staff.develop.com/nielsb
> * nielsb at develop dot com
> * "A First Look at SQL Server 2005 for Developers"
> * http://www.awprofessional.com/title/0321180593
> ****************************************
**********
>

C# hanging for a very long time when working with SQL

I am designing a project using C#, SQL Express and VSTO.

Every time I change something in the database XSD display i.e add a query or create a new table adapter or configure an existing query, or just move the position of an existing table adapter, Visual Studio locks intself into a never ending loop with 100% processor activity (or 50% with dual processors). It stays in this state for about 4-5 hours and then come back to life.

Is there an option that I need to disable/enable to stop the program from doing this. I will appreciate your help.

Thanks,

Hammad

To my knowledge, VS did not put in an option to hang for 4-5 hours, but it you think they need one, let them know.

You're going to need to do some investigation to determine where the hang is comming from. Start by looking at the SQL error logs to see if anything is being registered during the hang time. Which logs you look at depend on where your database is stored. If the database is embedded in the project, then you're using a user instance and the logs are located at C:\Documents and Settings\<user>\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS and 'SQLEXPRESS' is the name of your SQL Express instance. If you're using a database attached to the parent instance, then the log fles are in the default location of C:\Program Files\Microsoft SQL Server\MSSQL.#\MSSQL\LOG where # is the Instance ID associated with your copy of SQL Express. (If this is the only copy of SQL Server you have installed, it's 1).

If the logs don't show anything interesting, you might consider checking out one of the more general troubleshooting tools such as FileMon or RegMon (available from http://www.microsoft.com/technet/sysinternals/default.mspx) to track what is happening when you perform the action that is hanging VS. Often you can tell what the program is doing by looking at the file or registry keys being accessed. I would also suggest you ask this question on one of the VS forms as the problem is showing up in VS.

Mike

Sunday, February 19, 2012

C# / Sql Server question

I am a newbie at C# (VS 2005) and SQL Server(2003). I was able to create a
db using my old pc and then copied it to my laptop to my project folder, I
cannot connect to it nor can i create a db on my laptop. I belive its an
access issue but I don't know what to do.

When i go into Enterprise Manager it shows a red dot for (local) and when i
try to connect(click) to it i get the following:

A connection could nto be established to (local)
Reason: SQL Server does not exist or access denied
ConnectionOpen (Connect ())
Please verify SQL Server is running and check your SQL Server registration
properties

any suggestions as what to try?

I am ultimately trying to connect to the db i created on my old pc
(terminology used to distinguish the 2). Both have XP SP2 installed.

I would also like to create dbs but i believe once this issue is fixed i
should be able to.

Any help is greatly appreciated... remember i am new at this :)

Mark

if this is the wrong group please forgive me and please point me to the
correct one.M K (ski_freakREMOVETHECAPS@.yahoo.com) writes:
> I am a newbie at C# (VS 2005) and SQL Server(2003).

There is no SQL Server 2003. Since you talk about Enterprise Manager,
I assume that you mean SQL Server 2000.

> When i go into Enterprise Manager it shows a red dot for (local) and
> when i try to connect(click) to it i get the following:
> A connection could nto be established to (local)
> Reason: SQL Server does not exist or access denied
> ConnectionOpen (Connect ())
> Please verify SQL Server is running and check your SQL Server registration
> properties
> any suggestions as what to try?

The red dot means that SQL Server is not running, so you need to start
it first.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||As i said below i tried to connect. Yes its SQL Server 2000 my bad

"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns97BDF05838506Yazorman@.127.0.0.1...
>M K (ski_freakREMOVETHECAPS@.yahoo.com) writes:
>> I am a newbie at C# (VS 2005) and SQL Server(2003).
> There is no SQL Server 2003. Since you talk about Enterprise Manager,
> I assume that you mean SQL Server 2000.
>> When i go into Enterprise Manager it shows a red dot for (local) and
>> when i try to connect(click) to it i get the following:
>>
>> A connection could nto be established to (local)
>> Reason: SQL Server does not exist or access denied
>> ConnectionOpen (Connect ())
>> Please verify SQL Server is running and check your SQL Server
>> registration
>> properties
>>
>> any suggestions as what to try?
> The red dot means that SQL Server is not running, so you need to start
> it first.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx|||> As i said below i tried to connect.

SQL Server normally runs as a service so you need to *start* it before you
try to connect. Right click on the server node and select 'Start'. If the
service fails to start, you should have related messages in the Windows or
SQL Server logs.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Mark Kopple" <ski_freak@.earthlink.net> wrote in message
news:JlS7g.366$Jf.316@.newsread4.news.pas.earthlink .net...
> As i said below i tried to connect. Yes its SQL Server 2000 my bad
> "Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
> news:Xns97BDF05838506Yazorman@.127.0.0.1...
>>M K (ski_freakREMOVETHECAPS@.yahoo.com) writes:
>>> I am a newbie at C# (VS 2005) and SQL Server(2003).
>>
>> There is no SQL Server 2003. Since you talk about Enterprise Manager,
>> I assume that you mean SQL Server 2000.
>>
>>> When i go into Enterprise Manager it shows a red dot for (local) and
>>> when i try to connect(click) to it i get the following:
>>>
>>> A connection could nto be established to (local)
>>> Reason: SQL Server does not exist or access denied
>>> ConnectionOpen (Connect ())
>>> Please verify SQL Server is running and check your SQL Server
>>> registration
>>> properties
>>>
>>> any suggestions as what to try?
>>
>> The red dot means that SQL Server is not running, so you need to start
>> it first.
>>
>>
>> --
>> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>>
>> Books Online for SQL Server 2005 at
>> http://www.microsoft.com/technet/pr...oads/books.mspx
>> Books Online for SQL Server 2000 at
>> http://www.microsoft.com/sql/prodin...ions/books.mspx|||Ahh i found it (dont know why i didnt see it in the first place) but when i
click on it nothing happens and it doesnt start.

i then tried to delete it which worked. When i tried to add it back there
was no option for (local) just my computer name. I then tried to use it and
it said login failed for 'COMPUTERNAME\Guest'

The actual computer name is HOMEPC

I no longer have (local) in the list
I tried adding back (local) and got the following - SQL Server does not
exist or access denied.ConnectionOpen(Connect())

"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:lfT7g.70018$F_3.26304@.newssvr29.news.prodigy. net...
>> As i said below i tried to connect.
> SQL Server normally runs as a service so you need to *start* it before you
> try to connect. Right click on the server node and select 'Start'. If
> the service fails to start, you should have related messages in the
> Windows or SQL Server logs.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Mark Kopple" <ski_freak@.earthlink.net> wrote in message
> news:JlS7g.366$Jf.316@.newsread4.news.pas.earthlink .net...
>> As i said below i tried to connect. Yes its SQL Server 2000 my bad
>>
>> "Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
>> news:Xns97BDF05838506Yazorman@.127.0.0.1...
>>>M K (ski_freakREMOVETHECAPS@.yahoo.com) writes:
>>>> I am a newbie at C# (VS 2005) and SQL Server(2003).
>>>
>>> There is no SQL Server 2003. Since you talk about Enterprise Manager,
>>> I assume that you mean SQL Server 2000.
>>>
>>>> When i go into Enterprise Manager it shows a red dot for (local) and
>>>> when i try to connect(click) to it i get the following:
>>>>
>>>> A connection could nto be established to (local)
>>>> Reason: SQL Server does not exist or access denied
>>>> ConnectionOpen (Connect ())
>>>> Please verify SQL Server is running and check your SQL Server
>>>> registration
>>>> properties
>>>>
>>>> any suggestions as what to try?
>>>
>>> The red dot means that SQL Server is not running, so you need to start
>>> it first.
>>>
>>>
>>> --
>>> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>>>
>>> Books Online for SQL Server 2005 at
>>> http://www.microsoft.com/technet/pr...oads/books.mspx
>>> Books Online for SQL Server 2000 at
>>> http://www.microsoft.com/sql/prodin...ions/books.mspx
>>
>>|||Oops again. HOMEPC is not the same computer, i did try using the MKLAPTOP
which IS the current computer name . I got the same message using
MKLAPTOP - SQL Server does not exist...

"Mark Kopple" <ski_freak@.earthlink.net> wrote in message
news:BIZ7g.443$y4.256@.newsread2.news.pas.earthlink .net...
> Ahh i found it (dont know why i didnt see it in the first place) but when
> i click on it nothing happens and it doesnt start.
> i then tried to delete it which worked. When i tried to add it back there
> was no option for (local) just my computer name. I then tried to use it
> and it said login failed for 'COMPUTERNAME\Guest'
> The actual computer name is HOMEPC
> I no longer have (local) in the list
> I tried adding back (local) and got the following - SQL Server does not
> exist or access denied.ConnectionOpen(Connect())
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> news:lfT7g.70018$F_3.26304@.newssvr29.news.prodigy. net...
>>> As i said below i tried to connect.
>>
>> SQL Server normally runs as a service so you need to *start* it before
>> you try to connect. Right click on the server node and select 'Start'.
>> If the service fails to start, you should have related messages in the
>> Windows or SQL Server logs.
>>
>> --
>> Hope this helps.
>>
>> Dan Guzman
>> SQL Server MVP
>>
>> "Mark Kopple" <ski_freak@.earthlink.net> wrote in message
>> news:JlS7g.366$Jf.316@.newsread4.news.pas.earthlink .net...
>>> As i said below i tried to connect. Yes its SQL Server 2000 my bad
>>>
>>> "Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
>>> news:Xns97BDF05838506Yazorman@.127.0.0.1...
>>>>M K (ski_freakREMOVETHECAPS@.yahoo.com) writes:
>>>>> I am a newbie at C# (VS 2005) and SQL Server(2003).
>>>>
>>>> There is no SQL Server 2003. Since you talk about Enterprise Manager,
>>>> I assume that you mean SQL Server 2000.
>>>>
>>>>> When i go into Enterprise Manager it shows a red dot for (local) and
>>>>> when i try to connect(click) to it i get the following:
>>>>>
>>>>> A connection could nto be established to (local)
>>>>> Reason: SQL Server does not exist or access denied
>>>>> ConnectionOpen (Connect ())
>>>>> Please verify SQL Server is running and check your SQL Server
>>>>> registration
>>>>> properties
>>>>>
>>>>> any suggestions as what to try?
>>>>
>>>> The red dot means that SQL Server is not running, so you need to start
>>>> it first.
>>>>
>>>>
>>>> --
>>>> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>>>>
>>>> Books Online for SQL Server 2005 at
>>>> http://www.microsoft.com/technet/pr...oads/books.mspx
>>>> Books Online for SQL Server 2000 at
>>>> http://www.microsoft.com/sql/prodin...ions/books.mspx
>>>
>>>
>>
>>|||OK I stopped and started Enterprise Manager and found this

MKLAPTOP\VAIO_VEDB (Windows NT)

I was able to start, connect and create a db. I dont think i want to use
VIAO_VEDB do i?

(local) is just above it and i still cant start it.

"Mark Kopple" <ski_freak@.earthlink.net> wrote in message
news:BIZ7g.443$y4.256@.newsread2.news.pas.earthlink .net...
> Ahh i found it (dont know why i didnt see it in the first place) but when
> i click on it nothing happens and it doesnt start.
> i then tried to delete it which worked. When i tried to add it back there
> was no option for (local) just my computer name. I then tried to use it
> and it said login failed for 'COMPUTERNAME\Guest'
> The actual computer name is HOMEPC
> I no longer have (local) in the list
> I tried adding back (local) and got the following - SQL Server does not
> exist or access denied.ConnectionOpen(Connect())
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> news:lfT7g.70018$F_3.26304@.newssvr29.news.prodigy. net...
>>> As i said below i tried to connect.
>>
>> SQL Server normally runs as a service so you need to *start* it before
>> you try to connect. Right click on the server node and select 'Start'.
>> If the service fails to start, you should have related messages in the
>> Windows or SQL Server logs.
>>
>> --
>> Hope this helps.
>>
>> Dan Guzman
>> SQL Server MVP
>>
>> "Mark Kopple" <ski_freak@.earthlink.net> wrote in message
>> news:JlS7g.366$Jf.316@.newsread4.news.pas.earthlink .net...
>>> As i said below i tried to connect. Yes its SQL Server 2000 my bad
>>>
>>> "Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
>>> news:Xns97BDF05838506Yazorman@.127.0.0.1...
>>>>M K (ski_freakREMOVETHECAPS@.yahoo.com) writes:
>>>>> I am a newbie at C# (VS 2005) and SQL Server(2003).
>>>>
>>>> There is no SQL Server 2003. Since you talk about Enterprise Manager,
>>>> I assume that you mean SQL Server 2000.
>>>>
>>>>> When i go into Enterprise Manager it shows a red dot for (local) and
>>>>> when i try to connect(click) to it i get the following:
>>>>>
>>>>> A connection could nto be established to (local)
>>>>> Reason: SQL Server does not exist or access denied
>>>>> ConnectionOpen (Connect ())
>>>>> Please verify SQL Server is running and check your SQL Server
>>>>> registration
>>>>> properties
>>>>>
>>>>> any suggestions as what to try?
>>>>
>>>> The red dot means that SQL Server is not running, so you need to start
>>>> it first.
>>>>
>>>>
>>>> --
>>>> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>>>>
>>>> Books Online for SQL Server 2005 at
>>>> http://www.microsoft.com/technet/pr...oads/books.mspx
>>>> Books Online for SQL Server 2000 at
>>>> http://www.microsoft.com/sql/prodin...ions/books.mspx
>>>
>>>
>>
>>|||> MKLAPTOP\VAIO_VEDB (Windows NT)

This is a named instance. You can install zero or more named instances plus
zero or one 'default' instance (server name only) on a single computer.
Each instance is independent with only the client tools shared among
instances.

It looks like you might have only a named instance installed with no default
instance. You will have an entry in Add/Programs titled 'Microsoft SQL
Server 2000' if you have a default SQL 2000 instance. Your named instance
is titled 'Microsoft SQL Server 2000 (VAIO_VEDB)'

> I was able to start, connect and create a db. I dont think i want to use
> VIAO_VEDB do i?

You should have no problem using this named instance instead of a default
instance. If you want a default instance instead, you can rerun setup.exe
to create a default instance and then uninstall the VAIO_VEDB instance
afterward.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Mark Kopple" <ski_freak@.earthlink.net> wrote in message
news:6k_7g.1893$u4.302@.newsread1.news.pas.earthlin k.net...
> OK I stopped and started Enterprise Manager and found this
> MKLAPTOP\VAIO_VEDB (Windows NT)
> I was able to start, connect and create a db. I dont think i want to use
> VIAO_VEDB do i?
> (local) is just above it and i still cant start it.
> "Mark Kopple" <ski_freak@.earthlink.net> wrote in message
> news:BIZ7g.443$y4.256@.newsread2.news.pas.earthlink .net...
>> Ahh i found it (dont know why i didnt see it in the first place) but when
>> i click on it nothing happens and it doesnt start.
>>
>> i then tried to delete it which worked. When i tried to add it back
>> there was no option for (local) just my computer name. I then tried to
>> use it and it said login failed for 'COMPUTERNAME\Guest'
>>
>> The actual computer name is HOMEPC
>>
>> I no longer have (local) in the list
>> I tried adding back (local) and got the following - SQL Server does not
>> exist or access denied.ConnectionOpen(Connect())
>>
>> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
>> news:lfT7g.70018$F_3.26304@.newssvr29.news.prodigy. net...
>>>> As i said below i tried to connect.
>>>
>>> SQL Server normally runs as a service so you need to *start* it before
>>> you try to connect. Right click on the server node and select 'Start'.
>>> If the service fails to start, you should have related messages in the
>>> Windows or SQL Server logs.
>>>
>>> --
>>> Hope this helps.
>>>
>>> Dan Guzman
>>> SQL Server MVP
>>>
>>> "Mark Kopple" <ski_freak@.earthlink.net> wrote in message
>>> news:JlS7g.366$Jf.316@.newsread4.news.pas.earthlink .net...
>>>> As i said below i tried to connect. Yes its SQL Server 2000 my bad
>>>>
>>>> "Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
>>>> news:Xns97BDF05838506Yazorman@.127.0.0.1...
>>>>>M K (ski_freakREMOVETHECAPS@.yahoo.com) writes:
>>>>>> I am a newbie at C# (VS 2005) and SQL Server(2003).
>>>>>
>>>>> There is no SQL Server 2003. Since you talk about Enterprise Manager,
>>>>> I assume that you mean SQL Server 2000.
>>>>>
>>>>>> When i go into Enterprise Manager it shows a red dot for (local) and
>>>>>> when i try to connect(click) to it i get the following:
>>>>>>
>>>>>> A connection could nto be established to (local)
>>>>>> Reason: SQL Server does not exist or access denied
>>>>>> ConnectionOpen (Connect ())
>>>>>> Please verify SQL Server is running and check your SQL Server
>>>>>> registration
>>>>>> properties
>>>>>>
>>>>>> any suggestions as what to try?
>>>>>
>>>>> The red dot means that SQL Server is not running, so you need to start
>>>>> it first.
>>>>>
>>>>>
>>>>> --
>>>>> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>>>>>
>>>>> Books Online for SQL Server 2005 at
>>>>> http://www.microsoft.com/technet/pr...oads/books.mspx
>>>>> Books Online for SQL Server 2000 at
>>>>> http://www.microsoft.com/sql/prodin...ions/books.mspx
>>>>
>>>>
>>>
>>>
>>
>>|||thanks.. it makes sense now :)

"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:KG%7g.24382$4L1.2682@.newssvr11.news.prodigy.c om...
>> MKLAPTOP\VAIO_VEDB (Windows NT)
>>
> This is a named instance. You can install zero or more named instances
> plus zero or one 'default' instance (server name only) on a single
> computer. Each instance is independent with only the client tools shared
> among instances.
> It looks like you might have only a named instance installed with no
> default instance. You will have an entry in Add/Programs titled
> 'Microsoft SQL Server 2000' if you have a default SQL 2000 instance. Your
> named instance is titled 'Microsoft SQL Server 2000 (VAIO_VEDB)'
>> I was able to start, connect and create a db. I dont think i want to use
>> VIAO_VEDB do i?
> You should have no problem using this named instance instead of a default
> instance. If you want a default instance instead, you can rerun setup.exe
> to create a default instance and then uninstall the VAIO_VEDB instance
> afterward.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Mark Kopple" <ski_freak@.earthlink.net> wrote in message
> news:6k_7g.1893$u4.302@.newsread1.news.pas.earthlin k.net...
>> OK I stopped and started Enterprise Manager and found this
>>
>> MKLAPTOP\VAIO_VEDB (Windows NT)
>>
>> I was able to start, connect and create a db. I dont think i want to use
>> VIAO_VEDB do i?
>>
>> (local) is just above it and i still cant start it.
>>
>> "Mark Kopple" <ski_freak@.earthlink.net> wrote in message
>> news:BIZ7g.443$y4.256@.newsread2.news.pas.earthlink .net...
>>> Ahh i found it (dont know why i didnt see it in the first place) but
>>> when i click on it nothing happens and it doesnt start.
>>>
>>> i then tried to delete it which worked. When i tried to add it back
>>> there was no option for (local) just my computer name. I then tried to
>>> use it and it said login failed for 'COMPUTERNAME\Guest'
>>>
>>> The actual computer name is HOMEPC
>>>
>>> I no longer have (local) in the list
>>> I tried adding back (local) and got the following - SQL Server does not
>>> exist or access denied.ConnectionOpen(Connect())
>>>
>>> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
>>> news:lfT7g.70018$F_3.26304@.newssvr29.news.prodigy. net...
>>>>> As i said below i tried to connect.
>>>>
>>>> SQL Server normally runs as a service so you need to *start* it before
>>>> you try to connect. Right click on the server node and select 'Start'.
>>>> If the service fails to start, you should have related messages in the
>>>> Windows or SQL Server logs.
>>>>
>>>> --
>>>> Hope this helps.
>>>>
>>>> Dan Guzman
>>>> SQL Server MVP
>>>>
>>>> "Mark Kopple" <ski_freak@.earthlink.net> wrote in message
>>>> news:JlS7g.366$Jf.316@.newsread4.news.pas.earthlink .net...
>>>>> As i said below i tried to connect. Yes its SQL Server 2000 my bad
>>>>>
>>>>> "Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
>>>>> news:Xns97BDF05838506Yazorman@.127.0.0.1...
>>>>>>M K (ski_freakREMOVETHECAPS@.yahoo.com) writes:
>>>>>>> I am a newbie at C# (VS 2005) and SQL Server(2003).
>>>>>>
>>>>>> There is no SQL Server 2003. Since you talk about Enterprise Manager,
>>>>>> I assume that you mean SQL Server 2000.
>>>>>>
>>>>>>> When i go into Enterprise Manager it shows a red dot for (local) and
>>>>>>> when i try to connect(click) to it i get the following:
>>>>>>>
>>>>>>> A connection could nto be established to (local)
>>>>>>> Reason: SQL Server does not exist or access denied
>>>>>>> ConnectionOpen (Connect ())
>>>>>>> Please verify SQL Server is running and check your SQL Server
>>>>>>> registration
>>>>>>> properties
>>>>>>>
>>>>>>> any suggestions as what to try?
>>>>>>
>>>>>> The red dot means that SQL Server is not running, so you need to
>>>>>> start
>>>>>> it first.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>>>>>>
>>>>>> Books Online for SQL Server 2005 at
>>>>>> http://www.microsoft.com/technet/pr...oads/books.mspx
>>>>>> Books Online for SQL Server 2000 at
>>>>>> http://www.microsoft.com/sql/prodin...ions/books.mspx
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>

C with ODBC

I am into a new project where I have to write C programs on UNIX
connecting to SQLServer through ODBC. I am not able to find sample
programs to learn about APIs. Can anyone point out to documentation
containing ODBC APIs for C.
TIA.Hi
You may find something in
http://www.microsoft.com/downloads/results.aspx?productID=&freetext=odbc&DisplayLang=en
or
http://msdn.microsoft.com/library/default.asp?url=/nhp/Default.asp?contentid=28001860
For the API check out
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbcsql/od_6_0crtap_8my6.asp?frame=true
John
"Ravi Krishna" <rkdba@.sympatico.ca> wrote in message
news:CnMFb.4703$d%1.1051172@.news20.bellglobal.com...
> I am into a new project where I have to write C programs on UNIX
> connecting to SQLServer through ODBC. I am not able to find sample
> programs to learn about APIs. Can anyone point out to documentation
> containing ODBC APIs for C.
> TIA.
>
>

C with ODBC

I am into a new project where I have to write C programs on UNIX
connecting to SQLServer through ODBC. I am not able to find sample
programs to learn about APIs. Can anyone point out to documentation
containing ODBC APIs for C.

TIA.Hi

You may find something in
http://www.microsoft.com/downloads/...&DisplayLang=en
or
http://msdn.microsoft.com/library/d...tentid=28001860

For the API check out
http://msdn.microsoft.com/library/d...asp?frame=true

John

"Ravi Krishna" <rkdba@.sympatico.ca> wrote in message
news:CnMFb.4703$d%1.1051172@.news20.bellglobal.com. ..
> I am into a new project where I have to write C programs on UNIX
> connecting to SQLServer through ODBC. I am not able to find sample
> programs to learn about APIs. Can anyone point out to documentation
> containing ODBC APIs for C.
> TIA.|||I'm not sure you can use ODBC from Unix. If it was me, I would use
Java and JDBC. (Caveat: Awhile back I heard Microsoft came out
with a JDBC driver for SQL Server, but I haven't heard anything about
how good or bad it is.)

On Mon, 22 Dec 2003 19:51:10 -0500, "Ravi Krishna"
<rkdba@.sympatico.ca> wrote:

>I am into a new project where I have to write C programs on UNIX
>connecting to SQLServer through ODBC. I am not able to find sample
>programs to learn about APIs. Can anyone point out to documentation
>containing ODBC APIs for C.
>TIA.|||Ellen K. (72322.enno.esspeeayem.1016@.compuserve.com) writes:
> I'm not sure you can use ODBC from Unix. If it was me, I would use
> Java and JDBC. (Caveat: Awhile back I heard Microsoft came out
> with a JDBC driver for SQL Server, but I haven't heard anything about
> how good or bad it is.)

Yes, you can use ODBC on Unix. See
http://www.sommarskog.se/mssqlperl/unix.html for a couple of products.
The page also include JDBC stuff.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Good to have a definitive answer. Thanks. :)

On Mon, 29 Dec 2003 23:02:43 +0000 (UTC), Erland Sommarskog
<sommar@.algonet.se> wrote:

>Ellen K. (72322.enno.esspeeayem.1016@.compuserve.com) writes:
>> I'm not sure you can use ODBC from Unix. If it was me, I would use
>> Java and JDBC. (Caveat: Awhile back I heard Microsoft came out
>> with a JDBC driver for SQL Server, but I haven't heard anything about
>> how good or bad it is.)
>>
>Yes, you can use ODBC on Unix. See
>http://www.sommarskog.se/mssqlperl/unix.html for a couple of products.
>The page also include JDBC stuff.

Thursday, February 16, 2012

By Account Aggregation Function

Hello All,

I have tried creating a sample SSAS Project, using the AdventureWorksDW DB.

I have created an account parent-child dimension using an account dimension type.

I'm using the measure Amount from the FactFinance table, and used the ByAccount aggregateFunction property for that measure.

The problem is, when deploying that project I get the following error:

Aggregation function NONE specified for mapping account type Statistical is not supported for ByAccount semiadditive measure.

The Statistical account type aggregation function is set by the business intelligence wizard to None. I see no way to change it.

Does anyone see what's the problem here?

Hi,

The aggregation functions can be changed by selecting Database -> Edit Database in the AS project in BIDS.

-Morten

Sunday, February 12, 2012

Business intelligence studio - Integration services project problem

Hi Guys,

I'm trying to create an Integration services project from Business intelligence studio but i can't go further then this:
Could not load file or assembly "Microsoft.DataTransformationServices.Wizard" or one of its dependencies.

I have SQL Server 2005 Enterprise edition and Integration services service is started. I tried stopping the service and restarting it but it doesn't affect anything.

Can any of the clever guys of IT please help me.

Thank you

Gemma

hi,

have you tried to repair your installation of SQL client tools?

regards,

Janos

|||

Hi there,

Sorry for the late reply but i tried it and it doesn't work. I also tried uninstalling components and then tried to install them again, didn't work.

Any other clever ideas as I have to finish this thing soon.

Thank you

Gemma

|||

Check if you are administrator of your machine, or if you have all the permissions.

Try to change the user that are running the SQL services.

regards!

|||

Hi Pedro

I have tried both and it doesn't work. Any other things which i can check before i ask my manger to send me on SSIS course.

Thank you

Gemma

|||

Try another machine..

And install it with Administrator

:-(

business intelligence projects visual studio 2008

Ok, I installed VS2008 and open my solution built with 2005 which contains a
business intelligence project for reporting services and I get a nice error
message that says this version does not support this project type
(.rptproj). Real nice.
Does anyone know how I can get this working or if VS2008 will even support
this at all?
Or will I have to work on part of my solution in VS2008 and use the SQL
Server Business Intelligence Development Studio for the other part? that
would be a bit of a pain.
Thanks.Assuming everything works as before then what will happen is that when you
install SQL Server 2008 BI tools they will integrate with VS 2008. Note that
you have have RS 2000 report designer (integrated with VS 2003), RS 2005
report designer integrated with VS 2005 and RS 2008 Report Designer to be
integrated with VS 2008.
If you are planning on using the VS winform or webform reportviewer control
then I would do a quick test to see if the 2008 version will work with RS
2005 server. It might not. VS 2005 controls required RS 2005 server.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"DK" <bushido101@.hotmail.com> wrote in message
news:B8A0B74B-58FE-4581-A64D-D4F013C06447@.microsoft.com...
> Ok, I installed VS2008 and open my solution built with 2005 which contains
> a business intelligence project for reporting services and I get a nice
> error message that says this version does not support this project type
> (.rptproj). Real nice.
> Does anyone know how I can get this working or if VS2008 will even support
> this at all?
> Or will I have to work on part of my solution in VS2008 and use the SQL
> Server Business Intelligence Development Studio for the other part? that
> would be a bit of a pain.
> Thanks.

Business Intelligence Projects - Visual Studio Net 2003

Hi,
i must create a new report for Reporting Services. In Visual Studio Net 2003 (new project) i don't find the folder "business intelligence projects".
Can you help me?

thanks

Hi,

You have to install Reporting Services Client from Report Designer component on your own PC.

Anders

Business Intelligence Project?

I installed the VS 2005 Beta and didn't see the business intelligence project type. How do I get that project type in my list? Do I need SQL 2005 installed on the same machine?In VS2003, you just needed to install the SQL Server client tools to access the Business Intelligence project type. I'm not sure if there's an option in the current SQL Server 2005 install to just install the client piececs.

I'd suggest just installing the whole thing, it should make your development easier (that way, even if you turn off SQL Server locally, you'll still have the Management Studio to manage/connect to your remote databases ... very handy unless you like setting up remote desktops or walking between servers).

Here's also a list of installation notes on integrating SQL Server 2005 and Visual Studio which you may find helpful:
http://www.sqlservercentral.com/columnists/drussell/technoteinstallingsqlserver2005andvisualstudio2005.asp

Hope this helps,
Josh Lindenmuth

Business Intelligence project type not found in visual studio 2005

Hi,

I have installed sql server 2005 and visual studio 2005 on windows server 2003. When I select business intelligence studio from sql server, visual studio editor opens up,but i cannot find business intelligence projects template in visual studio. Please suggest some solution or workaround.

Thanks,

Y Gupta

Verify that you have installed the Workstation components under SQL Setup, on that machine. BI Projects should be the top node in the Project Types list on the left hand side of the New Project dialog. There is no workaround, just a valid install.

Business Intelligence Project type missing

Using VS.Net 2003, I don't have the Business Intelligence Project type. I
have installed Reporting Services today and would like to start creating
some projects with it.
When installing reporting services, I didn't install the server software on
the same machine as VS.Net. I don't need to do that do I?
Thanks in advance,
MarkMBRUND wrote:
> Using VS.Net 2003, I don't have the Business Intelligence Project type. I
> have installed Reporting Services today and would like to start creating
> some projects with it.
> When installing reporting services, I didn't install the server software on
> the same machine as VS.Net. I don't need to do that do I?
> Thanks in advance,
> Mark
>
Yup. You need to install the client tools on your development box.
Matt|||The server does not need the client software and the client software does
not need the server software. They can both be installed but they do not
need to be. Wherever you install the client software you need VS installed.
Bruce L-C
"MBRUND" <mark.brundieck@.midwestwirelessREMOVE_CAPS_AND_INVALID.com.invalid>
wrote in message news:OfobUD6YEHA.3892@.TK2MSFTNGP09.phx.gbl...
> Using VS.Net 2003, I don't have the Business Intelligence Project type. I
> have installed Reporting Services today and would like to start creating
> some projects with it.
> When installing reporting services, I didn't install the server software
on
> the same machine as VS.Net. I don't need to do that do I?
> Thanks in advance,
> Mark
>|||The server is already installed OK and others are able to program against it
using Business Intelligence Projects from VS.Net, but I can't though I have
installed the client the same way the others have.
I'm not sure what else is different about the VS.Net 2003 suite we are using
the the Reporting Services client software that is installed on the
machines. Any ideas what to look for? However, they are using Windows XP as
OS and I am using Windows 2000 Server.
Mark
"Bruce Loehle-Conger" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:O8v4nk6YEHA.996@.TK2MSFTNGP12.phx.gbl...
> The server does not need the client software and the client software does
> not need the server software. They can both be installed but they do not
> need to be. Wherever you install the client software you need VS
installed.
> Bruce L-C
> "MBRUND"
<mark.brundieck@.midwestwirelessREMOVE_CAPS_AND_INVALID.com.invalid>
> wrote in message news:OfobUD6YEHA.3892@.TK2MSFTNGP09.phx.gbl...
> > Using VS.Net 2003, I don't have the Business Intelligence Project type.
I
> > have installed Reporting Services today and would like to start creating
> > some projects with it.
> >
> > When installing reporting services, I didn't install the server software
> on
> > the same machine as VS.Net. I don't need to do that do I?
> >
> > Thanks in advance,
> > Mark
> >
> >
>|||Found it!
My bad. I have both VS.Net 2002 and VS.Net 2003 on this machine and didn't
expect it. I was looking for the project type using 2002, but I found it now
under 2003. Surprise! Now to get rid of 2002 ...
Thanks for your time.
"MBRUND" <mark.brundieck@.midwestwirelessREMOVE_CAPS_AND_INVALID.com.invalid>
wrote in message news:%23Dk4s7DZEHA.3944@.tk2msftngp13.phx.gbl...
> The server is already installed OK and others are able to program against
it
> using Business Intelligence Projects from VS.Net, but I can't though I
have
> installed the client the same way the others have.
> I'm not sure what else is different about the VS.Net 2003 suite we are
using
> the the Reporting Services client software that is installed on the
> machines. Any ideas what to look for? However, they are using Windows XP
as
> OS and I am using Windows 2000 Server.
> Mark
> "Bruce Loehle-Conger" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:O8v4nk6YEHA.996@.TK2MSFTNGP12.phx.gbl...
> > The server does not need the client software and the client software
does
> > not need the server software. They can both be installed but they do not
> > need to be. Wherever you install the client software you need VS
> installed.
> >
> > Bruce L-C
> >
> > "MBRUND"
> <mark.brundieck@.midwestwirelessREMOVE_CAPS_AND_INVALID.com.invalid>
> > wrote in message news:OfobUD6YEHA.3892@.TK2MSFTNGP09.phx.gbl...
> > > Using VS.Net 2003, I don't have the Business Intelligence Project
type.
> I
> > > have installed Reporting Services today and would like to start
creating
> > > some projects with it.
> > >
> > > When installing reporting services, I didn't install the server
software
> > on
> > > the same machine as VS.Net. I don't need to do that do I?
> > >
> > > Thanks in advance,
> > > Mark
> > >
> > >
> >
> >
>

Business Intelligence Project

Hello

Where can I download the project type for reporting services? I need this for Visual Studios 2003.

thanksYou can get this only by installing the designer components from the SQL Reporting Services 2000 setup.

-Daniel|||

Do you know where I can find that to download?

Christine

|||You can get the trial version from here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=ba517c01-2e2f-4bc7-84af-149b7637f807&DisplayLang=en

This is the same as the full version. The designer components are not trial versions and will not expire after 180 days.

-Daniel|||Thank you. I appreciate the help

Business Intelligence Project

Hello

Where can I download the project type for reporting services? I need this for Visual Studios 2003.

thanksYou can get this only by installing the designer components from the SQL Reporting Services 2000 setup.

-Daniel|||

Do you know where I can find that to download?

Christine

|||You can get the trial version from here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=ba517c01-2e2f-4bc7-84af-149b7637f807&DisplayLang=en

This is the same as the full version. The designer components are not trial versions and will not expire after 180 days.

-Daniel|||Thank you. I appreciate the help

Business Intelligence Development Studio

Why doesn't BIDS come with a SQL Server project template? After researching I noticed it only comes with Visual Studio 2005 Professional or Developer edition.

Is there a way to add it to BIDS?

Thanks,

Fred

BIDS is just the bare bones of the VS Shell, if you install Pro or Team Suite after installing BIDS then you will get the SQL Server Project Template in addition to the BI ones.|||

I still think they (Microsoft) should have included the SQL Server project template with SQL Server 2005 Development edition since they advertice the use of SQLCLRs with it.

Fred

|||As explained they are equipped with BIDS and not with usual SQL editions.|||

I think thats fair feedback, you can however use SQLCLR without VS, but perhaps you should make the suggestion on http://connect.microsoft.com

Friday, February 10, 2012

BulkLoad and .xsd problem

I would like to load a xml file to a database. For reasons this I use the
BulkLoad
COM object model. The elements of the project are following:
The XML file:
--
<?xml version="1.0" encoding="ISO8859-2" ?>
<export>
<ceg id="0000000147">
<rovat id = "0">
<alrovat id = "1">
<mezo id = "bir">piros</mezo>
<mezo id = "cf">tarka</mezo>
</alrovat>
</rovat>
<rovat id = "2">
<alrovat id = "1">
<mezo id = "nev">FA-MAG Ipari Kisszovetkezet</mezo>
</alrovat>
</rovat>
</ceg>
<ceg id="0000000153">
etc.
</ceg>
</export>
The columns of the tblExport table in the DB:
---
ceg_id char(10)
rovat_id varchar(10)
alrovat_id varchar(10)
mezo_id varchar(50)
mezo_text varchar(1000)
The following xsd file has been used:
--
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xsd:element name="ceg" sql:relation="[tblExport]">
<xsd:complexType>
<xsd:choice>
<xsd:element name="rovat" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="alrovat" minOccurs="0"
maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="mezo" sql:field="mezo_text"
minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:attribute name="id"
sql:field="mezo_id" type="xsd:string" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="id" sql:field="alrovat_id"
type="xsd:string" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="id" sql:field="rovat_id"
type="xsd:string" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
<xsd:attribute name="id" sql:field="ceg_id" type="xsd:string" />
</xsd:complexType>
</xsd:element>
</xsd:schema>
I've expected the following result set (and I would like to get same):
ceg_id rovat_id alrovat_id mezo_id mezo
_text
----
0000000147 0 1 bir piros
0000000147 0 1 cf tarka
0000000147 2 1 nev FA-MAG Ipari Kisszovetkezet
0000000153 etc.
But I've got this:
ceg_id rovat_id alrovat_id mezo_id mezo
_text
----
0000000147 Null Null Null Null
0000000153 Null Null Null Null
etc.
Why? I tried to change the xsd file at many places and many times. For
example I changed <xsd:choice> to <xsd:sequence> but the BulkLoad
expected a reletionship on 'rovat'. But I don't want to take an extra table.
If I use sql:is-constant annotation an error will be raised saying that
constant element has no attribute. In most cases I don't get error but no
records will be generated.
Has anybody a good suggestion? I would be grateful for any help.
Thanks.
D. AttilaYou have to use xsd:sequence instead of xsd:choice and specify
sql:is-constant="1" on the elements 'rovat' and 'alrovat'.
Bertan ARI
This posting is provided "AS IS" with no warranties, and confers no rights.
"Danyi, Attila" <DanyiAttila@.discussions.microsoft.com> wrote in message
news:B08BA56A-FAD0-4DDE-A0B7-1FA57EA7C27B@.microsoft.com...
> I would like to load a xml file to a database. For reasons this I use the
> BulkLoad
> COM object model. The elements of the project are following:
> The XML file:
> --
> <?xml version="1.0" encoding="ISO8859-2" ?>
> <export>
> <ceg id="0000000147">
> <rovat id = "0">
> <alrovat id = "1">
> <mezo id = "bir">piros</mezo>
> <mezo id = "cf">tarka</mezo>
> </alrovat>
> </rovat>
> <rovat id = "2">
> <alrovat id = "1">
> <mezo id = "nev">FA-MAG Ipari Kisszovetkezet</mezo>
> </alrovat>
> </rovat>
> </ceg>
> <ceg id="0000000153">
> etc.
> </ceg>
> </export>
> The columns of the tblExport table in the DB:
> ---
> ceg_id char(10)
> rovat_id varchar(10)
> alrovat_id varchar(10)
> mezo_id varchar(50)
> mezo_text varchar(1000)
> The following xsd file has been used:
> --
> <?xml version="1.0"?>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
> <xsd:element name="ceg" sql:relation="[tblExport]">
> <xsd:complexType>
> <xsd:choice>
> <xsd:element name="rovat" minOccurs="0" maxOccurs="unbounded">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="alrovat" minOccurs="0"
> maxOccurs="unbounded">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="mezo"
sql:field="mezo_text"
> minOccurs="0" maxOccurs="unbounded">
> <xsd:complexType>
> <xsd:attribute name="id"
> sql:field="mezo_id" type="xsd:string" />
> </xsd:complexType>
> </xsd:element>
> </xsd:sequence>
> <xsd:attribute name="id" sql:field="alrovat_id"
> type="xsd:string" />
> </xsd:complexType>
> </xsd:element>
> </xsd:sequence>
> <xsd:attribute name="id" sql:field="rovat_id"
> type="xsd:string" />
> </xsd:complexType>
> </xsd:element>
> </xsd:choice>
> <xsd:attribute name="id" sql:field="ceg_id" type="xsd:string" />
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
> I've expected the following result set (and I would like to get same):
> ceg_id rovat_id alrovat_id mezo_id mezo_text
> ----
> 0000000147 0 1 bir piros
> 0000000147 0 1 cf tarka
> 0000000147 2 1 nev FA-MAG Ipari Kisszovetkezet
> 0000000153 etc.
> But I've got this:
> ceg_id rovat_id alrovat_id mezo_id mezo_text
> ----
> 0000000147 Null Null Null Null
> 0000000153 Null Null Null Null
> etc.
> Why? I tried to change the xsd file at many places and many times. For
> example I changed <xsd:choice> to <xsd:sequence> but the BulkLoad
> expected a reletionship on 'rovat'. But I don't want to take an extra
table.
> If I use sql:is-constant annotation an error will be raised saying that
> constant element has no attribute. In most cases I don't get error but no
> records will be generated.
> Has anybody a good suggestion? I would be grateful for any help.
> Thanks.
> D. Attila
>
>|||Thanks, but I have tried it. I get the following error:
.....constant/fixed element cannot have attributes.....
But I need these attributes.
D.A.
"Bertan ARI [MSFT]" wrote:

> You have to use xsd:sequence instead of xsd:choice and specify
> sql:is-constant="1" on the elements 'rovat' and 'alrovat'.
> --
> Bertan ARI
> This posting is provided "AS IS" with no warranties, and confers no rights
.
>
> "Danyi, Attila" <DanyiAttila@.discussions.microsoft.com> wrote in message
> news:B08BA56A-FAD0-4DDE-A0B7-1FA57EA7C27B@.microsoft.com...
> sql:field="mezo_text"
> table.
>
>|||Sorry my mistake. I didn't see the attributes.
Unfortunately, your scenario is currently not supported by Bulkload.
Currently we do not allow attributes on constant elements and there are no
future plans to support it.
You may use XSLT to transform the Xml into a shape Bulkload can support or
you may use OpenXml which doesn't have this limitation.
Bertan ARI
This posting is provided "AS IS" with no warranties, and confers no rights.
"Danyi, Attila" <DanyiAttila@.discussions.microsoft.com> wrote in message
news:CFB3D497-86E8-4207-97EA-F3EC42D2DEE5@.microsoft.com...
> Thanks, but I have tried it. I get the following error:
> .....constant/fixed element cannot have attributes.....
> But I need these attributes.
> D.A.
> "Bertan ARI [MSFT]" wrote:
>
rights.
the
xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
maxOccurs="unbounded">
sql:field="alrovat_id"
/>
> ----
> ----
that
no|||Thanks for your response.
D.A.
"Bertan ARI [MSFT]" wrote:

> Sorry my mistake. I didn't see the attributes.
> Unfortunately, your scenario is currently not supported by Bulkload.
> Currently we do not allow attributes on constant elements and there are no
> future plans to support it.
> You may use XSLT to transform the Xml into a shape Bulkload can support or
> you may use OpenXml which doesn't have this limitation.
> --
> Bertan ARI
> This posting is provided "AS IS" with no warranties, and confers no rights
.
>
> "Danyi, Attila" <DanyiAttila@.discussions.microsoft.com> wrote in message
> news:CFB3D497-86E8-4207-97EA-F3EC42D2DEE5@.microsoft.com...
> rights.
> the
> xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
> maxOccurs="unbounded">
> sql:field="alrovat_id"
> />
> that
> no
>
>

BulkLoad and .xsd problem

I would like to load a xml file to a database. For reasons this I use the
BulkLoad
COM object model. The elements of the project are following:
The XML file:
<?xml version="1.0" encoding="ISO8859-2" ?>
<export>
<ceg id="0000000147">
<rovat id = "0">
<alrovat id = "1">
<mezo id = "bir">piros</mezo>
<mezo id = "cf">tarka</mezo>
</alrovat>
</rovat>
<rovat id = "2">
<alrovat id = "1">
<mezo id = "nev">FA-MAG Ipari Kisszovetkezet</mezo>
</alrovat>
</rovat>
</ceg>
<ceg id="0000000153">
etc.
</ceg>
</export>
The columns of the tblExport table in the DB:
ceg_idchar(10)
rovat_idvarchar(10)
alrovat_idvarchar(10)
mezo_idvarchar(50)
mezo_textvarchar(1000)
The following xsd file has been used:
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xsd:element name="ceg" sql:relation="[tblExport]">
<xsd:complexType>
<xsd:choice>
<xsd:element name="rovat" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="alrovat" minOccurs="0"
maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="mezo" sql:field="mezo_text"
minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:attribute name="id"
sql:field="mezo_id" type="xsd:string" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="id" sql:field="alrovat_id"
type="xsd:string" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="id" sql:field="rovat_id"
type="xsd:string" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
<xsd:attribute name="id" sql:field="ceg_id" type="xsd:string" />
</xsd:complexType>
</xsd:element>
</xsd:schema>
I've expected the following result set (and I would like to get same):
ceg_idrovat_idalrovat_idmezo_idmezo_text
000000014701birpiros
000000014701cftarka
000000014721nevFA-MAG Ipari Kisszovetkezet
0000000153etc.
But I've got this:
ceg_idrovat_idalrovat_idmezo_idmezo_text
0000000147NullNullNullNull
0000000153NullNullNullNull
etc.
Why? I tried to change the xsd file at many places and many times. For
example I changed <xsd:choice> to <xsd:sequence> but the BulkLoad
expected a reletionship on 'rovat'. But I don't want to take an extra table.
If I use sql:is-constant annotation an error will be raised saying that
constant element has no attribute. In most cases I don't get error but no
records will be generated.
Has anybody a good suggestion? I would be grateful for any help.
Thanks.
D. Attila
You have to use xsd:sequence instead of xsd:choice and specify
sql:is-constant="1" on the elements 'rovat' and 'alrovat'.
Bertan ARI
This posting is provided "AS IS" with no warranties, and confers no rights.
"Danyi, Attila" <DanyiAttila@.discussions.microsoft.com> wrote in message
news:B08BA56A-FAD0-4DDE-A0B7-1FA57EA7C27B@.microsoft.com...
> I would like to load a xml file to a database. For reasons this I use the
> BulkLoad
> COM object model. The elements of the project are following:
> The XML file:
> --
> <?xml version="1.0" encoding="ISO8859-2" ?>
> <export>
> <ceg id="0000000147">
> <rovat id = "0">
> <alrovat id = "1">
> <mezo id = "bir">piros</mezo>
> <mezo id = "cf">tarka</mezo>
> </alrovat>
> </rovat>
> <rovat id = "2">
> <alrovat id = "1">
> <mezo id = "nev">FA-MAG Ipari Kisszovetkezet</mezo>
> </alrovat>
> </rovat>
> </ceg>
> <ceg id="0000000153">
> etc.
> </ceg>
> </export>
> The columns of the tblExport table in the DB:
> ceg_id char(10)
> rovat_id varchar(10)
> alrovat_id varchar(10)
> mezo_id varchar(50)
> mezo_text varchar(1000)
> The following xsd file has been used:
> --
> <?xml version="1.0"?>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
> <xsd:element name="ceg" sql:relation="[tblExport]">
> <xsd:complexType>
> <xsd:choice>
> <xsd:element name="rovat" minOccurs="0" maxOccurs="unbounded">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="alrovat" minOccurs="0"
> maxOccurs="unbounded">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="mezo"
sql:field="mezo_text"
> minOccurs="0" maxOccurs="unbounded">
> <xsd:complexType>
> <xsd:attribute name="id"
> sql:field="mezo_id" type="xsd:string" />
> </xsd:complexType>
> </xsd:element>
> </xsd:sequence>
> <xsd:attribute name="id" sql:field="alrovat_id"
> type="xsd:string" />
> </xsd:complexType>
> </xsd:element>
> </xsd:sequence>
> <xsd:attribute name="id" sql:field="rovat_id"
> type="xsd:string" />
> </xsd:complexType>
> </xsd:element>
> </xsd:choice>
> <xsd:attribute name="id" sql:field="ceg_id" type="xsd:string" />
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
> I've expected the following result set (and I would like to get same):
> ceg_id rovat_id alrovat_id mezo_id mezo_text
> ----
> 0000000147 0 1 bir piros
> 0000000147 0 1 cf tarka
> 0000000147 2 1 nev FA-MAG Ipari Kisszovetkezet
> 0000000153 etc.
> But I've got this:
> ceg_id rovat_id alrovat_id mezo_id mezo_text
> ----
> 0000000147 Null Null Null Null
> 0000000153 Null Null Null Null
> etc.
> Why? I tried to change the xsd file at many places and many times. For
> example I changed <xsd:choice> to <xsd:sequence> but the BulkLoad
> expected a reletionship on 'rovat'. But I don't want to take an extra
table.
> If I use sql:is-constant annotation an error will be raised saying that
> constant element has no attribute. In most cases I don't get error but no
> records will be generated.
> Has anybody a good suggestion? I would be grateful for any help.
> Thanks.
> D. Attila
>
>
|||Thanks, but I have tried it. I get the following error:
......constant/fixed element cannot have attributes.....
But I need these attributes.
D.A.
"Bertan ARI [MSFT]" wrote:

> You have to use xsd:sequence instead of xsd:choice and specify
> sql:is-constant="1" on the elements 'rovat' and 'alrovat'.
> --
> Bertan ARI
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Danyi, Attila" <DanyiAttila@.discussions.microsoft.com> wrote in message
> news:B08BA56A-FAD0-4DDE-A0B7-1FA57EA7C27B@.microsoft.com...
> sql:field="mezo_text"
> table.
>
>
|||Sorry my mistake. I didn't see the attributes.
Unfortunately, your scenario is currently not supported by Bulkload.
Currently we do not allow attributes on constant elements and there are no
future plans to support it.
You may use XSLT to transform the Xml into a shape Bulkload can support or
you may use OpenXml which doesn't have this limitation.
Bertan ARI
This posting is provided "AS IS" with no warranties, and confers no rights.
"Danyi, Attila" <DanyiAttila@.discussions.microsoft.com> wrote in message
news:CFB3D497-86E8-4207-97EA-F3EC42D2DEE5@.microsoft.com...[vbcol=seagreen]
> Thanks, but I have tried it. I get the following error:
> .....constant/fixed element cannot have attributes.....
> But I need these attributes.
> D.A.
> "Bertan ARI [MSFT]" wrote:
rights.[vbcol=seagreen]
the[vbcol=seagreen]
xmlns:sql="urn:schemas-microsoft-com:mapping-schema">[vbcol=seagreen]
maxOccurs="unbounded">[vbcol=seagreen]
sql:field="alrovat_id"[vbcol=seagreen]
/>[vbcol=seagreen]
> ----
> ----
that[vbcol=seagreen]
no[vbcol=seagreen]
|||Thanks for your response.
D.A.
"Bertan ARI [MSFT]" wrote:

> Sorry my mistake. I didn't see the attributes.
> Unfortunately, your scenario is currently not supported by Bulkload.
> Currently we do not allow attributes on constant elements and there are no
> future plans to support it.
> You may use XSLT to transform the Xml into a shape Bulkload can support or
> you may use OpenXml which doesn't have this limitation.
> --
> Bertan ARI
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Danyi, Attila" <DanyiAttila@.discussions.microsoft.com> wrote in message
> news:CFB3D497-86E8-4207-97EA-F3EC42D2DEE5@.microsoft.com...
> rights.
> the
> xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
> maxOccurs="unbounded">
> sql:field="alrovat_id"
> />
> that
> no
>
>