473,788 Members | 2,898 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

adding clientname and date,time in a dataset from a c# application

Hello..

I have a problem in a c# application.

I have a dataset that have a table cald tblcounter in this table I have 2
columns

Computer_name and datetime.

In the computer_name I want to store the clientnamn and in datetime I want
to store the date and time the clientnamn was enter in the table

This is the C# code I am using.

DataRow anyRow = tblcounter.NewR ow();

anyRow["processor"] = perf_processor_ time.NextValue( );

anyRow["memory_fri "] = perf_memory_fri .NextValue();

// the code to add clientnamn and date,time
tblcounter.Rows .Add(anyRow);

Lennie

Phonera IT-dep
Nov 15 '05 #1
3 1425
Hi Lennie,

WindowsIdentity .GetCurrent().N ame

perhaps?
--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"Lennie" <de*@phonera.se > wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
Hello..

I have a problem in a c# application.

I have a dataset that have a table cald tblcounter in this table I have 2
columns

Computer_name and datetime.

In the computer_name I want to store the clientnamn and in datetime I want
to store the date and time the clientnamn was enter in the table

This is the C# code I am using.

DataRow anyRow = tblcounter.NewR ow();

anyRow["processor"] = perf_processor_ time.NextValue( );

anyRow["memory_fri "] = perf_memory_fri .NextValue();

// the code to add clientnamn and date,time
tblcounter.Rows .Add(anyRow);

Lennie

Phonera IT-dep

Nov 15 '05 #2
WindowsIdentity ??
i dont have the command.
whits using do i hafto import to me application.
"Miha Markic" <miha at rthand com> wrote in message
news:uZ******** ******@TK2MSFTN GP12.phx.gbl...
Hi Lennie,

WindowsIdentity .GetCurrent().N ame

perhaps?
--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"Lennie" <de*@phonera.se > wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
Hello..

I have a problem in a c# application.

I have a dataset that have a table cald tblcounter in this table I have 2 columns

Computer_name and datetime.

In the computer_name I want to store the clientnamn and in datetime I want to store the date and time the clientnamn was enter in the table

This is the C# code I am using.

DataRow anyRow = tblcounter.NewR ow();

anyRow["processor"] = perf_processor_ time.NextValue( );

anyRow["memory_fri "] = perf_memory_fri .NextValue();

// the code to add clientnamn and date,time
tblcounter.Rows .Add(anyRow);

Lennie

Phonera IT-dep


Nov 15 '05 #3
Hi,

WindowsIdentiti y is defined in
System.Security .Principal

namespace.
--
Miha Markic - DXSquad/RightHand .NET consulting & software development
miha at rthand com

"Lennie" <de*@phonera.se > wrote in message
news:eh******** ******@tk2msftn gp13.phx.gbl...
WindowsIdentity ??
i dont have the command.
whits using do i hafto import to me application.
"Miha Markic" <miha at rthand com> wrote in message
news:uZ******** ******@TK2MSFTN GP12.phx.gbl...
Hi Lennie,

WindowsIdentity .GetCurrent().N ame

perhaps?
--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"Lennie" <de*@phonera.se > wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
Hello..

I have a problem in a c# application.

I have a dataset that have a table cald tblcounter in this table I
have
2 columns

Computer_name and datetime.

In the computer_name I want to store the clientnamn and in datetime I want to store the date and time the clientnamn was enter in the table

This is the C# code I am using.

DataRow anyRow = tblcounter.NewR ow();

anyRow["processor"] = perf_processor_ time.NextValue( );

anyRow["memory_fri "] = perf_memory_fri .NextValue();

// the code to add clientnamn and date,time
tblcounter.Rows .Add(anyRow);

Lennie

Phonera IT-dep



Nov 15 '05 #4

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

Similar topics

4
350
by: Robert Scarborough | last post by:
I have a Table in a Typed Dataset which contains a Date field called EventDate. I've ensured that the field is defined as Date as opposed to DateTime in the Typed Dataset. When I generate an xml file from an instance of this typed dataset using the ds.WriteXml method, all the dates come out formatted as follows: <EventDate>2004-01-26T00:00:00.0000000-05:00</EventDate>
2
369
by: Vishal Somaiya | last post by:
Hello I am trying read from a xml file, pull the values in a object and then add the object to an ArrayList. I am using a 'while' loop to move through each node in the xml file and pulling the required values as needed and setting them to the relevant property within my object. The reading of the xml file works as it should. I get a problem when I try to add the object that I created to the arraylist. It seems to be adding each one,...
3
4885
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that the best method? Do you have a sample of how to do this?
2
2042
by: dSchwartz | last post by:
I need help adding a column to a dataset, but its a little bit more complicated then just that. Here's the situation: I have many xml files in one directory, each which represent a newsletter. I want to create a page that will display a title and date of each newsletter, along with a link to it. here's a code snip: ============================= DirectoryInfo dirInfo = new DirectoryInfo(Server.MapPath("/newsletters/xml/"));
9
1976
by: Shapper | last post by:
Hello, I created a dataset from a XML file. One of the dataset fields is . In an ASP:Repeater I am displaying the field. <%# DataBinder.Eval(Container.DataItem, "pubDate", "{0:f}") %> The date displayed has the following format, the same as in the XML file:
4
1781
by: paul | last post by:
Hi, Im trying to add a dataset to the app_code directory using vs2005 \ SQL2005 beta 2. When I run through the wizard I select the option to auto create new Stored Procedures (Select, update, delete, insert commands) after already specifying a very basic select command that consists of two fields. All procedures are created fine and i'm able to save the xsd file. Then I create a new gridview in which i use the xsd file object as my
1
1415
by: Marco Roberto | last post by:
Hi, is there anyway to add itens into a combobox after this control be bound with a dataset? Regards, Marco
4
2848
by: Dinsdale | last post by:
I'm looking at adding scheduling features to an application and I wanted to ask the community about any experience with scheduling components, either open source like from code project or from a vendor. I'd like to be able to create schedules and lock resources for things like collision detection (two events trying to use the same resource). I've seen some GANTT charting components but I don't think that's what I'm looking for. I'd...
1
4909
by: swethak | last post by:
Hi, I am desiging the calendar application for that purpose i used the below code. But it is for only displys calendar. And also i want to add the events to calendar. In that code displys the events when click on that date that perticular event displyed in a text box.But my requirement is to when click on that date that related event displyed in same td row not the text box. and also i add the events to that calendar.plz advice how to...
0
9656
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10364
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10110
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9967
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8993
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—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4069
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.