473,396 Members | 1,768 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,396 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 3197
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知 trying to learn how to connect to an SQL Server database (I知 using the AdventureWorks sample database), but I知 having problems. Here痴 the code I知 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
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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用lanning, 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.