473,398 Members | 2,389 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,398 software developers and data experts.

SQL Connection Program Name

Is there a way to set the program name for a connection so that it is a bit
more descriptive than ".Net SqlClient Data Provider"?

Thanks,
Charles
Nov 21 '05 #1
4 3198
Declare a variable to be of that type?

I'm not quite clear on what you are asking here.

--
Gerry O'Brien [MVP]
Visual Basic .NET(VB.NET)


"Charles Collins" <cj********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Is there a way to set the program name for a connection so that it is a
bit more descriptive than ".Net SqlClient Data Provider"?

Thanks,
Charles

Nov 21 '05 #2
In your connection string add an "Application Name".

Like so:

<add key="ConnectionString"
value="server=MyServer;Trusted_Connection=true;dat abase=MyDB;Application
Name=MyApp"/>

It will show up in SQL Profiler as "MyApp". Great way to filter in
Profiler.

HTH,
Greg

"Charles Collins" <cj********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Is there a way to set the program name for a connection so that it is a
bit more descriptive than ".Net SqlClient Data Provider"?

Thanks,
Charles

Nov 21 '05 #3
I think he means the 'application name' that is reported to SQL. Like if you
run "sp_who2" in SQL Query Analyzer, the column for ProgramName.

"Gerry O'Brien [MVP]" <gerry dot obrien at gmail dot com> wrote in message
news:ub**************@tk2msftngp13.phx.gbl...
Declare a variable to be of that type?

I'm not quite clear on what you are asking here.

--
Gerry O'Brien [MVP]
Visual Basic .NET(VB.NET)


"Charles Collins" <cj********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Is there a way to set the program name for a connection so that it is a
bit more descriptive than ".Net SqlClient Data Provider"?

Thanks,
Charles


Nov 21 '05 #4
That's it, thanks.
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:uc**************@TK2MSFTNGP10.phx.gbl...
In your connection string add an "Application Name".

Like so:

<add key="ConnectionString"
value="server=MyServer;Trusted_Connection=true;dat abase=MyDB;Application
Name=MyApp"/>

It will show up in SQL Profiler as "MyApp". Great way to filter in
Profiler.

HTH,
Greg

"Charles Collins" <cj********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Is there a way to set the program name for a connection so that it is a
bit more descriptive than ".Net SqlClient Data Provider"?

Thanks,
Charles


Nov 21 '05 #5

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

Similar topics

1
by: mdurliSPAMFILTER | last post by:
Hello, I developed a win32 .exe CGI that connects to a clustered SQLServer to report some data. The software is written with Borland C++Builder. This is the oledb string:...
5
by: Alec | last post by:
Hi All, I am currently trying to link in Access 97 to a table in a MSSQL 7 server. Initially the link is fine, however, when I close the access database and re-open it from the same network...
0
by: Michael | last post by:
I made a server and a client program. The server program creates a socket on the local computer and waits for a connetion. The client program sould connect to the server and send an information to...
26
by: Rajeev Tipnis | last post by:
http://support.microsoft.com/default.aspx?scid=kb;en- us;819450 Questions: 1) Is this patch (fix) applicable to the .NET 1.1 Framework as well? That is, if we have Framework 1.1 (On...
9
by: Full Name | last post by:
Hi, I am a novice programmer. I am trying to write a server-client program as a personal project. I have googled my ass off but I can't seem to find usefull information about this. Can anyone...
3
by: Sankalp | last post by:
Currently I am developing a advanced VB 2005 application which Display's/ Updates / (Creates New ) data in the database. For this purpose I am using databound controls, i.e. all my datagrids,...
1
by: Manish | last post by:
Hi i have a problem where as i want to use two different C# net program in a single system where i have used 2 different sql server name. when i execute those program each time iam renaming the...
0
by: Xionbox | last post by:
Hello everybody, The error I have seems very easy to solve, but for some odd reason I can't seem to solve it. Anyways, here's my "setup". I created a server running on localhost:1200 (telnet...
1
by: BobLewiston | last post by:
I’m trying to learn how to connect to an SQL Server database (I’m using the AdventureWorks sample database), but I’m having problems. Here’s the code I’m using: // define connection string for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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...
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...

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.