473,666 Members | 2,264 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Vb6 Dailup connection problem

4 New Member
This code works with all types of internet connections,nor dail up i wonder why ?!!!

Expand|Select|Wrap|Line Numbers
  1. On Error Resume Next
  2.  
  3. If Winsock1.State <> sckConnected Then
  4. 'Gets length of chat URL
  5.  
  6. meh = Len(txtsite.Text)
  7. bleh = Hex(Val(meh))
  8.  
  9. If Len(bleh) = "3" Then
  10. bleh = "0" & bleh
  11. End If
  12.  
  13. If Len(bleh) = "4" Then
  14. lft = Left(bleh, 2)
  15. rgt = Right(bleh, Len(bleh) - 2)
  16.  
  17. bleh = lft & " " & rgt
  18. End If
  19.  
  20.  
  21. wlen2 = bleh
  22.  
  23. Pos = 1
  24.  
  25.  
  26.  
  27.  
  28.       While Pos <= Len(wlen2)
  29.           CurChar = Mid(wlen2, Pos, 2)
  30.  
  31.           If wlen2 = "" Then
  32.               wlen = Chr(CLng("&H" & CurChar))
  33.           Else
  34.               wlen = wlen & Chr(CLng("&H" & CurChar))
  35.           End If
  36.  
  37.           Pos = Pos + 3
  38.       Wend
  39.  
  40.  
  41.  
  42.  
  43. 'Does SITEID
  44.  
  45. meh = txtid.Text
  46. bleh = Hex(Val(meh))
  47.  
  48. If Len(bleh) = "3" Then
  49. bleh = "0" & bleh
  50. End If
  51.  
  52. lft = Left(bleh, 2)
  53. rgt = Right(bleh, Len(bleh) - 2)
  54.  
  55. bleh = lft & " " & rgt
  56.  
  57.  
  58. siteid = bleh
  59. resetid.Text = bleh
  60.  
  61.  
  62. Pos = 1
  63.  
  64.  
  65.  
  66.  
  67.       While Pos <= Len(siteid)
  68.           CurChar = Mid(siteid, Pos, 2)
  69.  
  70.           If siteid = "" Then
  71.               siteid2 = Chr(CLng("&H" & CurChar))
  72.           Else
  73.               siteid2 = siteid2 & Chr(CLng("&H" & CurChar))
  74.           End If
  75.  
  76.           Pos = Pos + 3
  77.       Wend
  78.  
  79.  
  80.  
  81.  
  82. 'Does nickname
  83. bleh = ""
  84.  
  85. meh = Len(txtnick.Text)
  86. bleh = Hex(Val(meh))
  87.  
  88. If Len(bleh) = "3" Then
  89. bleh = "0" & bleh
  90. End If
  91.  
  92. If Len(bleh) >= "4" Then
  93. lft = Left(bleh, 2)
  94. rgt = Right(bleh, Len(bleh) - 2)
  95.  
  96. bleh = lft & " " & rgt
  97. End If
  98.  
  99.  
  100. nick = bleh
  101.  
  102. Pos = 1
  103.  
  104.  
  105.  
  106.  
  107.       While Pos <= Len(nick)
  108.           CurChar = Mid(nick, Pos, 2)
  109.  
  110.           If nick = "" Then
  111.               nlen = Chr(CLng("&H" & CurChar))
  112.           Else
  113.               nlen = nlen & Chr(CLng("&H" & CurChar))
  114.           End If
  115.  
  116.           Pos = Pos + 3
  117.       Wend
  118.  
  119.  
  120.  
  121.  
  122.  
  123. SckClient.RemoteHost = txtport.Text
  124. SckClient.RemotePort = "8396"
  125. Command1.Enabled = False
  126.  
  127. SckClient.Connect
  128. Else
  129. MsgBox "Already connected!", vbCritical, "Connection Tester"
  130. End If


Could anyone help please !!!!!!!! :confused:
Apr 25 '06 #1
0 1412

Sign in to post your reply or Sign up for a free account.

Similar topics

3
14515
by: Harry | last post by:
Using Oracle 8i enterprise on win 2000 (sp3) Installed the standard configuration & whenever I make a connection it takes about 10 secs. It's running on a P1900 with 1gb Ram so no reason there for slowness. Once I'm connected the queries work pretty much instantanously but to connect using SQLPLUS, Toad, ODBC, OLEDB all take about 10 secs. I connect using OLEDB from Visual Basic development environment & after the 1st connection...
4
6764
by: James | last post by:
We've had a recurring problem where all of a sudden we get a DBMSSOCN General Network Error on any page that connects to SQL Server. Then we have to reboot the server and everything works fine again, for a few more hours and then we have the same problem. Someone suggested adding ";Network Library=DBMSSOCN" to our connection strings. I've tried to figure out exactly what this does and why not having it would be a problem. Any ideas?...
1
4499
by: Mark | last post by:
I know that DB2 LUW version 8 has "connection pooling" that provides a connection concentrator (limits the number of simultaneous connections that can occur). But does it really provide connection reuse in the same manner provided by DB2 Connect or Websphere (or some 3rd party connection interfaces)? If DB2 V8 does have connection reuse, does the built-in DB2 connection pooling require extra jdbc coding, and is it as robust as DB2...
35
11388
by: Eric Sabine | last post by:
In my Finally block, I was using cn.close (where cn is an ADO.NET connection object, SQLConnection to be exact) and then I came across the following in some microsoft code. If Not cn Is Nothing Then CType(cn, IDisposable).Dispose() End If I have to admit, I'm not sure what happens here. Will someone explain this line of code (the middle one, not the if statement LOL) to me please?
16
2862
by: crbd98 | last post by:
Hello All, Some time ago, I implemented a data access layer that included a simple connectin pool. At the time, I did it all by myself: I created N connections, each connection associated with a worker thread that would execute the db commands. The pool was fixed and all the connections were created when the db access class was instantiated. The connections remained opened during the whole execution. If a connection was not available...
20
3271
by: fniles | last post by:
I am using VS2003 and connecting to MS Access database. When using a connection pooling (every time I open the OLEDBCONNECTION I use the exact matching connection string), 1. how can I know how many connection has been used ? 2. If the maximum pool size has been reached, what happens when I call the method Open to open the connection ? Will I get an error ? MSDN says the request is queued, but will I get an error in the open method ? ...
1
5116
by: sherifbk | last post by:
Problem description ============== - I have 4 clients and 1 server (SQL server) - 3 clients are Monitoring console 1 client is operation console - Monitoring console collects some data from the control unit and store them into the Sql server - The operation console then retrieve this data from the sql for reporting and statistics purposes - I am using ODBC connection - The problem is that the operation console is not able to...
1
20609
by: Ryan Liu | last post by:
Hi, I have a 100 clients/ one server application, use ugly one thread pre client approach. And both side user sync I/O. I frequently see the error on server side(client side code is same, but I don't see the error): "System.IO.IOException: Unable to read data from the transport connection:A blocking operation was interrupted by a call to WSACancelBlockingCall"
0
8440
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8355
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8866
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8550
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7381
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6191
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2769
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2006
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1769
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.