VS 2005 With Winsock - Loss Connection
Nov 7, 2009
my project is attached. I have a very weird problem with Winsock! I made 1 program with 2 forms. 1st form is the client, 2nd form is the server. Server send snapshot for client. So, client display either Single Picture. Or stream of pictures (to simulate video capturing).
when open 1st window (client) in a computer, and 2nd window(server) in another computer... it connect and display picture without problem just once!! when press "Capture" button again it may reponse or Winsock may loss connection. and when Check "Loop"=> means for stream of pictures.. Winsock loss connection immediatly! I don't know where is the problem exactly! The code attached. Winsock ocx is attached.. see it in the release folder
View 9 Replies
ADVERTISEMENT
Jun 22, 2009
I am trying to make a client server form application using VB2005. I am using VS2005 Professional for development.
The problem is as follows:
When more than one client tries to connect to the server. The connection is refused and the Client gets an exception in Connect() method - Target machine actively refused the connection.
This problem occurs only when 2 or more clients try to simultaneously connect to the server. For a single client accessing at a time the problem does not occur. The code segment is as given below:
-----------1 Module
Imports System.Net.Sockets
Imports System.Net
Public Class FrmMdiParent
Dim WithEvents wsServer As New Winsock2005DLL.Winsock
Private Sub FrmMdiParent_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
[Code] .....
The above exception is thrown when more than 1 clients try to access the server simultaneously.
View 1 Replies
Jan 3, 2010
I am trying to make a basic server/client program but I ran in a problem.
[Code]....
When I click connect in the GUI the first state of sock.ctlstate is 6 , connecting then the connected event is triggered and after that the sock.ctlstate is 8 , "Peer is closing the connection". But I dont understand why it does this. I should keep the connection alive to communicate.
View 1 Replies
Mar 10, 2010
i have added 2 winsock controls on form at server side and client side and used 2 different ports 1001,1002both winsocks gets connected i used condition winsock2.state=sckconnected and it shows that connectedi want that at certain time winsock2 will send data the timer gets activatedi put breakpoint on winsock2.senddata() in timer_tick() event the line gets executedbut at client side on winsock2_dataarrival() i put a msgbox() but it never popup
Server side-
vb.net
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)
[code]....
View 2 Replies
Aug 15, 2006
im doing a project in Visual Studio 2005, how do i add the Winsock control?
View 12 Replies
Jun 7, 2012
I have made a server and a client chat program, and they both use Winsock. It works fine, but then I use multiple clients, I get this message:
Run-time error '40006':
Wrong protocol or connection state for the requested transaction request.
View 1 Replies
Sep 15, 2010
I had a large application that I needed to develop into two separate applications with different customer needs. I created a new VB.Net application and copied/imported all the forms and classes into the new application. The new application works but, for some reason all the forms have lost their 3d look, all the textboxes have a flat look now in the new application. It is as if I have lost a setting somewhere that controls the 3d look of the controls. I have checked the properties of each control and they still have the 3d option selected, and cannot see what else could be changed to get the 3d look back.
View 2 Replies
Feb 19, 2009
I need to compute the percentage of games won and games lost. I keep getting errors and it's driving me up a wall. I've changed my code so many times that I don't really remember what it was like when I started.
Private Sub btnPercentage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPercentage.Click
Dim team As String
[Code].....
View 6 Replies
Apr 28, 2009
I m using vs2008 with vb and sqlserver. I just attached a .sdf database file to my project. There is a form to insert data in products table and a dgv to show that data. Everything is working fine, i inserted the data and dgv is also showing the data. But when i tried to see that data from server explorer, thr is no data, table is blank. Then again when i run my project thr is no data in DGV also. So problem is that when i entered the data and retrieve back the data in dgv,evrythng is fine,but when i tried to see my data from server explorer, data is lost. Why data is not comtted to my .sdf ?
View 4 Replies
Jan 2, 2012
I trying to create application that can read loss bmp with bmp constructor, what I mean loss is bmp without header, here the sample of loss bmp (zip is including with original bmp):
Download(you can see the different by comparing the original bmp and loss bmp with hex editor, the different is loss bmp don't have 54 bytes header bmp) Height of image is 126 px and width image is 45 px
my question is how I can preview that loss bmp in picture box? someone of my friend say, its need BMP Constructor to preview bmp properly but he doesn't know the code, please give me the code..
View 13 Replies
Sep 28, 2010
I have compiled a Vb.Net program in which I used R Programming through R(D)COM. The statconnector library works fine. The program gives output without any error.
However whenever I try to deploy the code and create a setup file, and I run the setup file, I get the following error: There is connection for this connection ID (Exception from HRESULT: OLE_E_NOCONNECTION)
View 1 Replies
Oct 26, 2010
VB 2008 Express edition. I'm pretty new to VB2008, a little over halfway through my first classi am writing a console program to ask the user for the price of gas for 7 days, then to get the average of that price. here is my code so far:
Option Strict On
Module Module1
Sub Main()
[code].....
View 4 Replies
Jan 25, 2011
Private Function Compress(ByVal strInput As String) As Byte()
Try
Dim bytData() As Byte = System.Text.Encoding.UTF8.GetBytes(strInput)
[Code]....
View 1 Replies
Mar 9, 2009
I'm having bizarre performance results of the methods in FileInfo class.I'm using 5 methods of the FileInfo class in the Paint event.The datagridview is bound to the dataset.First the application searches files in the RecursiveSearch. When rows are added to the dataset the Paint event is fired and the rows displayed are filled with extra information from the FileInfo class . In this case the performance is very good. If I remove the DoEvents() from the RecursiveSearch the 5 methods of the FileInfo class become very slow (about 0.25sec for each line of code)!When the search ends, the user can scroll down to see the other files listed.At this point the Paint is again fired. This time the 5 methods of the FileInfo class are again very slow!
Private Sub RecursiveSearch(ByVal sPath As String, ByVal strPattern As String) System.Windows.Forms.Application.DoEvents() Try Dim strFolders() As String = System.IO.Directory.GetDirectories(sPath) Dim strFiles() As String = System.IO.Directory.GetFiles(sPath,
[code].....
View 3 Replies
Jan 3, 2012
I trying to create application that can read loss bmp with bmp constructor, what I mean loss is bmp without header, here the sample of loss bmp (zip is including with original bmp): Download (you can see the different by comparing the original bmp and loss bmp with hex editor, the different is loss bmp don't have 54 bytes header bmp) Height of image is 126 px and width image is 45 px,how I can preview that loss bmp in picture box? someone of my friend say, its need BMP Constructor to preview bmp properly but he doesn't know the code?
View 3 Replies
Sep 30, 2011
how many of you out there in the VB.NET community have installed VS2010 SP1 and are experiencing this issue with the loss of intellisense in SQL Server 2008 R2?I'm holding off installing SP1 because I kind of like the intellisense thingy (though RedGate's SQLPrompt 5 is way better - have it at home).So is this pee-ing you off, have you explored workarounds, tries the hotfixes (that apparently don't work for many setups)?url...Please note that even though Cumulative Update 9 (CU9) was released the month there are still people it does not work for..including a coworker using a similar setup as mine (Win7 Pro, x32) This is a disaster and embarassment for MS IMO
View 2 Replies
Dec 28, 2010
I found a win, loss, percentage calculator in the forums. The form has a PLACE FOR INPUT
Team Braves
WINS = 96
LOSS 66
a button Compute Percentage and a text box it should read Braves won 59.259 percent of games. The program in the forums does not work. Does any one know how to do this? The math should be wins / wins+loss * 100.
View 2 Replies
Mar 15, 2009
I am trying to code to capture the packet loss on computers, but the only way I've been able to do so was to run the NetStat.exe and the TraceRt.exe processes and capture them to a listbox (using the code below):
[Code]...
View 1 Replies
Mar 23, 2010
I coded this program. It has three forms, when I try to open the [Design] on one of the forms it give me this error: To prevent possible data loss before loading the designer, the following errors must be resolved:
[Code]...
View 12 Replies
May 2, 2011
i want to make crystal report of profit and loss statement i have a column of "vr_type" and there are 4 types in it "sale invoice", purchase invoice" now i want that put a 4 formula s where i select that "sum (vr_detail.debit) where vr_detail.vr_type} sale invoice it make Sum of al these types so kindly tell me what formula i should use to get the result in simply i want sum of sale,sum of purchase,sum of expense?
View 2 Replies
Aug 5, 2008
I have an access DB with 3 columns, ID#(Primary Key), Minutes, and Profit/Loss. I'm using the Total feature in access which adds a Row 'Total' to the bottom and shows the sums. How would I get the sum from the 'Minutes' column, 'Total' row, and get that to show in a text box (txt002004Min) ?
Imports System.Data.OleDb
Public Class Form13
Dim cn As OleDbConnection
[code]......
View 3 Replies
Aug 26, 2010
I have an application putting new data into a database so I want to use a DataGridView to display the data. I have a timer triggering every 5 seconds and running this UpdateGridFromDatabase() routine every cycle.
It works, but I can see my application memory usage going up by 10kB every 5 seconds until my computer with 6GB of RAm & 64 bit Windows 7 grinds to a halt! Can anyone see at a glance what I am doing wrong? I am trying to open & close everything as necessary. I have also dimmed two variables outside - I had then inside previously and it didn't make any difference.
View 3 Replies
Nov 23, 2009
i am trying to run a stored procedure from my vb .net application and i am getting an error that says something like this:
"..under default settings sql server does not allow remote connections"
i have checked with my sql configurations and i have allowed remote connections but i am getting this error. besides i am connecting to my local machine so why should it give me a remote connection error.
View 12 Replies
Apr 26, 2008
For the past 3 weeks now, we are encountering a sudden loss of table in our database, but with that. our .mdf file is still on its same size before this disaster comes along and again..anyone had encountered or know how to solve this problem.
View 3 Replies
Feb 26, 2009
I making a connection through word 2003 VBA to SQL server 2005 using the following codeDim cn As ADODB.ConnectionSet cn = New Connectioncn.ConnectionString = "Provider=SQLNCLI;Server=LEXAE29150SQLEXPRESS;" & _"Database=MCarter.mdf;Integrated Security=SSPI;"cn.openetc.cn.close.All runs fine up to cn.open.I then get the message error 'Cannot open database "MC.dbf" request by the login. The Login failed'.Tryed websearching but no succes. Been on it a week and the boss is doing his nut. I'm lost and unsure what wrong.The SQL server is set for windows authenticity and SOL Server login.In the MC database under security users my user name (Login) is their and setup as owner and sysadmin.SQLServer is running on the same machine as the word.dot.
View 3 Replies
Aug 26, 2009
I wrote a program in Visual Basic 2008 on my laptop that runs windows vista 64 bit, well the program attempts to access an Sql server that I am running on my laptop and it continues to give me the following error:
[Code]...
View 2 Replies
Mar 30, 2009
I get a Type 'System.Data.SqlClient.SqlDataReader' has no constructors. error on the 5th line of code below and I get a Variable 'e' hides a variable in an enclosing block. on the last line of code below (in my catch statement).
Here is my code:
Imports System.Data.SqlClient
Public Class Form1
Dim myConnection As SqlConnection
[code]....
View 3 Replies
Apr 17, 2010
I have a an application that opens a SQL connection and over the course of a few hours creates and disposes of tens of thousands of DataReader objects. You could look at it as just one big loop. As the time goes by, the memory usage steadily climbs until the application/system runs out of memory and crashes.
Psuedo code would look something like
SQLConnection.Connect
Do Until x =1000000
Create New DataReader
Use DataReader
Close DataReader
[Code] .....
Even though I dispose of the DataReader object when I am done with it, the memory usage keeps climbing. I found that every time I am finished with the DataReader I have to close the SQLConnection and dispose of it. When I do that it keeps the memory usage very low and the processor usage is barely noticeable. I would think I could just open the SQL connection once and close it when I am done.
View 2 Replies
Sep 3, 2009
I'm connecting to an ftp server in my .net application. After I send the file and try to close the connection, I'm getting an error. I'm trying to send the Quit command to the FTP server but getting no reply. I'm not sure what I'm doing wrong. I call this method: [code] Do you think something is wrong with the code of could it be a problem with the ftp server?
View 2 Replies
Feb 22, 2011
Between ODBC and OLEDB providers, which one is more flexible at both the application level, and at the report level using crystal report?
View 1 Replies