|
Uuuuh... dunno.
I use DataReaders all the time (and never TableAdapters). I also haven't done much with Web Services. And I use GUIDs as keys. So quite likely I would never run up against what you have.
You might try locking the Connection instead of the TableAdapter; just a shot in the dark.
P.S. Oh, and this may be a case where you need two Connections.
|
|
|
|
|
Thanks for your reply but I really cannot change the keys to use GUIDs and even if I could, I probably would not use them because I do not believe them to be better for our particular scenario. There are certain times where using GUIDs are advantageous but since I do not need to merge records, create keys outside the db or application, and I am not using replication or an ORM, I really do not need deal with the extra data not to mention that integer keys are faster. As far as locking the connection or needing two connections I do not believe either are necessary. Both of my code posts solve my problem there is just a difference in how many objects are created and when they are destroyed and I was wondering if there is either a better way of fixing my problem or someones opinion on which one is better and why.
Thanks for the help.
|
|
|
|
|
hi
i have 3 panels and 2 buttons.
in panel1 i have a few controls along with 2 buttons.
when i click on button2(which is inside the panel1)
only i need to show the panel2, if i click the same button2 i need to imvisible the panel2..(Here i am providing two up and down images to hide and show the panels).
by default in form_load i need only panel1 and panel3
|
|
|
|
|
|
Hi everyone,
I currently have a gridview on my .aspx webpage and i want my page to reload by itself every 5 minutes. I have added a Timer Control in order to do this. However, does anyone have any idea what is the coding that i should write in my Timer_Tick method? I need to do this in c# language.
thank you.modified on Friday, February 19, 2010 11:35 AM
|
|
|
|
|
I would say you are better off implementnig this in JavaScript or use the refresh meta tag I know the language. I've read a book. - _Madmatt
|
|
|
|
|
How do i implement the refresh meta tag?
|
|
|
|
|
Like this[^]."WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
however, instead of reloading the whole page, my goal is to just refresh the grid at a particular interval. i implemented an UpdatePanel with timer. however, i am unsure of the c# code to implement inside my Timer_Tick method.
protected void Timer1_Tick(object sender, EventArgs e)
{
}
|
|
|
|
|
Hi everyone,
Does anyone know how i can retrieve the IP address of the host PC, and then compare that IP Address with a list of IP Address which is stored in a MS Access database to verify that the host PC is able to view the webpage. I need to do this in C# language.
thank you.
|
|
|
|
|
That may not work very well when the client uses DHCP.
|
|
|
|
|
currently, i am already able to retrieve the ip address of the host PC. right now, i just need to compare it with a list of IP Addresses in my database to search for a matching IP Address. then, if that IP Address is valid, i would allow the user to view the webpage. I am unsure of how this could be done? does anyone have any idea to guide me through?
thank you!
|
|
|
|
|
But the IP address of a system a valid user is using may change. Tracking IP addresses is generally not a very reliable technique and not worth the trouble.
|
|
|
|
|
hello!
i must tell you from the beginning that i am a C# newbie so please bare with me...
i just started learning C# a month or so ago so i am just at the beginning of (what seems to be) a very interesting journey.
my current project demands that i kill any process specified by the user.
i already finished the first part of the program:
the user inputs the name of the program,actually the process, and then clicks the "terminate" button.
the program takes the name and kills the process with the same given name. it shows the "success" message in a text box if anything is OK or shows a message box if some specified errors occur.
now all that works for any ordinary process, the process gets killed, no questions asked!
but
what about protected processes???
i tried to kill my AV process (i use AVAST free, up-to-date version) and it catches a "protected process" error...
the fact is that this error may occur in different cases,even spywares use certain methods to ensure that killing their program is impossible...
now,my obvious question is: how to bypass the process protection and kill those pesky,protected processes??
i have two guesses:
1) there may be some sort of special privileged mode to call the kill function in C# like some special administrator or something
or
2) (here i need serious help as i am a total noob at this part: ) there may be a way to add some info to some windows registry files (if that's what they're called) so that every time windows boots up and starts loading programs,my prog will start up first and block the others from booting up or even deletes the process' sources. Of course,this has to be done entirely by my C# code and i know that a noob like me messing up with window's components' codes may really F**K up the OS for good ...
that's why i really need help...
thanx a lot in advance!
ps: i now see that what i am referring to is a SYSTEM -driven process.
so yes, can you tell me how to kill a SYSTEM process using C#??
modified on Friday, February 19, 2010 10:52 AM
|
|
|
|
|
andyxfun wrote: but
what about protected processes???
Simple. You cannot kill them. System processes cannot be killed by normal or even admin users.
andyxfun wrote: ,even spywares use certain methods to ensure that killing their program is impossible...
A user that picks up a spyware, in most cases probably (in all cases that I know about) also cannot CREATE a process that cannot be killed.
|
|
|
|
|
I need a new class that will build string and each element will link to the next node. I believe this is done using a linklist, but I am having trouble and need some guidance. So far I have
Class ListNode
{
string x;
ListNode Next;
}
Class List
{
ListNode First;
}
Any help would be excellent
|
|
|
|
|
Why re-invent the wheel?
Why not use List<MyClassThatHoldsAString> instead - it handles all the list next, previous,. etc for you.You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
List or dictionary would be a simple solution but unfortunately, I need to use the other classes. I can't figure out the implementation of the class using a List<t> in combination with the other classmodified on Friday, February 19, 2010 11:22 AM
|
|
|
|
|
joejack222 wrote: List or dictionary would be a simple solution but unfortunately, I need to use the other classes.
Make sure that it's worth the effort; the prebuilt classes are well-documented (meaning that they're easier to learn) and are used by lots of people (meaning that they're used in lots of conditions, and probably contain very little bugs).
joejack222 wrote: I can't figure out the implementation of the class using a List in combination with the other class
For your entertainment, your Linked List works on my system. I've only changed the names of your classes, and added some testcode;
class MyListNode
{
public string x;
public MyListNode Next;
}
class MyList
{
public MyListNode First;
}
class Program
{
public static void Main(string[] args)
{
MyList myList = new MyList();
myList.First = new MyListNode() {x="Hello"};
myList.First.Next = new MyListNode() {x="World"};
myList.First.Next.Next = new MyListNode() {x="from"};
myList.First.Next.Next.Next = new MyListNode() {x="CodeProject"};
MyListNode currentNode = myList.First;
while (currentNode != null) {
Console.WriteLine(currentNode.x);
currentNode = currentNode.Next;
}
Console.Write("Press any key to continue . . . ");
Console.ReadKey(true);
}
} Where are you having trouble?I are Troll
|
|
|
|
|
More information is required.
|
|
|
|
|
I want to implement 6 strings using a linkedlist. eventually want to make it bidirectional
|
|
|
|
|
I need to create 150 variable names. They must be like "varName01" , "varName01" all the way to 150. How do I do this using a for or while loop?
thanks!
Sundeep
|
|
|
|
|
There is never a technical need for this sort of thing. Consider using a Hash Table or an Array or a Stack or a Queue or another more appropriate data structure.
|
|
|
|
|
What are you doing with them anyway? Magic with Reflection.Emit ?
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:44am.
|
|
|
|