Showing posts with label defined. Show all posts
Showing posts with label defined. Show all posts

Sunday, March 25, 2012

Can not debug component?

Who can help me?

I defined project properties:

Start action--start external program : dtexec

Action options--command line arguments: /f ***.dtsx (using component which i debug)

Configuration: active(debug)

I specified breakpoint

after clicking build,dtexec can popup but then generate error:

The following modle was built either with optimizations enabled or without debug information

C:\winnt\assembly\GAC_MSIL\***\***.dll

To debug this module,change it's project configuration to debug mode.

I have no idea about this,and i can find my dll file in C:\winnt\assembly,but no GAC_MSIL folder

Who can help me? Thanks in advance

Sounds like your project is set to produce a release build. You should change the configuration to be a debug build. The assembly folder is a real folder, with sub-folders like GAC_MSIL, but they are obscured by the "Viewer" trhat you see. This can be disabled, but I don't think that is necessary. I assume the DLL it refers to is one of yours, and that is what needs to be a debug build.

|||

I'm sure it's debug option

Any other possible ? Thanks

|||

Hi Andrew,

i got the same error message as well.

did you find a resolution to this.?

i've cheked everything,

it's set to debug mode, bin folders are cheked, and all look fine.

|||not yet,so frastrating|||

is it version thing?

mine is RTM 9.00.1399.00,develop edition

whatever i will download sp1

|||

Can you load the Debug->Windows->Modules window and see from what location is your dll loaded?

Then make sure that the dll at that location is the debug one.

Hope this helps,
Ovidiu

sql

Can not debug component?

Who can help me?

I defined project properties:

Start action--start external program : dtexec

Action options--command line arguments: /f ***.dtsx (using component which i debug)

Configuration: active(debug)

I specified breakpoint

after clicking build,dtexec can popup but then generate error:

The following modle was built either with optimizations enabled or without debug information

C:\winnt\assembly\GAC_MSIL\***\***.dll

To debug this module,change it's project configuration to debug mode.

I have no idea about this,and i can find my dll file in C:\winnt\assembly,but no GAC_MSIL folder

Who can help me? Thanks in advance

Sounds like your project is set to produce a release build. You should change the configuration to be a debug build. The assembly folder is a real folder, with sub-folders like GAC_MSIL, but they are obscured by the "Viewer" trhat you see. This can be disabled, but I don't think that is necessary. I assume the DLL it refers to is one of yours, and that is what needs to be a debug build.

|||

I'm sure it's debug option

Any other possible ? Thanks

|||

Hi Andrew,

i got the same error message as well.

did you find a resolution to this.?

i've cheked everything,

it's set to debug mode, bin folders are cheked, and all look fine.

|||not yet,so frastrating|||

is it version thing?

mine is RTM 9.00.1399.00,develop edition

whatever i will download sp1

|||

Can you load the Debug->Windows->Modules window and see from what location is your dll loaded?

Then make sure that the dll at that location is the debug one.

Hope this helps,
Ovidiu

Thursday, March 22, 2012

Can not connect to distributor because distributor_admin is not defined as remote login

Hello everyone,
We set up replication yesterday and it runs beautifully ... once. After
the first replication, we get the following error whenever we try to
access any of the replication admin screens, with the exception of the
"disable replication" screen:
Error 18483: Could not connect to server XXXX because
'distributor_admin' is not defined as a remote login at the server.
Our setup consists of two SQL Server machines, a primary server which
acts as a publisher and a secondary which acts as both distributor and
subscriber. Replication setup works great, as does the initial snapshot
copy. The transaction agent works perfectly as well.
The error goes away if I disable publishing on both machines and set it
up again, but then it breaks as soon as I complete the initial
replication.
Any help? This has everyone here stumped.
Thanks!!
Sorry - posted this to the wrong group. Please ignore.
rich@.adgooroo.com wrote:
> Hello everyone,
> We set up replication yesterday and it runs beautifully ... once. After
> the first replication, we get the following error whenever we try to
> access any of the replication admin screens, with the exception of the
> "disable replication" screen:
> Error 18483: Could not connect to server XXXX because
> 'distributor_admin' is not defined as a remote login at the server.
> Our setup consists of two SQL Server machines, a primary server which
> acts as a publisher and a secondary which acts as both distributor and
> subscriber. Replication setup works great, as does the initial snapshot
> copy. The transaction agent works perfectly as well.
> The error goes away if I disable publishing on both machines and set it
> up again, but then it breaks as soon as I complete the initial
> replication.
> Any help? This has everyone here stumped.
> Thanks!!

Tuesday, March 20, 2012

Can not call SET ROWCOUNT in a UDF

When I call SET ROWCOUNT <number> inside a User Defined Function I get the
following error:
Error 443: Invalid use of 'UNKNOWN TOKEN' within a function.
I couldn't find anything about this error in the BOL.
Any solution ?
TIA
Boaz Ben-Porat
Milestone systems
DebmarkUse the SET directive before calling the function?
SET NOCOUNT ON
SELECT * FROM dbo.function()
?
"Boaz Ben-Porat" <bbp@.milestone.dk> wrote in message
news:O2BhOfTFGHA.3200@.tk2msftngp13.phx.gbl...
> When I call SET ROWCOUNT <number> inside a User Defined Function I get the
> following error:
> Error 443: Invalid use of 'UNKNOWN TOKEN' within a function.
> I couldn't find anything about this error in the BOL.
> Any solution ?
> TIA
> Boaz Ben-Porat
> Milestone systems
> Debmark
>|||Seems that SET ROWCOUNT isn't allowed in a UDF.
If you're using QA with syntax coloring, note that ROWCOUNT is not
colored as a keyword, so that would be why the 'UNKNOWN TOKEN' is being
returned.
Boaz Ben-Porat wrote:
> When I call SET ROWCOUNT <number> inside a User Defined Function I get the
> following error:
> Error 443: Invalid use of 'UNKNOWN TOKEN' within a function.
> I couldn't find anything about this error in the BOL.
> Any solution ?
> TIA
> Boaz Ben-Porat
> Milestone systems
> Debmark
>|||correction: SET <OPTION> ON is not allowed in a UDF. (set rowcount, set
nocount, etc.)
Trey Walpole wrote:
> Seems that SET ROWCOUNT isn't allowed in a UDF.
> If you're using QA with syntax coloring, note that ROWCOUNT is not
> colored as a keyword, so that would be why the 'UNKNOWN TOKEN' is being
> returned.
> Boaz Ben-Porat wrote:
>|||Hello, Boaz
You cannot use SET ROWCOUNT in a UDF, because a function cannot contain
statements that cause side-effects. If you wish to use a constant for
SET ROWCOUNT, you can use the "TOP n" clause, instead. If you want to
use a variable (or a parameter) you can use the "TOP (n)" clause in SQL
Server 2005 (but I understand that you use SQL Server 2000). If you
cannot upgrade to SQL Server 2005, it may be possible to use a
subquery, but it will be slower (you should consider using a stored
procedure instead of a function).
Razvan

Saturday, February 25, 2012

Can I use a UDF in an IF statement?

Is it possible to use a user defined function in an IF statement? The UDF returns a scalar value. Like:
IF dbo.DoSomething (@.x)

The only way I can see to call a UDF is with
SELECT @.y = dbo.DoSomething (@.x)


Thank you!

YES but you have to compare its result with something or your function should return bit or integer value IF dbo.DoSomething (@.x)=1