473,480 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Unexpected behavior using ConstructionEnabled attribute

I am using the ConstructionEnabled attribute to pass in a SQL connection
string.

<Transaction(TransactionOption.RequiresNew), _
ConstructionEnabled([Default]:="Data
Source=mymacinename\NetSDK;Integrated Security=SSPI; Initial
Catalog=mydatabase"), _
JustInTimeActivation(True)> _
Public Class MyServicedComponent
Inherits ServicedComponent

Private myConnectString As String

Protected Overrides Sub Construct(ByVal constructString As String)
myConnectString = constructString
'otherstuff follows
End Sub

My tracelog shows that constructString contains the string "Data
Source=localhost\NetSDK;Integrated Security=SSPI; Initial
Catalog=mydatabase". What is causing this replacement
(mymachinename->localhost) within the connection string?

Thanks
Jul 21 '05 #1
1 1702
SORRY for the repost. I received an error with my first attempt and didn't
think it was sent.

"Steve R" wrote:
I am using the ConstructionEnabled attribute to pass in a SQL connection
string.

<Transaction(TransactionOption.RequiresNew), _
ConstructionEnabled([Default]:="Data
Source=mymacinename\NetSDK;Integrated Security=SSPI; Initial
Catalog=mydatabase"), _
JustInTimeActivation(True)> _
Public Class MyServicedComponent
Inherits ServicedComponent

Private myConnectString As String

Protected Overrides Sub Construct(ByVal constructString As String)
myConnectString = constructString
'otherstuff follows
End Sub

My tracelog shows that constructString contains the string "Data
Source=localhost\NetSDK;Integrated Security=SSPI; Initial
Catalog=mydatabase". What is causing this replacement
(mymachinename->localhost) within the connection string?

Thanks

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
1866
by: Simon Wittber | last post by:
For the first time, I have been bitten by Python. The below code produces the results: False True when I initially expected the results: False False It took me a while to work out that...
4
5938
by: | last post by:
Some time ago I installed VC# 2003, made a small generic project, compile with the allow unsafe flag and I get the error below: "error CS1577: Assembly generation failed -- Unexpected exception...
2
2152
by: Gerhard Esterhuizen | last post by:
Hi, I am observing unexpected behaviour, in the form of a corrupted class member access, from a simple C++ program that accesses an attribute declared in a virtual base class via a chain of...
1
303
by: Steve R | last post by:
I am using the ConstructionEnabled attribute to pass in a SQL connection string. <Transaction(TransactionOption.RequiresNew), _ ConstructionEnabled(:="Data Source=mymacinename\NetSDK;Integrated...
6
5939
by: Samuel M. Smith | last post by:
I have been playing around with a subclass of dict wrt a recipe for setting dict items using attribute syntax. The dict class has some read only attributes that generate an exception if I try to...
4
1595
by: duffdevice | last post by:
Hi, I came across this unexpected behavior while working on something else. I am attempting to return a custom type by value from a global function. I have a trace in the custom class's copy...
15
7539
by: Giggle Girl | last post by:
Hello there, :) I need a frameset that will have the same look and behavior in Firefox 1.5+ as it does in IE 6+. Here is a URL for it: http://66.51.164.93/fs/default.htm In IE, the "seam"...
2
2057
by: Dimitri Furman | last post by:
SQL Server 2000 SP4. Running the script below prints 'Unexpected': ----------------------------- DECLARE @String AS varchar(1) SELECT @String = 'z' IF @String LIKE ''
1
3647
by: Kevin Walzer | last post by:
I'm trying to toggle the visibility of a Tkinter widget using pack_forget(), and I'm running into unexpected behavior. The widget "hides" correctly, but does not become visible again. My sample...
0
7041
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6737
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5336
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4481
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2995
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2984
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.