473,385 Members | 1,766 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,385 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 1698
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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
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...

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.