473,395 Members | 1,999 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 1700
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
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
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
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
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
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
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
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
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
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.