472,338 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

how to get client workstation name

Hello,

i have a problem determining the workstation name of the client user.
i try to do a

SELECT CURRENT CLIENT_WRKSTNNAME .....

but i get an empty string.

I read the manual (SQL Reference 1)...and it says that i must use the
API sqleseti to
set the CLIENT_WRKSTNNAME variable...

But...how can i do that from SQL ?
It's possible to call sqleseti from command line?
or i must write a C function?

Dec 6 '06 #1
3 3570
alessandro menchini wrote:
Hello,

i have a problem determining the workstation name of the client user.
i try to do a

SELECT CURRENT CLIENT_WRKSTNNAME .....

but i get an empty string.

I read the manual (SQL Reference 1)...and it says that i must use the
API sqleseti to
set the CLIENT_WRKSTNNAME variable...

But...how can i do that from SQL ?
It's possible to call sqleseti from command line?
or i must write a C function?
Use VALUES like this: VALUES CLIENT WRKSTNNAME

By default it is blank. It must be set by that API call.

B.

Dec 6 '06 #2
Brian Tkatch wrote:
alessandro menchini wrote:
>Hello,

i have a problem determining the workstation name of the client user.
i try to do a

SELECT CURRENT CLIENT_WRKSTNNAME .....

but i get an empty string.

I read the manual (SQL Reference 1)...and it says that i must use the
API sqleseti to
set the CLIENT_WRKSTNNAME variable...

But...how can i do that from SQL ?
It's possible to call sqleseti from command line?
or i must write a C function?

Use VALUES like this: VALUES CLIENT WRKSTNNAME

By default it is blank. It must be set by that API call.
I believe that's sqleseti()

Alternatively, you could use the application id (from function
APPLICATION_ID()), parse the IP address encoded therein and then do an
nslookup (C function gethostbyname()). This is also described here:
http://tinyurl.com/9sjqh

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Dec 6 '06 #3

I have found (searching this newsgroup) a solution using
APPLICATION_ID()...

The sql query is...

SELECT * FROM TABLE(SNAPSHOT_APPL_INFO('DBNAME',-1))
AS SNAPSHOT_APPL_INFO
WHERE APPL_ID = application_id();

Thank you to all
A.M.

Dec 6 '06 #4

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

Similar topics

3
by: Bob Harrison | last post by:
I will be distributing an application that works with our security panel. The application can be loaded on several workstations in a network but...
4
by: Prince Kumar | last post by:
I joined a company recently and they have a java program which hangs (does nothing) after a while. This is no way consistent. It could succeed...
4
by: Matt Frame | last post by:
I am working on a special ASP.Net application that receives files from customers. The connection is made via HTTPS and the client sends the file...
1
by: Carl Jones via .NET 247 | last post by:
(Type your message here) I'm trying to run a client-side script from a web page. It's a VB script that gets information (computer name, software...
2
by: Rich | last post by:
Hello, I have a winform app that end users in my company use for various operations - mainly searching stuff. It is a VB2005 app. People enter...
11
by: Max Vit | last post by:
I have deployed few Access apps splitting it in Front End and Back End. Our environment uses Win XP SP2 for clients, Win 2k3 for servers and Access...
4
by: peteh | last post by:
Hi All; On a DB2 v9.1 (DPF) - RH Linux server, we have a local userid EXECMSTR that has dbadm privileges and executes all batch processing to load...
0
by: 85ssp | last post by:
I am creating a small server client program that is meant for up to 70 connections from 70 different computers on a network. Everything in the...
0
by: khurramlone | last post by:
I am trying to generate a client proxy from a WCF service library. I am using VS2005, .NET 3.0 on a Windows XP Pro workstation. The WCF service is...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

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.