|
Hai,
I did socket server application using VB.NET, it will receive every minutes 100000 of data for my IP it contains around forty coma separated values. Once if receive the data i need to store in sql Server, wats the best way to handle this kind of situation for the best better performance.
|
|
|
|
|
srisant wrote: wats the best way to handle this kind of situation for the best better performance.
Use asynchronous fashioned methods. Separate the socket data receive and processing into multiple threads so that none of them will be blocked.
|
|
|
|
|
Adding to what has been said, you can use ThreadPool to take care of this.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Well, Asynchronous methods uses a thread pool thread internally.
|
|
|
|
|
Hi,
I want to integrate vb in the mainframe environment. As in some mainframe emulators gui feauters like mouse scroll up and down are restricted. can you please help me how to do this through vb
|
|
|
|
|
Its doubtful that you will get a vb.net app to run on a mainframe as it will require the .net runtime.
ushaallwyn wrote: mouse scroll up and down are restricted. can you please help me how to do this through vb
If this typical of your level of experience I suggest you start with something easier than a mainframe emulator.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
This question doesn't make sense at all. I appears as though you wnat to run VB code on the mainframe. That's never going to happen.
Now, you can write a terminal emulator that connects to a mainframe, but, I suspect that such a complex project is beyond your current abilities. In the terminal app, the only thing the scroll wheel would be good for would be to scroll the terminal window's text up and down. You usually don't see that kind of functionality because most terminal windows are of a fixed size and mainframe applications know this and don't provide scrolling information.
|
|
|
|
|
Hello,
I have a datagridview it contains 3 comboboxes, when combo1(category) is selected, the combo2(sub-Category) will display, when the combo2(sub-Category) is selected combo3(price) will display. every thing is working fine for the first row. when i do same thing in the second row the combo2 contains the previous sub-category and combo3 contains previous price how to restrict it.
please go throught the code if something is missing
code:
Public ddlCategory As DataGridViewComboBoxColumn = New DataGridViewComboBoxColumn()
Public ddlSubCategory As DataGridViewComboBoxColumn = New DataGridViewComboBoxColumn()
Public ddlPrice As DataGridViewComboBoxColumn = New DataGridViewComboBoxColumn()
-----------------------------------------------------------------
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ddlCategory.Name = "Category"
ddlSubCategory.Name = "SubCategory"
ddlPrice.Name = "Price"
DataGridView1.Columns.Insert(0, ddlCategory)
DataGridView1.Columns.Insert(1, ddlSubCategory)
DataGridView1.Columns.Insert(2, ddlPrice)
Dim scmd As String = "select distinct Category from master"
Dim sqlda As New SqlDataAdapter(scmd, strCon)
sqlda.Fill(DS, "ProjNo")
ddlCategory.DataSource = DS.Tables("Category")
ddlCategory.DisplayMember = "Category"
ddlCategory.ValueMember = "Category"
sqlda.Dispose()
sqlda = Nothing
DataGridView1.Rows.Add(3)
End Sub
------------------------------------------------------------------------
Private Sub DataGridView1_EditingControlShowing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewEditingControlShowingEventArgs) Handles DataGridView1.EditingControlShowing
cb = TryCast(e.Control, ComboBox)
If cb IsNot Nothing Then
RemoveHandler cb.SelectedIndexChanged, AddressOf DGVddlCategoryComboIndexChanged
RemoveHandler cb.SelectedIndexChanged, AddressOf DGVddlSubCategoryComboIndexChanged
Select Case gvMultipleProjects.CurrentCell.ColumnIndex
Case 0
AddHandler cb.SelectedIndexChanged, AddressOf DGVddlCategoryComboIndexChanged
Case 1
AddHandler cb.SelectedIndexChanged, AddressOf DGVddlSubCategoryComboIndexChanged
End Select
End If
End Sub
----------------------------------------------------------------------
Private Sub DGVddlddlCategoryComboIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
Dim com As ComboBox = CType(sender, ComboBox)
Dim scmd As String = "select distinct SubCategory from master where Category='" & com.SelectedItem.ToString() & "'"
Dim sqlda As New SqlDataAdapter(scmd, strCon)
sqlda.Fill(DS, "ProjNo")
ddlSubCategory.DataSource = DS.Tables("SubCategory")
ddlSubCategory.DisplayMember = "SubCategory"
ddlSubCategory.ValueMember = "SubCategory"
sqlda.Dispose()
sqlda = Nothing
RemoveHandler cb.SelectedIndexChanged, AddressOf DGVddlCategoryComboIndexChanged
RemoveHandler cb.SelectedIndexChanged, AddressOf DGVddlProjNoComboIndexChanged
End Sub
----------------------------------------------------------------
Private Sub DGVddlSubCategoryComboIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
Dim com As ComboBox = CType(sender, ComboBox)
Dim scmd As String = "select price from master where SubCategory=" & com.SelectedValue.ToString() & ""
Dim sqlda As New SqlDataAdapter(scmd, strCon)
sqlda.Fill(DS, "Price")
ddlPrice.DataSource = DS.Tables("Price")
ddlPrice.DisplayMember = "Price"
ddlPrice.ValueMember = "id"
sqlda.Dispose()
sqlda = Nothing
RemoveHandler cb.SelectedIndexChanged, AddressOf DGVddlCategoryComboIndexChanged
RemoveHandler cb.SelectedIndexChanged, AddressOf DGVddlSubCategoryComboIndexChanged
End Sub
Thanks in advance
saha
|
|
|
|
|
As far as I can tell, you're reusing the exact same cb editing control. It's just being move from one cell to the next, so, of course, it's going to have the previous values that were entered. Either destroy the existing combo and create a new one, or clear whatever properties you need to from the existing one, depending on your requirements.
|
|
|
|
|
Hello Dave,
Can you give me some idea how to do that, i have used the cb.Refresh(), cb.ResetText(), it is not working if i use cb.dispose() it is throwing error "Cannot access disposed".
please let me know if i have done some mistake.
Thanks&Regards
saha.
|
|
|
|
|
please go through the code
|
|
|
|
|
please go through the code little urgent
|
|
|
|
|
I have same problem. can you give me some hint, I have tried using different CB but it didn't work for me.
Thanks & Regards
Sandip Khillare
Web Developer
Enrich Web Technologies
modified on Saturday, February 14, 2009 5:40 AM
|
|
|
|
|
you just add this code to clear the comboBox
ddlCategory.DataSource = null;
then write code to list subcategory under the ddlCategory ValueChanged event
|
|
|
|
|
mates,
how to play a sound in visual basic 6.0?
it will play the sound when the form is load. it will only stop
when i click a specific button. how will i do that?
thanks in advance.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
There is a windows media player control available. Use that and load a sound file.
|
|
|
|
|
Another option would be to use MciSendString. You can research more about it, along with pitfalls fo using it, here[^].
|
|
|
|
|
hi,
i am trying to create fax automation application in window service.
so far i have hard coded to test how the fax code runs. but i wanted to create classes in window service. i need help in creating classes and call them in my code. i tryed to call class using namespaces but its not allowing me. Thank you for ur help
|
|
|
|
|
AOA everyone
I have just started working on an item inventory control project.
unfortunately, i don't have much knowledge about vb.
i'll be glad if someone guides me to some easy coding as well a good form made in vb that will be unique as well as original.
Goodbye all
ST
|
|
|
|
|
ShayanTanwir wrote: AOA
Wtf? Sorry had to do that, search google for a beginners article on visual basic, it's quite an easy language to pick up and begin. No one is going to give you work, forms or coding for nothing, sites like this[^] exist for that.
Other then that welcome to the site, people will be happy to help you here if you get stuck on a certain part or will be happy to clarify anything you need but won't go so far as to construct an entire project for you.
|
|
|
|
|
ShayanTanwir wrote: unfortunately, i don't have much knowledge about vb. Cry
Fear not! Check this link!
ShayanTanwir wrote: i'll be glad if someone guides me to some easy coding as well a good form made in vb that will be unique as well as original.
Should it be original so that it passes checks for a site such as Turnitin.com? Perhaps, you should at least attempt to do your own home work and then ask for help, hmmm?
ShayanTanwir wrote: Goodbye all
Bye!
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
ShayanTanwir wrote: unique as well as original
Surely that is tautology?
Henry Minute
If you open a can of worms, any viable solution *MUST* involve a larger can.
|
|
|
|
|
I was wondering how this is done.
The cursor shows in normal mode. here is the code I used.
video.Owner = pnlVideo
video.ShowCursor
This works fine in normal mode. I can get the context menu to show in Fullscreen and normal modes. The context menu is connected to the pnlVideo panel.
Could this be the problem??? Should I connect the ctx menu to the Form?
Or, if I do connect the ctx menu to the form, will it even show up in fullscreen mode?
THNX in advance for any help in this mental error.
rspercy
1 + 1 = 186,440....Depending on the species.
|
|
|
|
|
I'm suddenly getting this error on all of the machines at one of our sites:
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
The line of code which causes the exception calls a method from a 3rd party COM dll.
The code worked 100% before, but started giving this error this morning. I've attempted to reproduce the error on several machines here in our office, but here it works without any problems.
I can't seem to find any working solution for this on the net. Does anybody have an idea of what might be causing this?
Thanks in advance!
BTW: We're using VS2008 (Framework 3.5)
|
|
|
|
|
Where there any updates (windows) installed on the computers where you get this error?
Since the error happens on a call to a 3rd party dll you best bed will be to contact them.
|
|
|
|