Showing posts with label net. Show all posts
Showing posts with label net. Show all posts

Friday, March 30, 2012

How to change the DataBase Collation!

Hello all:
I try to change the Collation of database, but it not work in
vb.net 2005, have any one do it before?
MatchSQL,
Use "alter database", but this does not change the collation for all char /
nchar / varchar / nvarchar / etc. columns.
How to transfer a database from one collation to another collation in SQL
Server
[url]http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.server& cat=en_US_671e06d0-f20d-4bb3-9c6a-42c825ddb1dc&lang=en&cr=US[/url]
AMB
"MatchSQL" wrote:

> Hello all:
> I try to change the Collation of database, but it not work in
> vb.net 2005, have any one do it before?
>

How to change the DataBase Collation!

Hello all:
I try to change the Collation of database, but it not work in
vb.net 2005, have any one do it before?MatchSQL,
Use "alter database", but this does not change the collation for all char /
nchar / varchar / nvarchar / etc. columns.
How to transfer a database from one collation to another collation in SQL
Server
http://www.microsoft.com/communitie...n&cr=US

AMB
"MatchSQL" wrote:

> Hello all:
> I try to change the Collation of database, but it not work in
> vb.net 2005, have any one do it before?
>

How to change the DataBase Collation!

Hello all:
I try to change the Collation of database, but it not work in
vb.net 2005, have any one do it before?MatchSQL,
Use "alter database", but this does not change the collation for all char /
nchar / varchar / nvarchar / etc. columns.
How to transfer a database from one collation to another collation in SQL
Serve
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.server&cat=en_US_671e06d0-f20d-4bb3-9c6a-42c825ddb1dc&lang=en&cr=US
AMB
"MatchSQL" wrote:
> Hello all:
> I try to change the Collation of database, but it not work in
> vb.net 2005, have any one do it before?
>

Wednesday, March 28, 2012

how to change SS name ?

i set the name of my ss to default on install, and now i want to use 'AttachDbFilename' to attach my dbfile in my asp.net app, but i cannot connect to the server. i fond in the adv. options, that the DataSource is set to '.\SQLEXPRESS' which is not the name of my SS, but i can't change it, so i want to ask if i can change the name of my SS withou reinstall.

thx for helping!

No you can not change Instance name... u have to reinstall it... BTW why u can not change the connection string...

Madhu

|||

it's not the connection string, i have not get yet, because i can not pass the test.

when i select the file, i click the test button, and got a fail message. i click the advence button, and i found that the DataSource is set the .\SQLEXPRESS, it's a dropdown list, in which you can choose DataSources, but you can't type in...

|||

\SQLEXPRESS is the default server name for an instance of SQL Server 2005 Express.

Are you sure that is not your server name?

Please post the complete error messages.

|||

well, i have reinstall SQL, and i can't remember the original error message, i can show you a step-by-step about how i get this problem

in vs.net(i use web dev), open the 'database explorer'-->'add connection'-->click 'change' atop of the dialog box-->select 'microsoft sql server database file'-->click 'advance' on the bottom of the dialog box-->in 'source' section, find 'datasource', you will see it's a drop-down list, so you can select the SS you want to use, but you can't type in. so if you install SS, and set the modal to 'default', rather than 'named instance', you cant find you'r SS here

Friday, March 23, 2012

How to change from SQL Server Express to Database.mdf connection

Hi,

I've created a SQL Server Express Database that is used by an ASP.NET 2.0 application (developed using VWD Express).

I would like to be able to:

    Make changes to stored procedures, views and table structures while developing/testing ASP.NET application - which, ideally, needs a SQL Server Manager Studio Express connection and Upload my application and data to a database on a network - which, ideally, needs a direct Database.mdf connection.

I know that I need to change my connection string - and am able to achieve that with ease - but I'm not sure what the best way of switching between the two ways of attaching on the database side. I keep getting logon type problems etc.

Thanks very much.

Regards

Gary

Hi,

that should be normally straight forward using on of the user instances string for "attaching" the database to a instance temporarly (www.connectionstrings.com) Which error do you get while attaching ?

HTH, JEns Suessmeyer.

http://www.sqlserver2005.de

Wednesday, March 21, 2012

How to change crystal report document title dynamically?

I have ReportClass object of .Net CrystalReport
that uses .rpt file
ResCalc.SalesReport rpt = new ResCalc.SalesReport();
rpt.SetDataSource(dsSaleRep);
How to change crystal report document title dynamically?
Thanks,
Alex.Hi Alex,
i am new member of this forum...

you can try the following:

ReportDocument oRpt = new ReportDocument ();
oRpt.SummaryInfo.ReportTitle = yourinputcontrol.Text;

as in my case it was a checklist box so i did as follows

Reports.TIPSheetsSummary frmTIPSummaryReport = new TIPSheetsSummary();
frmTIPSummaryReport.oRpt.SummaryInfo.ReportTitle = "TIP Sheets Summary for Airplane Tab No. " + this.checkedListBox1.SelectedItem.ToString();

Regards,
Ashwini

Monday, March 19, 2012

How to change an existing UID to autonumbering?

Hullo!

Doubt it matters too much, but I'll just start off by saying that I'm using C# ASP.NET 2.0 in Visual Studio 2005.

I currently have a UID field entitled "ID", and I'd like to make it autonumbering so that users can input stuff into it through a simple web interface and not have to worry about the user's ID.

Anyone know how I could go about doing this? I can't seem to find a way through VS2005's GUI, and I can't seem to find anything on the internet about doing it through an SQL statement.

Thanks!I may have already figured my own problem out - I just have to test something really quick. If it works, I'll come back and tell ya what I did.

Monday, March 12, 2012

How To call TRIGGER in VB.net 2005

i hav written a trigger in SQLEXPRESS DB but i dnt knw how to call in vb.net 2005...

Move the source code from trigger to stored proc, create the stored proc with moved code & call the SP from your ADO.NET.

|||

You do not call triggers. They fire when the event, it is related to, occurs. Check BOL for more information about triggers.

AMB

Friday, March 9, 2012

How to call a stored procedure in asp.net

I have created a stored procedure only with an insert statement in sql server 2005.

How can i call this stored procedure through code in ASP.NET page using vb.

i want to pass one parameter that comes from a text box in asp.net page.

my emailid is:g12garg@.yahoo.co.in pls reply.

Thank you

Gaurav

dim conn as new sqlconnection("Your connection string here")

dim cmd as new sqlcommand("Your stored procedure name here",conn)

cmd.CommandType=CommandType.StoredProcedure

cmd.parameters.add("@.Your parameter name here",Your parameter type here).value=your parameter value here

conn.open

cmd.executenonquery

conn.close

|||

Thank you.

Now i want to encrypt this passing value in the stored procedure. i want the encryption to be done in the stored procedure using symmetric key. So do i need to convert this value to varbinary in the stored procedure. or only in the table?

Wednesday, March 7, 2012

How to call a parameterized stored procedure within a loop in ASP.NET

I would like to know what are the ways to call a parameterized stored procedure within a loop in ASP.NET.

Scenario:

I have a loop through a dataSet and for each record I am going to execute a stored procedure to insert data in many tables.

I can not use the following syntax:

cmd.CommandType = CommandType.StoredProcedure

cmd.CommandText = "dbo.storedprocedurename"

With cmd

.Parameters.Add(New SqlClient.SqlParameter("@.param1", paramValue1))

.Parameters.Add(New SqlClient.SqlParameter("@.param2", paramValue2))

End With

What are the other ways to execute the parameterized stored procedures within a loop in ASP.NET?

Thanks,

Carlos

As far as i know u can not execute stored procedure with out"CommandType.StoredProcedure"property.

other wise just write a insert query (that also needs parameters) thru loop and execute them by using execute non query

|||

I agree:

The problem is not the following lines:

cmd.CommandType = CommandType.StoredProcedure

cmd.CommandText = "dbo.storedprocedurename"

The problem is the following lines:

With cmd

.Parameters.Add(New SqlClient.SqlParameter("@.param1", paramValue1))

.Parameters.Add(New SqlClient.SqlParameter("@.param2", paramValue2))

End With

I was trying to find the alternative syntax to the lines above and the solution is to use:

With cmd

.Parameters.Add("@.param1", DbDataType.Varchar())

.Parameters.Add("@.param2", DbDataType.Varchar())

End With

Thanks,

Carlos

|||

You said you are going to execute the sproc in a loop, so be careful to clear the parameter collection after executing the sproc, otherwise the parameter's collection in your command object will keep on increasing and on the second loop itself it'll give you and error. This is not needed if you are nullifying and re-setting the command object every time.

Hope this will help.

|||

hi,

As you said you are using for loop for executing stored procedure, so clear the parameters collection after call execute nonquery method like this

cmd.ExecuteNonQuery();
lCmd.Parameters.Clear();

Hope it helps

How to call a dot net assembly from ssis

How to call a dot net assembly from ssis.

I have used a script component and went in the design script editor by clicking the "Design Script" button.From their using a object browser trying to load a dll file in references to be used in the ssis application.

But it gives error " Cannot browse the file"

Can any body help me in the same.

http://blogs.conchango.com/jamiethomson/archive/2005/11/02/2341.aspx

-Jamie

How to Call a c#.net class from stored procedure

Hi,

I would like to know how can I call a c#.net class from a stored procedure.

I have a class file which will generate a pdf file from sql reporting services and mail that file. Now I want to call this class from a stored procedure. Is it possible, if so please send me the sample code.

Thanks in advance

Regards

Babu

Which version of SQL Server are you using ?

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||

SQL Server 2005

|||

Please take a look at the SQLCLR samples in the setup cd. Or you can also look at the examples in Books Online. You can create a SQLCLR stored procedure for example to do this. You can start at the link below:

http://msdn2.microsoft.com/en-us/library/ms131102(SQL.90).aspx

How to call .NET framework library within SPROC

Hi, with SQL server 2005.

Could I write a SPROC with C# or VB.NET that calls methods within the .net library or

Could I package a .net methods into a SPROC to let other SPROC invoke it?

Thanks in advance.

Ricky.

You can write C#, VB.NET methods that can be used from inside SQL Server to call .NET libraries.

Niels
|||Yes, you can write a stored proc in clr (C# or VB.NET) that can call methods in the .NET Framework.
Yes.

http://msdn2.microsoft.com/en-us/library/ms131052.aspx|||

If the SPORC written with C# needs to call another C# method that is within a thrid-party component, is it feasible implement in the SQL server 2005?

Thanks,

Ricky.

|||Yes, but you have to deploy that third party component to the database as weel (i.e together with your original .NET assembly(ies)).

Niels
|||

Hi, nielsb.

I create a database project trying to add reference.

However, I cannot add .dll except for built-in .net library.

How do I deploy a third-party .dll onto sql server 2005? Please give me example if possible.

Thanks a million.

Ricky.

|||Deploy your third party dll manually to SQL Server, by using CREATE ASSEMBLY syntax. Read more about CREATE ASSEMBLY in SQL Server Books OnLine. By deploying it manually, you can then reference it from your database project.

Niels
|||

Thanks too much.

nielsb.

By the way, someone told me that previously (before .net era), he could wrote extended sproc with C and umlinitedly access the library outside SQL server. Why cannot we do as him currently? Security consideration?

Ricky.

|||

Ricky Wang wrote:

By the way, someone told me that previously (before .net era), he could wrote extended sproc with C and umlinitedly access the library outside SQL server. Why cannot we do as him currently? Security consideration?

Extebded stored proc's are still supported in SQL 2005, but are being deprecated. Main reason for this is security and reliability issues. The extended proc's are deprecated in favor of .NET methods. You can almost do anything that you are doing in and XP in a .NET method.

Niels
|||

Thanks for explanation.

Ricky.

How to call .NET components in SQL Server

Hi,
Can any guide me, how to register .NET component in SQL Server 2000 and call
the method.
Thanks & Regards
V.Edayachandran
You cannot call a .NET component from SQL Server 2000 directly. Either you
need to use an extended stored procedure wrapper to call it or try to create
a CCW for the component and then invoke the same using sp_OA* procedures.
Remember these are NOT supported by MS though they work ...
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
"EDA" <EDA@.discussions.microsoft.com> wrote in message
news:DE695846-A575-4B0F-B4C9-E4FCBD5F559B@.microsoft.com...
> Hi,
> Can any guide me, how to register .NET component in SQL Server 2000 and
call
> the method.
> Thanks & Regards
> V.Edayachandran
|||To add to Vinod's response, here's a link to an MSKB article on the subject:
http://support.microsoft.com/default...;en-us;322884.
You'll have a lot more options in SQL 2005, though.
Hope this helps.
Dan Guzman
SQL Server MVP
"EDA" <EDA@.discussions.microsoft.com> wrote in message
news:DE695846-A575-4B0F-B4C9-E4FCBD5F559B@.microsoft.com...
> Hi,
> Can any guide me, how to register .NET component in SQL Server 2000 and
> call
> the method.
> Thanks & Regards
> V.Edayachandran
|||"Vinod Kumar" <vinodk_sct@.NO_SPAM_hotmail.com> wrote in message
news:cuadre$1f6$1@.news01.intel.com...
> You cannot call a .NET component from SQL Server 2000 directly. Either you
> need to use an extended stored procedure wrapper to call it or try to
> create
> a CCW for the component and then invoke the same using sp_OA* procedures.
While it's not supported to call .NET components directly from SQL Server,
indirect methods which don't load the CLR into the SQL Server process are
OK. So you can use the MSXML2.ServerXMLHTTP COM library to invoke a .NET
web service, or you can install your COM-Callable .NET component in COM+ as
a COM+ server application. In the first case you are loading an unmanaged
COM library in the SQL Server process, and in the second, COM is supplying
an unmanaged proxy for the SQL Server process and remoting calls over to a
COM+ process where the CLR and and your component are loaded.
David

How to call .NET components in SQL Server

Hi,
Can any guide me, how to register .NET component in SQL Server 2000 and call
the method.
Thanks & Regards
V.EdayachandranYou cannot call a .NET component from SQL Server 2000 directly. Either you
need to use an extended stored procedure wrapper to call it or try to create
a CCW for the component and then invoke the same using sp_OA* procedures.
Remember these are NOT supported by MS though they work ...
--
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
"EDA" <EDA@.discussions.microsoft.com> wrote in message
news:DE695846-A575-4B0F-B4C9-E4FCBD5F559B@.microsoft.com...
> Hi,
> Can any guide me, how to register .NET component in SQL Server 2000 and
call
> the method.
> Thanks & Regards
> V.Edayachandran|||To add to Vinod's response, here's a link to an MSKB article on the subject:
http://support.microsoft.com/default.aspx?scid=kb;en-us;322884.
You'll have a lot more options in SQL 2005, though.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"EDA" <EDA@.discussions.microsoft.com> wrote in message
news:DE695846-A575-4B0F-B4C9-E4FCBD5F559B@.microsoft.com...
> Hi,
> Can any guide me, how to register .NET component in SQL Server 2000 and
> call
> the method.
> Thanks & Regards
> V.Edayachandran|||"Vinod Kumar" <vinodk_sct@.NO_SPAM_hotmail.com> wrote in message
news:cuadre$1f6$1@.news01.intel.com...
> You cannot call a .NET component from SQL Server 2000 directly. Either you
> need to use an extended stored procedure wrapper to call it or try to
> create
> a CCW for the component and then invoke the same using sp_OA* procedures.
While it's not supported to call .NET components directly from SQL Server,
indirect methods which don't load the CLR into the SQL Server process are
OK. So you can use the MSXML2.ServerXMLHTTP COM library to invoke a .NET
web service, or you can install your COM-Callable .NET component in COM+ as
a COM+ server application. In the first case you are loading an unmanaged
COM library in the SQL Server process, and in the second, COM is supplying
an unmanaged proxy for the SQL Server process and remoting calls over to a
COM+ process where the CLR and and your component are loaded.
David

How to call .NET components in SQL Server

Hi,
Can any guide me, how to register .NET component in SQL Server 2000 and call
the method.
Thanks & Regards
V.EdayachandranYou cannot call a .NET component from SQL Server 2000 directly. Either you
need to use an extended stored procedure wrapper to call it or try to create
a CCW for the component and then invoke the same using sp_OA* procedures.
Remember these are NOT supported by MS though they work ...
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
"EDA" <EDA@.discussions.microsoft.com> wrote in message
news:DE695846-A575-4B0F-B4C9-E4FCBD5F559B@.microsoft.com...
> Hi,
> Can any guide me, how to register .NET component in SQL Server 2000 and
call
> the method.
> Thanks & Regards
> V.Edayachandran|||To add to Vinod's response, here's a link to an MSKB article on the subject:
http://support.microsoft.com/defaul...b;en-us;322884.
You'll have a lot more options in SQL 2005, though.
Hope this helps.
Dan Guzman
SQL Server MVP
"EDA" <EDA@.discussions.microsoft.com> wrote in message
news:DE695846-A575-4B0F-B4C9-E4FCBD5F559B@.microsoft.com...
> Hi,
> Can any guide me, how to register .NET component in SQL Server 2000 and
> call
> the method.
> Thanks & Regards
> V.Edayachandran|||"Vinod Kumar" <vinodk_sct@.NO_SPAM_hotmail.com> wrote in message
news:cuadre$1f6$1@.news01.intel.com...
> You cannot call a .NET component from SQL Server 2000 directly. Either you
> need to use an extended stored procedure wrapper to call it or try to
> create
> a CCW for the component and then invoke the same using sp_OA* procedures.
While it's not supported to call .NET components directly from SQL Server,
indirect methods which don't load the CLR into the SQL Server process are
OK. So you can use the MSXML2.ServerXMLHTTP COM library to invoke a .NET
web service, or you can install your COM-Callable .NET component in COM+ as
a COM+ server application. In the first case you are loading an unmanaged
COM library in the SQL Server process, and in the second, COM is supplying
an unmanaged proxy for the SQL Server process and remoting calls over to a
COM+ process where the CLR and and your component are loaded.
David

Sunday, February 19, 2012

How to build an SQL-string from a record

Hi,
I need a solution for this in SQL Server, or in VB.NET, so for this reason I
posted it to the 2 newsgroups.
I need to build an SQL String from a given record.
For exemple: I have in my table tblMyCows this record:
CowID: 1
CowName: Bella (a typical Belgian cowname)
CowGender: Female
I should have something that generates me the Insert-statement for it: like
this: "INSERT INTO tblMyCows (CowID, CowName, CowGender) VALUES (1, 'Bella',
'Female')".
If possible the same with an update an delete statement, and it would be
really nice if it could detect itself the primary keys, and use them for for
the update and Delete statements.
Anybody any idea?
Thanks a lot in advance,
PieterPieter,
Do you now need Bella because you was yesterday to much involved with
Stella.
I count 4 newsgroups, not 2.
However your problem sounds not difficult for me, what I not direct see, is
if the tblMycows is a datatable or that it is a table in a database?
Cor|||Hi Pieter,
maybe this can be of help (haven't tested it yet)
http://vyaskn.tripod.com/code.htm#inserts
btw I would rather be involved with Stella than with Heineken ;-)
hth Peter
"Cor Ligthert" <notmyfirstname@.planet.nl> schreef in bericht
news:O4vtTtZSFHA.3052@.TK2MSFTNGP09.phx.gbl...
> Pieter,
> Do you now need Bella because you was yesterday to much involved with
> Stella.
> I count 4 newsgroups, not 2.
> However your problem sounds not difficult for me, what I not direct see,
is
> if the tblMycows is a datatable or that it is a table in a database?
> Cor
>|||Hehe it was Jupiler :-)
And tblMyCows is a table in a Database.
"Cor Ligthert" <notmyfirstname@.planet.nl> wrote in message
news:O4vtTtZSFHA.3052@.TK2MSFTNGP09.phx.gbl...
> Pieter,
> Do you now need Bella because you was yesterday to much involved with
> Stella.
> I count 4 newsgroups, not 2.
> However your problem sounds not difficult for me, what I not direct see,
is
> if the tblMycows is a datatable or that it is a table in a database?
> Cor
>|||Hm thanks, it seems really nice, and just the thing I was looking for :-)
"Peter Proost" <pproost@.nospam.hotmail.com> wrote in message
news:OnQUGwZSFHA.2788@.TK2MSFTNGP09.phx.gbl...
> Hi Pieter,
> maybe this can be of help (haven't tested it yet)
> http://vyaskn.tripod.com/code.htm#inserts
> btw I would rather be involved with Stella than with Heineken ;-)
> hth Peter
>
>
> "Cor Ligthert" <notmyfirstname@.planet.nl> schreef in bericht
> news:O4vtTtZSFHA.3052@.TK2MSFTNGP09.phx.gbl...
> > Pieter,
> >
> > Do you now need Bella because you was yesterday to much involved with
> > Stella.
> > I count 4 newsgroups, not 2.
> >
> > However your problem sounds not difficult for me, what I not direct see,
> is
> > if the tblMycows is a datatable or that it is a table in a database?
> >
> > Cor
> >
> >
>|||Pieter,
> Hehe it was Jupiler :-)
You don't believe it, that was what I wrote first.
However Bella and Stella did sound better.
:-)
I have no sample at hand I will try to make it (I don't promish I succeed),
than probably I show it tomorrow. (I have the other way around).
Cor|||Pieter,
Wrong answer (not the jupiler), I have that part from the sample from which
in my opinion you should be able to do the rest yourself, when not, than
reply.
Have a look in this message.
http://groups-beta.google.com/group/microsoft.public.dotnet.languages.vb/msg/470d93378c5467f8?hl=en
Cor

How to build an SQL-string from a record

Hi,
I need a solution for this in SQL Server, or in VB.NET, so for this reason I
posted it to the 2 newsgroups.
I need to build an SQL String from a given record.
For exemple: I have in my table tblMyCows this record:
CowID: 1
CowName: Bella (a typical Belgian cowname)
CowGender: Female
I should have something that generates me the Insert-statement for it: like
this: "INSERT INTO tblMyCows (CowID, CowName, CowGender) VALUES (1, 'Bella',
'Female')".
If possible the same with an update an delete statement, and it would be
really nice if it could detect itself the primary keys, and use them for for
the update and Delete statements.
Anybody any idea?
Thanks a lot in advance,
PieterPieter,
Do you now need Bella because you was yesterday to much involved with
Stella.
I count 4 newsgroups, not 2.
However your problem sounds not difficult for me, what I not direct see, is
if the tblMycows is a datatable or that it is a table in a database?
Cor|||Hi Pieter,
maybe this can be of help (haven't tested it yet)
http://vyaskn.tripod.com/code.htm#inserts
btw I would rather be involved with Stella than with Heineken ;-)
hth Peter
"Cor Ligthert" <notmyfirstname@.planet.nl> schreef in bericht
news:O4vtTtZSFHA.3052@.TK2MSFTNGP09.phx.gbl...
> Pieter,
> Do you now need Bella because you was yesterday to much involved with
> Stella.
> I count 4 newsgroups, not 2.
> However your problem sounds not difficult for me, what I not direct see,
is
> if the tblMycows is a datatable or that it is a table in a database?
> Cor
>|||Hehe it was Jupiler :-)
And tblMyCows is a table in a Database.
"Cor Ligthert" <notmyfirstname@.planet.nl> wrote in message
news:O4vtTtZSFHA.3052@.TK2MSFTNGP09.phx.gbl...
> Pieter,
> Do you now need Bella because you was yesterday to much involved with
> Stella.
> I count 4 newsgroups, not 2.
> However your problem sounds not difficult for me, what I not direct see,
is
> if the tblMycows is a datatable or that it is a table in a database?
> Cor
>|||Hm thanks, it seems really nice, and just the thing I was looking for :-)
"Peter Proost" <pproost@.nospam.hotmail.com> wrote in message
news:OnQUGwZSFHA.2788@.TK2MSFTNGP09.phx.gbl...
> Hi Pieter,
> maybe this can be of help (haven't tested it yet)
> http://vyaskn.tripod.com/code.htm#inserts
> btw I would rather be involved with Stella than with Heineken ;-)
> hth Peter
>
>
> "Cor Ligthert" <notmyfirstname@.planet.nl> schreef in bericht
> news:O4vtTtZSFHA.3052@.TK2MSFTNGP09.phx.gbl...
> is
>|||Pieter,

> Hehe it was Jupiler :-)
You don't believe it, that was what I wrote first.
However Bella and Stella did sound better.
:-)
I have no sample at hand I will try to make it (I don't promish I succeed),
than probably I show it tomorrow. (I have the other way around).
Cor|||Pieter,
Wrong answer (not the jupiler), I have that part from the sample from which
in my opinion you should be able to do the rest yourself, when not, than
reply.
Have a look in this message.
3378c5467f8?hl=en" target="_blank">http://groups-beta.google.com/group...78c5467f8?hl=en
Cor

How to build an SQL-string from a record

Hi,
I need a solution for this in SQL Server, or in VB.NET, so for this reason I
posted it to the 2 newsgroups.
I need to build an SQL String from a given record.
For exemple: I have in my table tblMyCows this record:
CowID: 1
CowName: Bella (a typical Belgian cowname)
CowGender: Female
I should have something that generates me the Insert-statement for it: like
this: "INSERT INTO tblMyCows (CowID, CowName, CowGender) VALUES (1, 'Bella',
'Female')".
If possible the same with an update an delete statement, and it would be
really nice if it could detect itself the primary keys, and use them for for
the update and Delete statements.
Anybody any idea?
Thanks a lot in advance,
Pieter
Pieter,
Do you now need Bella because you was yesterday to much involved with
Stella.
I count 4 newsgroups, not 2.
However your problem sounds not difficult for me, what I not direct see, is
if the tblMycows is a datatable or that it is a table in a database?
Cor
|||Hi Pieter,
maybe this can be of help (haven't tested it yet)
http://vyaskn.tripod.com/code.htm#inserts
btw I would rather be involved with Stella than with Heineken ;-)
hth Peter
"Cor Ligthert" <notmyfirstname@.planet.nl> schreef in bericht
news:O4vtTtZSFHA.3052@.TK2MSFTNGP09.phx.gbl...
> Pieter,
> Do you now need Bella because you was yesterday to much involved with
> Stella.
> I count 4 newsgroups, not 2.
> However your problem sounds not difficult for me, what I not direct see,
is
> if the tblMycows is a datatable or that it is a table in a database?
> Cor
>
|||Hehe it was Jupiler :-)
And tblMyCows is a table in a Database.
"Cor Ligthert" <notmyfirstname@.planet.nl> wrote in message
news:O4vtTtZSFHA.3052@.TK2MSFTNGP09.phx.gbl...
> Pieter,
> Do you now need Bella because you was yesterday to much involved with
> Stella.
> I count 4 newsgroups, not 2.
> However your problem sounds not difficult for me, what I not direct see,
is
> if the tblMycows is a datatable or that it is a table in a database?
> Cor
>
|||Hm thanks, it seems really nice, and just the thing I was looking for :-)
"Peter Proost" <pproost@.nospam.hotmail.com> wrote in message
news:OnQUGwZSFHA.2788@.TK2MSFTNGP09.phx.gbl...
> Hi Pieter,
> maybe this can be of help (haven't tested it yet)
> http://vyaskn.tripod.com/code.htm#inserts
> btw I would rather be involved with Stella than with Heineken ;-)
> hth Peter
>
>
> "Cor Ligthert" <notmyfirstname@.planet.nl> schreef in bericht
> news:O4vtTtZSFHA.3052@.TK2MSFTNGP09.phx.gbl...
> is
>
|||Pieter,

> Hehe it was Jupiler :-)
You don't believe it, that was what I wrote first.
However Bella and Stella did sound better.
:-)
I have no sample at hand I will try to make it (I don't promish I succeed),
than probably I show it tomorrow. (I have the other way around).
Cor
|||Pieter,
Wrong answer (not the jupiler), I have that part from the sample from which
in my opinion you should be able to do the rest yourself, when not, than
reply.
Have a look in this message.
http://groups-beta.google.com/group/...8c5467f8?hl=en
Cor

HOW to browse KPI's Result Data through ADOMD.NET?

Hi,

My question is how to browse KPI's Result through ADOMD.NET? I mean to get a KPI's Result Data, not get the metadata of KPI, not get the KPI's Value Property(String) either.

I see the MSDN said about AdomdDataReader, but it doesnt tell how to get a KPI's Value.

I guess, I need to get KPI's metadata first, and get a KPI's Value Property, that's a MDX, you know. Then I bring the MDX to the AS server, and get the result. Is it right?

But, if so, when i want to slice on a dimension when I check the KPI's result, how could I do? I have got a KPI's Value Property MDX, then I need to modify the MDX to add the dimension slice to it manually?

Thanks.

Via an MDX query, you can retrieve the various values associated with a KPI using the KPIValue(), KPIGoal(), KPIStatus(), and KPITrend() functions. Here's the link in Books Online for hte KPIValue() function, for example:

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/mdxref9/html/c4f8532c-4c24-4ad5-8847-4522511e0039.htm

If you wanted to slice the KPI values by a given dimension value, you'd just add that to your MDX statement. For example, the following MDX query returns various KPI values for each of the quarters in 2004:

SELECT

{ KPIValue("Internet Revenue"),

KPIGoal("Internet Revenue"),

KPIStatus("Internet Revenue"),

KPITrend("Internet Revenue")

} ON Columns,

Descendants

( { [Date].[Fiscal].[Fiscal Year].&[2004]

}, [Date].[Fiscal].[Fiscal Quarter]

) ON Rows

FROM [Adventure Works]

If you wanted to slice that so that you only get the KPI values filtered by the product category "Bikes", then you could do this:

SELECT

{ KPIValue("Internet Revenue"),

KPIGoal("Internet Revenue"),

KPIStatus("Internet Revenue"),

KPITrend("Internet Revenue")

} ON Columns,

Descendants

( { [Date].[Fiscal].[Fiscal Year].&[2004]

}, [Date].[Fiscal].[Fiscal Quarter]

) ON Rows

FROM [Adventure Works]

WHERE

([Product].[Category].[Bikes])

HTH,

Dave F.

|||Thank you very much! This is what I just want.