 |
|
 |
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers, Chris Maunder
The Code Project Co-founder Microsoft C++ MVP
|
| Sign In·View Thread·PermaLink | 3.67/5 (10 votes) |
|
|
|
 |
|
 |
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers, Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
| Sign In·View Thread·PermaLink | 4.40/5 (4 votes) |
|
|
|
 |
|
 |
Error : Section or group name 'system.web.extensions' is already defined. Updates to this may only occur at the configuration level where it is defined.
I have a web application project which developed under 3.5 .net framework. Also there is a virtual directory under the project that developed in 2.0 .net framework. These two sections belongs to their web.config file.
Root Project’s config : <sectionGroup name="system.web.extensions" type= "System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
Virtual Directory’s config : <sectionGroup name="system.web.extensions" type= "System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
When ASP.NET reads configuration information it starts at the highest level, with machine.config, and works downward in the chain. The virtual directory is below the root and can't redefine this element, especially to a lower version. Remove it and it should work fine.
I know the language. I've read a book. - _Madmatt
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi all,
I try to create a client program on a mobile device which sends every 5 or 10 seconds a MySQL Query/Command to update the database with many of informations like Software version of each mobile device.
My question is: is it clever to this on this way or do I have to much traffic on network when 1000 clients sends at the same time a mysql query/command to a mysql server every 5 or 10 seconds the whole day?
The planing infrastructre of this solution is the following:
- I have one MySQL Server which contains information of all mobile devices - I have a management console that query the MySQL server to get this information - I have 1000 mobile devices that sends every 5 or 10 seconds their information like S/W version/Bootloader version etc. to the MySQL server
So can I make it this way or I'm on a wrong way?!
Thanks for your qnswers,...
Walter
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
nxexo007 wrote: I have 1000 mobile devices that sends every 5 or 10 seconds their information like S/W version/Bootloader version
Is this information really going to change every 5 to 10 secnds?
I know the language. I've read a book. - _Madmatt
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi,
First of all, thank you for your reply. So, this information doesn't change every 5 to 10 seconds. But the thing is, that I want to update the last online time of the mobile device, so I can see that the unit is online now.
Every 5 or 10 seconds the unit will notify himself on the database. The table will looks like this:
[S/N] [Devicename] [IP] [LastOnlineTime] [S/W-Version] and so on...
Then the management console will check the [LastOnlineTime] column and then I know when the device was last time online.
And every mobile device will do this (1000 units are in the network). In this way I can see how many devices are online now. It's a kind of online notifyer for mobile devices.
My question is, can a MySQL server handle this and is that not to much traffic for the network? Or is this solution a little bit sh*t. 
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I would think MySQL should be able to handle it. The question is more whether the network will support it and if your application can as well.
If all you need to know is if the device is online, then you don't need to transmit all the data you are asking for. A simple reply with the device ID would be enough.
I know the language. I've read a book. - _Madmatt
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
What do you mean with:
Mark Nischalke wrote: A simple reply with the device ID would be enough.
Is this a reply to the database or do you mean a reply over UDP to the management console?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
It's your application, you determine where the reply should go.
You don't need to transmit everything about the device just to know it's online. Just transmitting the device ID, one piece of information, will be enough to know that its online right? Why send 50 bytes over the network when 2 bytes is enough?
I know the language. I've read a book. - _Madmatt
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hmm,
Ok thank you I will try it like you say. But I need although the information like S/W version.
So, I can send a command over UDP to all units, so that the units will update their information to MySQL database. And this I do not always, I do this just from the management console when I want and not every 5 or 10 seconds.
Or I will made a pilot-test with 500 units in this network, to test the MySQL performance with my for solutions idea.
I don't know, I have to think about it... :(
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Is there a library available that implements the entire Windows API (via System.Runtime.InteropServices)?
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
if you mean one or a few classes that wrap the content of kernel32.dll and user32.dll and the like, the answer is no, unfortunately. I started such classes years ago, and each time I need another Win32 function, I add its prototype to them, but that is a never ending endeavor.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Project in VS2008.Although i searched here for fixes, i didn't find anything of use. I saw this http://www.codeproject.com/Forums/1650/NET-Framework.aspx?fid=1650&select=2572091&tid=2572091[^] solution, but i didn't try it because it in C, and i can't translate it to VB
Ok, there is an ACCESS DATABASE, where the user can store various information. The database DOES have an autogenarated unique primary key.
When the user saves the record and then tries to delete right away THIS record, the "Concurrency violation: the DeleteCommand affected 0 of the expected 1 records." comes up. However if the user reruns the program and tries to delete, everything is normal and work.
The problem is that when the user updates the database, for some reason the record does not get the normal primary key until you rerun the program.This much i know.What i dont't know, is how to fix this problem.Trying to refill the adapter after i update the record does not seem to correct it.
The code to update the database is this.
DataSet31.Tables(0).NewRow() .... .... Part where the user fills in the information he wants to store in the database .... .... DataSet31.Tables(0).Rows.Add() OleDbDataAdapter3.Update(DataSet31.Tables(0)) DataSet31.Tables(0).AcceptChanges()
And the code to delete the record is this
DataSet31.Tables(0).Rows(rowindex).Delete() OleDbDataAdapter3.Update(DataSet31.Tables(0)) <------ Here is when the problem occurs DataSet31.Tables(0).AcceptChanges()
Thanks in advance.
modified on Saturday, November 7, 2009 4:22 AM
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Well, some minutes later I seem to have solved the problem. I actually ported the C, solution to VB and it solved.
Here is the solution.
On adapter rowupdated event add the following code.
Private Sub OleDbDataAdapter3_RowUpdated(ByVal sender As System.Object, ByVal e As System.Data.OleDb.OleDbRowUpdatedEventArgs) Handles OleDbDataAdapter3.RowUpdated If (e.StatementType = StatementType.Insert) Then
Dim cmd As OleDbCommand = New OleDbCommand("SELECT @@IDENTITY", e.Command.Connection)
e.Row("Id") = cmd.ExecuteScalar() e.Row.AcceptChanges()
End If End Sub
Hope this helps
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi to every one.
I am in a situation and finding the way to figure it out.
I have a web server hosting multiple web sites. Now i added some more web servers to same sub net mask. But these are not live servers. So now i want that when main server receives some requests for sites, it will transfer the request to other servers in the subnet. So that the complete bunch of requests is divided up to different servers and processed faster.
In short i want to implement a load balancing scenario. It is my own student research. No commercial work is included.
Please guide me through it. Should i implement some HTTPListener or i have write some ISAPI extension for IIS.
Thanks in advance.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
i was able to send packets from my traffic generator to the pc, inorder for me to confirm the packets were sent i used wireshark as a visual aid. from there i saved the file as cvs and then paste data into excel sheet. once in this format i was able to do a stored procedures which put the data in a sql database. now i know there has to be a better way to both read and write captured packets to ANY database. any suggestions with steps
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Instead of doing all that middle code (create a cvs file), why don't you buffer the records in memory and call a stored proc to add the data as it's received?
One thread plugs the data into the buffer, and one thread pulls it out and puts it in the database.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Public Class Form1 Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Dim totaldata As String Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load totaldata = "[Grammar]" & vbCrLf & "langid = 1033" & vbCrLf & "type = cfg" & vbCrLf & "[]" & vbCrLf & "= Internet" & vbCrLf & "= Notepad" & vbCrLf AxDirectSR2.Deactivate() AxDirectSR2.GrammarFromString(totaldata) AxDirectSS1.Speak("HI ANUJA") AxDirectSR2.Activate() End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click textbox1.text = "hi" End Sub
Private Sub AxDirectSR2_PhraseFinish(ByVal sender As Object, ByVal e As AxACTIVELISTENPROJECTLib._DirectSREvents_PhraseFinishEvent) Handles AxDirectSR2.PhraseFinish #If def_DirectSR2_PhraseFinish Then
Dim sFile As String
Dim noth As Long 'AxDirectSR1.get_Phrase(ActiveForm) Phrase = "Internet"
Select Case Phrase
Case "Internet" sFile = "C:\Program Files\Internet Explorer\iexplore.exe" noth = Shell(sFile, 1) Case "Firefox" sFile = "C:\Program Files\Mozilla Firefox\firefox.exe" noth = Shell(sFile, 1) Case "Notepad"
sFile = "\system32\notepad.exe"
noth = ShellExecute(0, "OPEN", Environ("SystemRoot") & sFile, "", "", 1)
End Select #End If End Sub End Class
I want to open internet explorer through voice. I bulid prog for dat but In this prog control is not gong to the Phrase_Finish event of AxDirectSR2.can you check this code
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
The problems seems to be that def_DirectSR2_PhraseFinish preprocessor directive is not declared. As a first troubleshooting option, try to remove the #If and #Endif statements and run your code.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi I am trying to insert a DataGridViewComboBoxColumn, the column is getting inserted but the values in the combo box are shown. The Code is as under
DataGridViewComboBoxColumn column = new DataGridViewComboBoxColumn(); column.HeaderText = "SELECT"; column.Name = "ItemSelect"; column.CellTemplate = new DataGridViewComboBoxCell(); column.Items.AddRange(new string[] { "One", "One", "Three" }); column.DropDownWidth = 160; column.Width = 90; column.MaxDropDownItems = 3; column.FlatStyle = FlatStyle.Flat; myDataViewGrid.Columns.Insert(0, column);
When I run the code, the dataviewgrid all cells except 1st are populated properly, but in first cell I see only empty combobox Please guide Thanks in advance
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
How can i know that my text in a richtextbox reached the to the maximum visible height or width of my richtextbox.can anyone pls help..
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |