|
sorry for putting down all my codes..
here's the line of code which ive got error..
Private Sub main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load <br />
gmode = 0<br />
gRestoreGrammar = False<br />
<br />
On Error GoTo GeneralFail<br />
<br />
REM Initialize the recognizer. We want command and control, so find and select that engine (or best match)<br />
AxDirectSR1.Initialized = 1<br />
dim engine as string<br />
engine = AxDirectSR1.Find("MfgName=Microsoft;Grammars=1")<br />
AxDirectSR1.Select(engine)<br />
<br />
REM menu.txt is our uncompiled grammar. Compile and load it now.<br />
<br />
AxDirectSR1.GrammarFromFile("C:\Documents and Settings\kaex21\My Documents\Visual Studio 2008\Projects\Project1\WindowsApplication6\WindowsApplication6\menu.txt")<br />
REM Now load the synthesizer, find and select any female voice from microsoft<br />
AxDirectSS1.Select(AxDirectSS1.Find("MfgName=Microsoft;Gender=1"))<br />
<br />
REM Start the voice interface...control goes to DirectSS1_AudioStop after this is said, gMode=0<br />
AxDirectSS1.Speak("Welcome to kaex restaurant, sit back and enjoy as you take your order.")<br />
<br />
REM sometimes the vb environment comes to front while we're loading, so take the screen back<br />
Me.Show()<br />
GoTo done<br />
GeneralFail:<br />
MsgBox("Unable to start using text to speech or recognition.")<br />
done:<br />
<br />
End Sub
it always say "unable to start using text to speech or recognition becuase it has an error.. and directly it go to generalfail.. it means i have an error above my codes.. can you help me sir how to correct this one?? in newly in vb.net.. this code that ive been working is fully functional in vb6.. but in vb.net is not..
|
|
|
|
|
It seems you are using a COM component to recognize speech. In that case, you have to add a reference to the COM component in VS and it will create a RCW for you. And then remove error handling from the procedure that is giving you the error, this will enable you to nail down to the exact line that is causing the error.
|
|
|
|
|
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">
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
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.
|
|
|
|
|
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
|
|
|
|
|
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?
|
|
|
|
|
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
|
|
|
|
|
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...
|
|
|
|
|
Send all the information like S/W, bootloader version, etc. only ONCE and send a 'ping' to the database every 5 or 10 mins along with the Device ID. The date/time the ping was received will be the last online date/time of the device. MySQL is a solid database used worldwide for production purposes, and if properly configured, it can easily handle millions of transactions per second. So that should not be a problem.
|
|
|
|
|
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
|
|
|
|
|
Not that I know of
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
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
|
|
|
|
|
That'll only happen when Microsoft rewrites the entire kernel in managed code.
|
|
|
|
|
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
|
|
|
|
|
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)
'If your ID field has different name than Id, replace the Id part on the next line, whith the correct
e.Row("Id") = cmd.ExecuteScalar()
e.Row.AcceptChanges()
End If
End Sub
Hope this helps
|
|
|
|
|
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.
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
ok imma give that a try thanks
|
|
|
|
|
I am not sure how to buffer the records in memory from.., i can you explain how
|
|
|
|
|
Create a stack of data objects, and push new ones onto the stack, and pop old ones off.
.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
|
|
|
|
|
I have this solution(vs2005 express)with different C# projects in it.
(one .exe and a few dll's that the .exe uses).
This solution works on my computer, works on several other computers(xp and vista),
but refuses to work on one particular computer.
If I rebuild everything from source on that particular computer or just copy the binaries to it, I always get this error:
"The specified module could not be found. (Exception from HRESULT: 0x8007007E)"
The program does not find a particular dll,
but the dll file is actually where it is supposed to be.
(the dll is a codelibrary I made myself)
--edit--
problem solved:
I copied about every msvc*.dll I could find to \Windows\System32...
that did the job for now (had to solve this problem fast)
modified on Friday, November 6, 2009 8:40 AM
|
|
|
|