TCP Connection Stops Accepting Connections?
Sep 29, 2011
Ok so I have been working on this code for awhile now and it is a huge mess. At the moment I have a problem that if the code is left for a time it will not accept any more connections on the server. I know that it is not accepting any as it is talking to a PLC and I can see that the TCP connection fails. If, however, the PLC transmits to it all the time it does not have a problem. The PLC connects -> Transmit -> Disconnect.I have tried the connection through a switch and via a direct connection. This time I am going to attach the entire code but the main part that you want to look at is the TCP on the main page. I am attaching it all in case there is something else in the code that could be causing the issues
View 2 Replies
ADVERTISEMENT
Mar 14, 2011
I just want to know, What parameters or attributes should be taken in connection string so as to handle high traffic enterprise applications? Like in general we use server, initial catalog, userid, passwd. Some times we add timeout , and in some scenario pool etc. But i don't know what attributes should i take in as my common practice apart from above.
View 3 Replies
Jul 19, 2011
Using VB.Net and SQL Server 2008 R2: I have recently had a database that using sp_who2 reflects a connection ".Net SqlClient Data Provider" is still active even though the .Net application has closed and disposed of all connections.
[Code]...
View 1 Replies
Oct 22, 2009
I have the following query:
SELECT Inventory.Inventory_Id, Inventory.Inventory_description, Inventory.Inventory_stock_count, nz((SELECT Sum(Order.item_qty) AS SumOfitem_qty
FROM [Order]
WHERE Order.From_date<=Date() AND (Order.To_date)>=Date()
AND Order.Item_ID='I' & Inventory.Inventory_Id),0) AS CurrentlyOut, [Inventory_stock_count]-Nz((SELECT Sum(Order.item_qty) AS SumOfitem_qty
[Code]...
View 11 Replies
Apr 7, 2011
I want some of my datagridview column just accept some characters only. For example I want the column(2) which is hold barcode will accept char
"0123456789-" I used productdatagridview keypress_event, but not working, here is my code:
If ProductDataGridView.Columns.IndexOf(ProductDataGridView.Columns("barcode"))
Then
[code].....
View 1 Replies
Nov 4, 2009
I am using VB.Net 2005. I have MS-Office 2000 installed in my PC. After exporting to CSV from the application, I am unable to see special characters like ú, çã í, etc. I have used the following Code :
Public Sub CreateCSVfile(ByVal dtable As DataTable, ByVal strFilePath As String)
Dim sw As New StreamWriter(strFilePath, False)
Dim icolcount As Integer = dtable.Columns.Count
For i As Integer = 0 To icolcount - 1
[code]....
View 1 Replies
Aug 10, 2009
I have built an addin for outlook that has a usercontrol shimmed into the interface. Everything works wonderfully EXCEPT for one textbox on one subpanel of the control. I have tried everything I can think of, but have not been able to resolve the issue:
The textbox *(A regular System.Windows.Forms.Textbox) functions as you would expect in any application with one exception. It will NOT accept the backspace key. So much so that the KeyDown, KeyPress, KeyUp events will not even fire when I press the backspace key. There does not seem to be any parameter suppressing it, and the control has focus. What is even stranger is that it works completely fine if you hold down the shift key while pressing the backspace key.
[code]...
View 9 Replies
May 27, 2011
Im currently diving into jquery autocomplete for the first time. To start off with, I had a .net handler calling out to a mssql db and pulling last names. That worked great.However when I try to add additional values it simply doesnt work. The code being used in the handler is as follows.
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
Dim prefixText As String = context.Request.QueryString("term")
Dim conn As SqlConnection = New SqlConnection
[code]....
I didnt include the IsReusable when posting, but that is there. why it doesnt like multiple values but will display one lone value?
** Edit ** I just looked in Firebug and it is getting a response but just not displaying it. My implementation of this is pretty simple so far, nothing to fancy.
$(function() {
$('#lastName').autocomplete
({
[code]....
View 1 Replies
Mar 31, 2010
I've placed this on a VB2008 project but it's telling me adNumeric,adVarChar & adBoolean are not declared, I'm assuming I need to "DIM" them, but what as? plus I need each field to accept NULL values, how do I do this? Also I'd like to add a field for accepting images.
Code:
Dim cat As New Catalog()
Dim col1 As New ADOX.Column
Dim col2 As New ADOX.Column
Dim col3 As New ADOX.Column
[code]....
View 7 Replies
Jul 4, 2010
I am creating an update program to go inside of another program I am designing, and I was curious as of how to download the new (updated file) from the internet. Here is the code I have so far.
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
[Code]....
View 4 Replies
Feb 20, 2012
How to prevent textbox to be not accepting numbers in first
5 digits
Only characters in first 5 digits and other digits accept
numbers and characters
View 7 Replies
Jun 23, 2011
I want to pass the address of a sub as a callback to another method. From what I can find, a function is passed using the format:
Public Sub test(ByRef callback as Func(ArgClass, ReturnClass))
The thing is, as mentioned, I don't want to pass it a function but a sub. There doesn't seem to be an equivalent class Sub which will stand in place of Func, and it won't allow me to set the return class as nothing, so I'm somewhat stumped. How should this problem be solved?
View 1 Replies
Aug 4, 2009
I can't get this to work..
vb.net
Private Sub UpdateLVItems(ByVal Index() As String)
lvDrives.Items.Add(Index(1))
lvDrives.Items.Item(Index(0)).SubItems.Add(Index(2))
lvDrives.Items.Item(Index(0)).Tag = Index(1)
End Sub
[Code]...
View 3 Replies
Sep 18, 2010
Is their anyway to have the inputbox function reflect a password character while typing in a value instead of regular characters?
View 16 Replies
Jun 20, 2012
I'm having a problem implementing Scott G's Dynamic.vb extension at [URL] in my vb solution. I've searched StackOverflow (80+ Q&As) and numerous other sites without much luck. I'm using VS 2010.I've included Dynamic.vb in a problem with no root namespace, and then added a reference to that project in my main one. I'm getting intellisense for 4 overloads (rather than 2) so I'm pretty certain that the extension is in scope.I was having a tough time with clauses, especially the OrderBy as Scott demonstrated. If I simply pass a string as Scott's VB example did I get the error "Overload resolution failed because no accessible 'OrderBy' can be called with these arguments."
The line of code is:
Dim FilteredComponentList = From Component As MX.Component In ComponentList.AsQueryable _
.OrderBy("Name")
So I found other references that stated to pass a Lambda expression. So I tried this and at least I get no error, even if the sort function still doesn't seem to work. Here is the code that compiles and executes.
Private Sub SortByColumn()
If Not cmbComponentFilter.SelectedItem.ToString = "All" Then
Dim FilteredComponentList = From Component As MX.Component In ComponentList.AsQueryable _
[code]....
When I interrogate the dgvComponents.Columns(e.ColumnIndex).Name it gives the objects property I wish to sort by, but the sort still isn't working. I'm concerned why I can't get Scott's implementation to work, but I've heard his keynotes and read his blogs, so I'm guessing the problem lies with my implementation.
I'd like either to work but need to understand why as well. Why doesn't passing a string work? Isn't the PARAMARRAY declared in the function optional?
View 1 Replies
Sep 28, 2009
I've found plenty of examples of accepting numbers only in a text box, but the code won't allow decimal points. This is crucial because I'm dealing with US currency.
01.' Force numbers only in a text box
02.' place this in the 'Keypress' event of a text box
03.
[Code]....
How can I change the IF statement to accept the ascii code of decimal points? Then... how can I make sure the user doesn't enter 354.5.3535.5.0 as a number? Is there some sort of built in library in VB that has a pattern matching for US currency or do I have to write it myself?
View 11 Replies
Feb 18, 2009
there is an textbox, an label and an button on my form. In the click event of the button i wrote label1.focus().ow when i click on the button the focus is being set to the label instead of the textbox, even though the tabindex of the textbox is 1 than compared to 0 of the lablel.
View 6 Replies
Oct 15, 2009
How come this is not a valid DirectCast:
Public Sub FB(OF T0 As IGH_Goo, T1 As IGH_Goo) _
(ByVal A As DataTree(Of T0), _
ByVal B As DataTree(Of T1))
Dim val_A As T1 = DirectCast(A.FirstItem, T1)
End Sub
[Code]...
View 1 Replies
Feb 4, 2012
I'm running Microsoft Visual Basic 2010 Express on Windows 7, using a Regional Setting set to New Zealand.
When I enter a date in a NZ format (d/mm/yyyy), the IDE highlights the date and tooltip reports date constant not valid. But it is valid for NZ! Meanwhile, the IDE happily accepts dates in the US format.
I would have expected VB to look at my PCs regional settings and set this as the default format. What is wrong here? I have reinstalled the application, but still have the same problem.
View 5 Replies
Dec 23, 2009
I have a form, with lables and textboxes added at runtime. The labels and textboxes are added properly on form load and display as expected. The form allows tabing into each of the textboxes, but the textbox does not allow user input.
Is this a problem with the way I show the form to the user? >> this particular form is called (frmname.show) from a different form -- If I test this form directly, without being called from a different form, it allows user input in the textboxes. Is it because of the properties I used to create the textbox? >> properties used were - .name, .size, .location, .tag
View 5 Replies
Apr 8, 2010
I have a storedproc accepts parameters in XMLtype as
CREATE OR REPLACE PROCEDURE GetDetails(
p_para IN XMLTYPE,
i have to pass 4 parameters to this proc how to do this?
i am passing param as db.Parameters("p1", Oracle.DataAccess.Client.OracleDbType.Varchar2, _
' LN.Length, CObj(LN), Data.ParameterDirection.Input)
[code]....
View 4 Replies
Aug 12, 2011
I'm new to VB and I'm trying to get this app to recognize that a "C" is the same as "c" but for some reason its not recognizing it. Its seeing the lower case letters as 10%.
Here is the code I currently have...
Private Sub btnCalculate_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnCalculate.Click
Dim subtotal As Decimal = CDec(txtSubtotal.Text)
Dim discountPercent As Decimal
[Code] .....
View 2 Replies
Jun 25, 2012
I'm trying to implement a Web API project that exposes some models. However, the way the model is retrieved isn't very RESTful. 1.Instead of having just one ID, it has a combination of 4 different ones to populate the model data by running a stored proc on the server.Dim balance as New BalanceSheet(uid, mid, eid, fid)The snippet above will use uid, mid, eid, fid to retrieve the correct record from the database.
View 1 Replies
Nov 29, 2011
I am having some issues with a parameterized SQL Lite query. I can't seem to get the SQL Lite Parameter to accept the String value
Using cmd As SQLiteCommand = pConn.CreateCommand()
If tblLang = "en" Then
cmd.CommandText = "UPDATE [AT_Strings] SET [Data] = @tblData + 1 WHERE [RecordID] = @ID AND [language] = @tblLang1"
Dim tblData As New SQLiteParameter("@tblData")
[code]....
The error is as follows....Unable to cast object of type 'System.String' to type 'System.Data.SQLite.SQLiteParameter'.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Unable to cast object of type 'System.String' to type 'System.Data.SQLite.SQLiteParameter'.
Source Error:
Line 283: Dim ID As New SQLiteParameter("@ID")
Line 284: Dim tblLang1 As New SQLiteParameter("@tblLang1")
ERROR on Line 285...
Line 285: cmd.Parameters.Add(dataText)
View 2 Replies
Jul 28, 2009
I have an animated gif in a picturebox that's loaded from the start.The problem is, whenever any application goes on top of the app the gif stops moving.Example : the app is open (gif is animating), I open notepad, I open the app (gif has stoppd animating)How do I keep it animated, even when the app is not visible?
View 2 Replies
Jun 7, 2011
I have a storedproc accepts parameters in XMLtype as
CREATE OR REPLACE PROCEDURE GetDetails(
p_para IN XMLTYPE,
[code].....
View 1 Replies
Aug 13, 2010
Running solution with VB.NET & C#, ASP.NET, VS 2008 with ReSharper 5 Most of the time, ReSharper is working (redundant code grayed out, squiggles, etc.)Sometimes, on the same code where it was working, nothing is highlighted to show ReSharper is enabled.I haven't done anything except modify code and debug.
View 1 Replies
May 5, 2011
In my form3 i have this code
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim vs As Integer
[code].....
View 1 Replies
Mar 1, 2009
I am using the following code to create a dummy file of a specific size. RemSpace declared as a Long value and is returned in bytes from a separate function in my applciation. I have verified that it returns the correct # in bytes. However, when I execute the following routine, the dummyfile is created, but it never stops the loop. I have to kill it from task manager or it would fill up the HDD. The line:
For i As Integer = 1 To RemSpace
should tell the For loop to stop when it reaches the value of RemSpace, which is a long value in bytes. Here is my complete code.
Public Sub Create_DummyFile()
Dim RandomClass As New Random()
Dim RandomNumber As Integer
[Code]....
View 9 Replies
Jun 12, 2011
I am using VB 2101 express, I am try to right this program but it will not go past the end of my loop, does anyone know why?
If (Not System.IO.Directory.Exists(root + "setting")) Then
System.IO.Directory.CreateDirectory(root + "setting")
End If
[Code].....
View 2 Replies