473,738 Members | 10,643 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unexpected behavior using ConstructionEna bled attribute

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

<Transaction(Tr ansactionOption .RequiresNew), _
ConstructionEna bled([Default]:="Data
Source=mymacine name\NetSDK;Int egrated Security=SSPI; Initial
Catalog=mydatab ase"), _
JustInTimeActiv ation(True)> _
Public Class MyServicedCompo nent
Inherits ServicedCompone nt

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=localhos t\NetSDK;Integr ated Security=SSPI; Initial
Catalog=mydatab ase". What is causing this replacement
(mymachinename->localhost) within the connection string?

Thanks
Jul 21 '05 #1
1 1723
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 ConstructionEna bled attribute to pass in a SQL connection
string.

<Transaction(Tr ansactionOption .RequiresNew), _
ConstructionEna bled([Default]:="Data
Source=mymacine name\NetSDK;Int egrated Security=SSPI; Initial
Catalog=mydatab ase"), _
JustInTimeActiv ation(True)> _
Public Class MyServicedCompo nent
Inherits ServicedCompone nt

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=localhos t\NetSDK;Integr ated Security=SSPI; Initial
Catalog=mydatab ase". 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
1907
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 default keyword argument values
4
5984
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 processing attribute -- System.ArgumentException: Invalid directory on URL." (If I do not compile with the unsafe flag compiler setting all compiles perfect) After long tracing, I ended up discovering that it is csc.exe installed by the .NET...
2
2168
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 virtual method calls. To further complicate (or perhaps simplify) matters, some compilers (GCC and MingW) produce the expected behaviour, while others (MSVS 7.1) do not. I can only offer two explanations for my observations: 1. The Microsoft...
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 Security=SSPI; Initial Catalog=mydatabase"), _ JustInTimeActivation(True)> _ Public Class MyServicedComponent Inherits ServicedComponent
6
6001
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 assign a value to them. I wanted to trap for this exception in a subclass using super but it doesn't happen. I have read Guido's tutorial on new style classes and Shalabh's tuturial on new style attributes and methods, and thought I understood...
4
1626
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 constructor, and I expected this code to tell me that the custom copy constructor had been called twice. Instead, it's only called once and the program executes correctly. Is this an optimization related to my compiler (g++ v4.0.1) or is this...
15
7575
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" between the three frames is blue, 4 or 5 pixels wide, and -- most importantly! -- draggable! It is great -- in IE, that is. Is it possible to have this same look and behavior in Firefox?
2
2069
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
3661
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 code is below: ---- from Tkinter import * root = Tk()
0
8788
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9476
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9208
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6751
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4825
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3279
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 we have to send another system
2
2745
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.