|
ya
actually but i have to do in windows services only.
|
|
|
|
|
Narendra Reddy Vajrala wrote: actually but i have to do in windows services only
why? Says who?
|
|
|
|
|
i cant break my PL orders
|
|
|
|
|
who make him PL .
Use web service..
himanshu
|
|
|
|
|
What is a "PL" and what specifically are their/it's "orders"?
|
|
|
|
|
Project Lead, sounds like a cretin who's just been promoted into management by virtue of warming the seat for X years and is out to show his minions who's boss.
Cheers,
Vikram. Recent activities:
TV series: Friends, season 9
Books: Freakonomics, by Steven Levitt and Stephen J Dubner. Carpe Diem.
|
|
|
|
|
Ah ok, I guess we have PM's (Project Managers) but they don't get involved with how the thing is written, or Technical Lead's which do. Hence my confusion.
Anyway, he might have a valid reason for wanting to send all database communication through a windows service (ie, single point of caching) but he's obviously not been specific enough on how to communicate with this service for his more junior team members.
|
|
|
|
|
You are confusing web services and Windows services. I suggest you buy a book.
Cheers,
Vikram. Recent activities:
TV series: Friends, season 9
Books: Freakonomics, by Steven Levitt and Stephen J Dubner. Carpe Diem.
|
|
|
|
|
my code is like this in windows services class
<br />
protected override void OnStart(string[] args)<br />
{<br />
insertValues(3, "Naresh Kumar", "3658213641", "Begumpet, Hyderabad");<br />
}<br />
<br />
public void insertValues(int custId, string custName, string custPhone, string custAdd)<br />
{<br />
string insertCommand = "Insert into CUSTOMER values ( " + custId + ",'" + custName + "','" + custPhone + "','" + custAdd + "')";<br />
con.Open();<br />
cmd = new SqlCommand(insertCommand, con);<br />
cmd.ExecuteNonQuery();<br />
con.Close();<br />
}<br />
when am trying run this service from computer Mangement
is it displaying below alert
"The service on local machine started and stopped. some services stopped automatically if they have no work to do for example the performance logs and alerts service."
please help me out
|
|
|
|
|
The reason it stopped automatically is because there is no further work for the service to do once the line insertValue(...) has run.
In general, windows services' OnStart method starts a thread/timer which continues to process until interupted by a Pause or Stop command.
Whatever a "PL" is, he is an idiot, or you have misunderstood his request.
|
|
|
|
|
Hi,
I have a template in location " c:\excel_temp\template1.xls". This template is a user defined template.
I have to use this template in a browsed location. ( if user selects "d:\temp\" folder, then I have to import the template in " c:\excel_temp" to "d:\temp" folder).
I am trying this with C#. i have done somepart of it
string tempPath = @"D:\Documents and Settings\eob\Desktop\Testing";
//System.IO.Directory.CreateDirectory(@tempPath + launchName);
//check path exists
if (!System.IO.Directory.Exists(@tempPath + launchName))
{
System.IO.Directory.CreateDirectory(@tempPath + launchName);
}
System.IO.DirectoryInfo dir = new System.IO.DirectoryInfo(@tempPath + launchName);
int directoryCount = dir.GetFiles().Length;
if (directoryCount != 0)
{
FileInfo[] fileNames = dir.GetFiles(@tempPath + launchName);
}
Excel.Application excelFile = new Excel.ApplicationClass();
Now with the excelFile created above, I have to access the template and create an excel file same as the template in the above folder.
I am stuck at this point, pls guide me
Thanks
Ramm
|
|
|
|
|
Krishna Aditya wrote: I have a template in location " c:\excel_temp\template1.xls". This template is a user defined template.
I have to use this template in a browsed location. ( if user selects "d:\temp\" folder, then I have to import the template in " c:\excel_temp" to "d:\temp" folder).
for this you can use:
string source = "c:\excel_temp\template1.xls";
string Destination = "d:\temp\Temp.xls";
if (File.Exists(Destination))
{
File.Copy(source, Destination, true);
}
//refer : Word automation (Part 1)[^]
modified on Monday, June 29, 2009 7:37 AM
|
|
|
|
|
Hello Experts
I want to make my columnheader Readonly of my datagrid...
|
|
|
|
|
what do you want with columnheader readonly ?
do you mean "not clickable and not sortable" ?
|
|
|
|
|
Yes i want that it should not be clicked,because when i click header, my control goes in cell click event and executes the code in it and error arises.
|
|
|
|
|
private void dataGridView_CellClick(object sender, DataGridViewCellEventArgs e)
{
if(e.RowIndex < 0)
return;
}
|
|
|
|
|
|
rhtbhegade wrote: columnheader Readonly of my datagrid
what do you mean by readonly... Plz make your question clear so that our experts could give correct suggestions...
|
|
|
|
|
I have also same problem,i want to avoid click on header.then whats procedure?
|
|
|
|
|
if i am correct you dont want to sort columns...
There is options for that..
You have to bind the values as BoundField and in the properties of the Grid select Columns.
In that collections you can find the Bound field which you have specified.
In that bound Field there is a option "SortMode" make that to "NotSortable"
|
|
|
|
|
One night I came up with a random idea to make an ultrasonic underwater exploration robot. This robot will use ultrasonic transducers to communicate with a laptop on the surface of a body of water. I found some test transducers which are water proof and I got a small aquarium tank to test the devices in. Now, I never worked with communications nor have done much analog to digital interface work...long story short I'm a communications newbie who needs a little push in the right direction. What I am asking for is some information or link to a place where I can learn more about how to receive digital output data from my sensor circuit using C#. The output is TTL logic (5v+) and I am not sure how to go about obtaining the data that is being outputted. So I just connect the output to the data line of a USB and open up hyper terminal? Will i receive anything? I apologize for what might be stupid questions. Any help would be greatly appreciated.
|
|
|
|
|
AFAIK, the serial port is your best bet, interfacing to an inpout.dll ( there's one on CP somewhere )
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
It may be worth having a look at how external microcontrollers (microchip, atmel etc...) interface with computers to get some pointers. There are lots of examples around. You may find the easiest way could be to connect your hardware to one of those and use that to communicate with the computer via USART/SPI or whatever.
It can be done with a USB connection but that is going to be complicated. As Christian said, a serial port connection will probably be the easiest solution.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Direct connection between the actual transducer and teh serial / USB port won't work, unless (very unlikely) it transducer has an AtoD converter and interface built in. What yours provides is a TTL level: 0V or +5V (nominal, above ~3V is allowed) TTL Levels if you need to know or are interested.[^]
What you will need to do is to connect the transducer to either an interface board or some microcontroller (try PIC) that can interface directly to serial / USB.
You can then use whatever communications protocol you need (and can implement!)
Good luch, and have fun!
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Thanks again you have all been great help...Once I'm done I will post my work on the site, if its good enough. I'm sure someone somewhere will be interested in underwater ultrasonic communications. : )
|
|
|
|