473,322 Members | 1,494 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,322 software developers and data experts.

access rights problems

121 100+
I have adeveloped a time sheet project where each employee time sheet is maintained.Now since i want to use in network when i login to the system with a name for eg Smitha.i want have accessonly to all records by smitha.my project is in vb and ms access please help me
Feb 12 '08 #1
7 1081
jamesd0142
469 256MB
I have adeveloped a time sheet project where each employee time sheet is maintained.Now since i want to use in network when i login to the system with a name for eg Smitha.i want have accessonly to all records by smitha.my project is in vb and ms access please help me


suppose you could detect the user profile name, and create a sql statement according to that...
Feb 12 '08 #2
debasisdas
8,127 Expert 4TB
You are storing user names in database tables ?
Feb 12 '08 #3
charvi
121 100+
You are storing user names in database tables ?
how do i get user names when i login to computer please can u explain in detail
Feb 13 '08 #4
debasisdas
8,127 Expert 4TB
From where you get the employee name ?

Is it stored in database table ?
Feb 13 '08 #5
charvi
121 100+
From where you get the employee name ?

Is it stored in database table ?
It is maintained in the server.i dont know exactly where the name is stord this name is the login name when we login to the system
Feb 13 '08 #6
jamesd0142
469 256MB
In vb.net you can retrieve the username like this:

Expand|Select|Wrap|Line Numbers
  1. Declare Function GetUserName Lib "advapi32.dll" Alias _
  2.   "GetUserNameA" (ByVal lpBuffer As String, _
  3.   ByRef nSize As Integer) As Integer
  4.  
  5.     Public Function GetUserName() As String
  6.         Dim iReturn As Integer
  7.         Dim userName As String
  8.         userName = New String(CChar(" "), 50)
  9.         iReturn = GetUserName(userName, 50)
  10.         GetUserName = userName.Substring(0, userName.IndexOf(Chr(0)))
  11.     End Function
  12.  
Feb 13 '08 #7
charvi
121 100+
In vb.net you can retrieve the username like this:

Expand|Select|Wrap|Line Numbers
  1. Declare Function GetUserName Lib "advapi32.dll" Alias _
  2.   "GetUserNameA" (ByVal lpBuffer As String, _
  3.   ByRef nSize As Integer) As Integer
  4.  
  5.     Public Function GetUserName() As String
  6.         Dim iReturn As Integer
  7.         Dim userName As String
  8.         userName = New String(CChar(" "), 50)
  9.         iReturn = GetUserName(userName, 50)
  10.         GetUserName = userName.Substring(0, userName.IndexOf(Chr(0)))
  11.     End Function
  12.  
how can i retreive user name in vb6
Feb 13 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Roland Johann | last post by:
On my Windows Server 2003 Web Edition I have installed an application which offers some OLE Automation Objects. On my local system (W2k Prof) it works fine but on my server 2003 I have a big...
0
by: Steve | last post by:
Greetings, I'm having problems with the use of an Access 2003 Add-In on Windows XP Pro. Administrative-level users have no problems running the Add-In, but those users with restricted rights on...
1
by: Jesper | last post by:
Im running Windows Server 2003 trying to get my ASP.NET applications to access the file system. My Web application needs to have write access to some folders in the virtual directory from which...
0
by: ASP.Confused | last post by:
The old message looked a little stale, so I am re-posting it here. Anybody have any ideas of what I could do?!? The previous responses to this question are below. If you want to look at the...
12
by: Ron Weldy | last post by:
I have a test server runinng 2003/IIS 6 with a mixture of asp and asp.net files. On my workstation I have a share set up to the folder where the web files reside. I am just doing quick and dirty...
3
by: Doug Bailey | last post by:
I am trying to control a Windows Service via a Web Service interface. (I am developing in .NET2003) I am using the ServiceController object which allows me to read the state of the services with...
17
by: DaveG | last post by:
Hi all I am planning on writing a stock and accounts program for the family business, I understand this is likely to take close to 2 years to accomplish. The stock is likely to run into over a...
0
by: Carlos Lozano | last post by:
Hi, I will appreciate any insights to set the right permissions to a Windows Forms Control that is embedded in an html document. The control will be downloaded by the html doc to the local...
5
by: samadams_2006 | last post by:
I'm having a problem in accessing a Microsoft Access Database in a VB.NET Web Application. It's so straight forward, I thought I'd walk you through all the details here: 1) I have a .NET Web...
7
by: Ashutosh Bhawasinka | last post by:
Hi, I have a C# .Net application which needs to use some feature which can be only developed in Visual C++ (its extended MAPI). The C# exe will be supplied to users without a setup. What kind...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.