Showing posts with label named. Show all posts
Showing posts with label named. Show all posts

Friday, March 30, 2012

help in crystal report & dataset

I'm the new beginer in C#,I have some problem in doing crystal report:
In my application I have 2 form named Form1 and Form2.
I create one dataset named ds in Form1 and in Form2 I want to creat a crystal report that displays the data in the dataset ds in Form1.
I relly get stuck.Can anyone help me?
Thanx b4 hand!See if you find answer here
www.asp.net
http://support.businessobjects.com/sql

Wednesday, March 28, 2012

Help for Trigger

Hello

I would like to get the content of a field based in the field Name.
Suppose a table with a field Named 'LastName' for wich there is a trigger
after update
I store the field name in a local variable

Set @.ColName = 'LastName'

How can I retrieve the value of the @.ColName from the inserted table using
the @.Colname variable ?

I tried this:

Set @.Cmd = 'DECLARE @.DataValue varchar(100) Set @.DataValue = (Select i.' +
@.ColName + ' from inserted i) print @.DataValue'
exec (@.Cmd)

print @.Cmd gives

DECLARE @.DataValue varchar(100) Set @.DataValue = (Select i.LastName from
inserted i) print @.DataValue

But I got the following error

Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'inserted'.

Any idea why ?

Thanks for your help

ThierryOn Fri, 23 Apr 2004 20:57:10 +0200, Thierry Marneffe wrote:

>Hello
>I would like to get the content of a field based in the field Name.
>Suppose a table with a field Named 'LastName' for wich there is a trigger
>after update
>I store the field name in a local variable
>Set @.ColName = 'LastName'
>How can I retrieve the value of the @.ColName from the inserted table using
>the @.Colname variable ?
>I tried this:
>Set @.Cmd = 'DECLARE @.DataValue varchar(100) Set @.DataValue = (Select i.' +
>@.ColName + ' from inserted i) print @.DataValue'
>exec (@.Cmd)
>print @.Cmd gives
>DECLARE @.DataValue varchar(100) Set @.DataValue = (Select i.LastName from
>inserted i) print @.DataValue
>But I got the following error
>Server: Msg 208, Level 16, State 1, Line 1
>Invalid object name 'inserted'.
>Any idea why ?
>Thanks for your help
>Thierry

Hi Thierry,

The inserted and deleted pseudo-tables can only be used in the
trigger. Invoking dynamic SQL creates a new environment, so you can't
use the inserted and deleted tables there.

If you don't use dynamic SQL, all will be swell:

CREATE TRIGGER TestIt
ON MyTable AFTER UPDATE
AS
DECLARE @.DataValue varchar(100)
SET @.DataValue =
(SELECT LastName
FROM inserted)
PRINT @.DataValue
go

Of course, this trigger will still result in an error if you perform
an update that affects more than one row - always remember that a
trigger is fired exactly once for each update statement, regardless of
the number of rows that match the search criteria (can be anything
from 0 up to the complete table) and regardless of whether the data
was actually chaged or not (ie UPDATE MyTable SET MyColumn = MyColumn
will fire the trigger and will have the complete table in the inserted
ande deleted pseudo-tables).

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)

Friday, February 24, 2012

Help

Hi
I am using Visual studio 2005 to write a web service. I am not able to
connect to database. I get the usual Named pipes provider error:could
not open a connection to the server. So I read up some material and
found out that I have to start the sqlbrowser service(using surface
area configuration manager) and create exceptions for the firewall for
the sqlexpress and sqlbrowser. I did all the things, still I get the
same error. However , when I add the datasource from the datasource
configuration wizard and test the connection, the test was succesfull.
Thanks in advance for the helpIt's best not to hijack a thread with a new topic -there is no certainty
anyone will see your post since they may think that the thread is complete.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"sunil" <sairaj.sunil@.gmail.com> wrote in message
news:1154953948.775714.18740@.p79g2000cwp.googlegroups.com...
> Hi
> I am using Visual studio 2005 to write a web service. I am not able to
> connect to database. I get the usual Named pipes provider error:could
> not open a connection to the server. So I read up some material and
> found out that I have to start the sqlbrowser service(using surface
> area configuration manager) and create exceptions for the firewall for
> the sqlexpress and sqlbrowser. I did all the things, still I get the
> same error. However , when I add the datasource from the datasource
> configuration wizard and test the connection, the test was succesfull.
> Thanks in advance for the help
>|||This may not actually be a case of hijacking. It may just be a case of using
a totally meaningless subject that the newsreader assumes is part of the
same thread with the same less-than-useful subject.
HTH
Kalen Delaney, SQL Server MVP
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:uKT6kAmuGHA.4748@.TK2MSFTNGP03.phx.gbl...
> It's best not to hijack a thread with a new topic -there is no certainty
> anyone will see your post since they may think that the thread is
> complete.
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
> "sunil" <sairaj.sunil@.gmail.com> wrote in message
> news:1154953948.775714.18740@.p79g2000cwp.googlegroups.com...
>

Sunday, February 19, 2012

HELP

I have created one database named test on DServ Server and in that database
I have created three fileGroup named Primary, BaseFileGroup,
TransactionFilegroup and after that I took the backup of that all filegroup
and restore it into another server. (OServ). After a week I took only the
backup of TransactionFileGroup from DServ and want to restore it on Oserv
server but Failed to do that. can any body tell me that is it possible that
I only restore
specific filegroup rather to restore all the filegroup ?
Thanks
Noor
What error message do you get?
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

Help

Hi
I am using Visual studio 2005 to write a web service. I am not able to
connect to database. I get the usual Named pipes provider error:could
not open a connection to the server. So I read up some material and
found out that I have to start the sqlbrowser service(using surface
area configuration manager) and create exceptions for the firewall for
the sqlexpress and sqlbrowser. I did all the things, still I get the
same error. However , when I add the datasource from the datasource
configuration wizard and test the connection, the test was succesfull.
Thanks in advance for the helpIt's best not to hijack a thread with a new topic -there is no certainty
anyone will see your post since they may think that the thread is complete.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"sunil" <sairaj.sunil@.gmail.com> wrote in message
news:1154953948.775714.18740@.p79g2000cwp.googlegroups.com...
> Hi
> I am using Visual studio 2005 to write a web service. I am not able to
> connect to database. I get the usual Named pipes provider error:could
> not open a connection to the server. So I read up some material and
> found out that I have to start the sqlbrowser service(using surface
> area configuration manager) and create exceptions for the firewall for
> the sqlexpress and sqlbrowser. I did all the things, still I get the
> same error. However , when I add the datasource from the datasource
> configuration wizard and test the connection, the test was succesfull.
> Thanks in advance for the help
>|||This may not actually be a case of hijacking. It may just be a case of using
a totally meaningless subject that the newsreader assumes is part of the
same thread with the same less-than-useful subject.
--
HTH
Kalen Delaney, SQL Server MVP
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:uKT6kAmuGHA.4748@.TK2MSFTNGP03.phx.gbl...
> It's best not to hijack a thread with a new topic -there is no certainty
> anyone will see your post since they may think that the thread is
> complete.
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
> "sunil" <sairaj.sunil@.gmail.com> wrote in message
> news:1154953948.775714.18740@.p79g2000cwp.googlegroups.com...
>> Hi
>> I am using Visual studio 2005 to write a web service. I am not able to
>> connect to database. I get the usual Named pipes provider error:could
>> not open a connection to the server. So I read up some material and
>> found out that I have to start the sqlbrowser service(using surface
>> area configuration manager) and create exceptions for the firewall for
>> the sqlexpress and sqlbrowser. I did all the things, still I get the
>> same error. However , when I add the datasource from the datasource
>> configuration wizard and test the connection, the test was succesfull.
>> Thanks in advance for the help
>