Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Using A Seperator With Winsock (syntax)


Hi all, im curious to know how i can accomplish something like this...

winsock1 sends data with 4 seperate items. (item1|item2|item3|item4)

how can i setup a way to seperate them like that

winsock2 (server) received the data string and pulles the items apart. and puts them where they need to be. and sends the result back to the clients.


Thanks




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Winsock Syntax? (To Request A Website With The Winsock Control)
Ok, I don't know very much about Winsock and am just now starting to use it. I'm making an anonymity program that modifies referer and user agent data. I managed to find an example of how its done on planetsourcecode.com but there's a few things that aren't working.

Anyway, when this string is sent, it sends the headers and a request for index.html from the connected host (winsock1.connect domain.com 80).

GET index.html HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-comet, */*
Accept-Language: en
Accept-Encoding: gzip , deflate
Cache-Control: no-cache
Proxy-Connection: Keep-Alive
User-Agent: Whatever
Referer: www.whatever.com

But when I used the website http://ipid.shat.net/ as the domain to see if code mdified the headers or not, it directed me instead to just www.shat.net. How would a browser request information to ipid.shat.net?

Also, I noticed that by sending just that information, cookies don't work properly. What other tags do I have to add onto that for it to recieve my session information? Thanks a lot.

Winsock Syntax
I am working on a VB 6 app that will communicate with a third party server control. The server control wants inforamtion posted to it in the following format.

http://SQL200:1000/cgi-bin/auth.cgi?ya_da_ya_da_ya

sql2000 = local server's name
"ya_da_ya_da_ya" = information to be posted.

I have used the VB winsock control in my app to connect to the server and send the information.

Winsock1.Protocol = sckTCPProtocol
Winsock1.Connect "10.0.0.113", "1000"

Winsock1.SendData "ya_da_ya_da_ya"

I have confirmed these three lines of code successfully connect to the server app and send the information. However, since I did not incluce the location of "cgi-bin/auth.cgi", the server does not reply.

How do I connect to the location "cgi-bin/auth.cgi"?
I have tried numerous combinations but they are all just guesses. I do not know how or where to put the "cgi-bin/auth.cgi" in the connect statement.

When I open a browser on the sql2000 machine and type in:
http://localhost:1000/cgi-bin/auth.cgi?ya_da_ya_da_ya, the server responds with the correct information.
I am trying to create a winsock control that that sends this data and listens for the response.

Thanks,
pat


Winsock, Syntax Error...
I'm trying to connect to a ftp server with the winsock control.

I have setup the winsock controls remote hsot and port.

The data arrival event puts the data recived in a text box.
I see that the ftp server wants the username.

I have another text box where I can enter commands to send with the senddata method of the winsock control. But when I try to send the Username to the ftp server, all I get back is "500 Syntax error, Command not recognized".

I have tried to use USER *****, and only ******. I also have tried to add vbcrlf after the string to be sent. I have tried to add vbcrlf before the string to be sent...

What are I doing wrong???

/Smirre

Winsock.remotehost Syntax Problem
hi
I have had Winsock going before , but now I can seem to enter the
.RemoteHost name properly
What is the format for the name?
ie. username.ispname.co.nz
username@ispname.co.nz or what?

I get error # 11004 when I do a .Connect , indicating the host was not found.

(I have a ADSL connection made (email program works).)

I have tried to connect using 'open' command in TelNet in DOS,
but same result.

VB Seperator
I need to know what function is being called to find the regional separator in vb script. I am working with someone from russia and the regional separators are different there. Any help is greatly appreciated.

Seperator's.
Hello guys and girls. Im new here and am going to try to help and recieve help with others. My first problem is using seperators which I cant get? So for example in Text1 I have "Kevin" then when I press a command button I want it to add K_e_v_i_n, K__e__v__i__n and so on with "_" bewteen each letter to List1... So whats code or something which would let me do this? Thanks for help in advance guys and girls

Seperator
Got me a little problem that i can't seem to solve.

I got a small programm that calculates the numbers of two textboxes.
Now ppl here are more likely to fill in 19.95 instead of 19,95
That's my problem right there.
if textbox1.text is 19,95
and textbox2.text is 10
Then the outcome of multiplying is 199,50

But if:
textbox1.text is 19.95
textbox2.text is 10
then the outcome of multiplying is 19950

How can i make it so that the seperator can be a "," of a "."????

Greetz
Ghan

Function Seperator
How do you get the line seperator like in Visual Basic where it seperates fuctions from one another?

I want to create a generic code editor and would like to use that as a function seperator.

Decimal Seperator
i want to change system decimal seperator as dot instead of comma..because
commas doesnt seem when i use it to save to database in vb.Can anybody know code about it?

Radix Seperator
Hi,

Having problems reading a csv file on a workstation with Polish Windows running. Apparently, it involves adjusting the radix seperator? Can someone explain what this means and how to do it.

Many thanks

Neil

The Seperator Question!
Ok i have something like this in my List box,

243 38 38

they are seperated by the vbtab, what i need to get is only the first nukmber 243, it wont always be 3 digits , any help plz and thank you .

List Seperator
I do not really know how to explain what I am looking for, it for the
design aspects sort of thing, it like a list seperator I guess you
could call it. the find files in windows uses what I want so I have
taken a screen shot of what I am looking for it can be found at http://n0-access.hypermart.net/Examp.gif , I have seen this in vb apps before I
am not sure which ocx it is in or is done with the property value???

I am not looking for colums value, but the thing at the top the sort
of tool bar thing that tells you the value of each thing, in my
screen shot of what I am looking for the names are: "name" "infolder"
"size" "type", how do I add this sort of thing to a list box?

Is it the Microsoft Windows Common Control 5??? because with that tool
bar, it won't let me make the height of this tool bar anything other
than 540.28 when I have the captions filled in it will let me resize
them when the caption for each button is blank but as soon as I put in a
value for the caption it resizes it to 540.28 is there anyway to get
around that???

Also how do you put a value into the next column of a list box?


------------------
Mooose

1000 Coma Seperator
hi all

i m using text boxes in which i m asking users to input numbers and storing them in to the data base. my query is when user provide the input the value should be appear in thousnad separater comas i tryed after changing the text box properties but still its not working
can any 1 help me plz.

Komma Or Point Seperator
I'm having a problem with reading a simple number like "4.0".
The problem is that my program reads this as "40".

I've checked my computers settings and the 'decimal-seperator' is set to be a point (not komma), so there should be no problem.

When I add 1 line to my routine, which replaces "." with "," the program reads the correct input (4.0).

Does anyone know how I can solve this.

John

Menu List Seperator
How do you add a seperator in a menu?

Putting A Seperator In A Menu
How do u add a seperator to a menu

Verticle Window Seperator In VB
In VB, along the left side of the properties window, there's the feature of slider that window bigger and smaller, by moving it to the left. I used an API spi and it shows it's a "VBSlider" made by VB6.exe, Anyone know how i can make one? I need to make my program able to slide a window part back and forth

Date Seperator And Regional Settings
Is it possible to access the system regional settings and change values in a VB6 program? I have a command button on my form and when the user clicks it, I want it to change the regional settings date seperator field from / to . or - to / etc. It would be useful if I could also change the date format ie dd/MM/yy to dd/MM/yyyy etc.

Thanks.

Making A Menubar Like Seperator? [RESOLVED!]
Is it two lines joined together or something?

The line you see used when a seperator is on a menu, thats what im talking about.

How can you draw it?

Decimal Seperator And Excel 2000
Hi,

I have existing excel sheets which have to be transformed to XML files. I'm living in the Netherlands where as default the "," (comma) is the decimal separator. Now for the XML file the "." (dot) has to be the decimal separator.
At home I have Excel XP and there I have a function decimal separator which can change the symbol. In Excel 2000 this function doesn't exist. How can I change the decimal separator in Excel 2000.
Many thanks

Leendert de Geus

www.costengineering.nl

How To Change The System Date Seperator From VB?
hello

I have Designed one application.in that i want to change the system date separator form "-" to "/".

please post u r comments ....i need this urgently.

thanks

Srinivas

thanks
---------------------------------------------
Srinivas.

I Need To Know How To Code A MNU With Seperator Lines And Mouse Over Highlight...
I need to know how to code a MNU with Seperator lines and mouse over highlight for the main mnu's. So far VB5 will not allow me to use "-" as the Seperator bar for the main mnu's. normally I can use "-" for any sub mnu's just not the main one's...any ideas, examples, or URL's pointing to my answers would be greatly appreciated.

Thankyou for any time or effort,
Daniel christie

Grid Divided By A Fixed Image Seperator
Is there any Active X Control available to split the grid into two parts by a fixed image seperator.

Left and right hand part of the grid should have only horizontal bar.
and a vertical bar at the end of the grid which should make the left,right and fixed column seperator scroll in sync.

i am also attaching how the grid should look like.

very urgent.

Convert SQL Server SQL Syntax To MS Access Syntax
How can I convert SQL server SQL syntax to MS Access Syntax?
What is the differences, are there any conversion classes or modules I can
download.
I never used any SQL functions, just SELECTing, INSERTing, DELETEing and UPDATEing
and just the SQL function to get the latest added row, but that is not really a problem, I'll should be able to sort that out.

Thanx in advance
NL



Edited by - NLategan on 7/11/2004 9:15:21 AM

Any One Help Please ! VB Syntax Or Crystal Report Syntax Problem Help Please !
Hi friends,

 First I will say what I am trying to do.

     When I Choose the Itemname from two combo boxes
The report shows the Item details for the Items Between the two combo boxes.

There are two combo boxes CmbFrom and CmbTo
I am also passing the date here in the textbox txtfrom and txtto and assigning fdt=txtfrom.Text and tdt = txtto.Text
  
I face a problem, when I write the code like below. kindly clear me,

        dim sf as string
Private Sub cmdPreview_Click()

 sf = "{Stock.ItemCode} Between '" & cmbFrom.Text & "'and'" & cmbTo.Text & "'" & "AND" & "{Sales.InvDate} in Date(" & _
 Format(fdt, "YYYY,M,D") & ") to Date(" & _
 Format(tdt, "YYYY,M,D") & ")"

End Sub

it shows the error like this 'Error in formula <Record Selection>' "The remaning text doesnot appear to the part of formula".

instead of this when I write the code as below

Private Sub cmdPreview_Click()

 strsf = "{Stock.ItemCode} in'" & cmbFrom.Text & "' to '" & cmbTo.Text & "'" & "AND" & "{Sales.InvDate} in Date(" & _
 Format(fdt, "YYYY,M,D") & ") to Date(" & _
 Format(tdt, "YYYY,M,D") & ")"

End Sub

the report is showing the correct value whe I choose the very First Item in the cmbFrom combo and last Item in the cmbTo comb, but when I choose a Item in the middle order from CmbFrom and CmbTo combobox
it is not showing all the items between the two combo box. it shows only the one item which I choose in CmbFrom combo box. but i need to show all the Items in report between the two combo boxes.

Kindly correct me the code or suggest me how to execute it, or if there is any other way kidnly reply.

Thank you very much,
Chock.
Thank you very much,
Chock.


 


<HTML>
<B><font color="#008000">HAVE A NICE DAY !</font></B>
<HTML>

Edited by - chs on 2/5/2003 4:19:35 AM

Winsock State 8 - Peer Closes The Connection Leaving Winsock High And Dry
I am debugging some web/proxy-serving code. I am stumped.

I get Winsock state 8 - Peer is closing the connection
Then Winsock error message wrong protocol or connection state.

It seems to me that Winsock closes before it can finish sending all of its data.

How can I keep Winsock in state 7 - Connected?


Thanks...

Winsock Error (System Lockup Upon Winsock Execution)
Has anyone encountered an issue when running the winsock command and either a .listen or .connect locks up your VB Studio? This is occurring on my system and I'm not sure if its a problem with my current DLL or if I'm just not doing something correctly.

Please help.

Chris, Baltimore.

Winsock - Send PictureBox Contents Thrue Winsock?
Hey all, is it possible to send the contents of a PictureBox thrue a Winsock?

I know i can save the contents first to file and then send as file, but wondering this is possible, the purpose is in my chat project i have a webcam capture feature wich works fine, but i can't figure out how i can send this stream, did some searches but not found any results about it.

=============================================
aka Red2048.

Very Frustrating Winsock Bug.. Winsock Stops Responding After A While.
I have about 100 winsocks in an array handling a bunch of tasks.

The program seems to work fine for a while, but then for no reason, winsock stops responding. I can receive and send thosuands of packets before this happens but when the bug occurs it is extremely frustrating.

Winsock seems to die completely. DataArrival never fires, I cant make new connections (Always stuck on 'Connecting..'), its a mess. Closing the program and reopening it does not solve the problem - I have to close VB6 entirely and reopen it for the application to work again.

Has anyone dealt with something like this in the past?

I have no idea whats wrong

Winsock Error &lt;winsock.getdata Strdata
Hi

I am using winsock control named tcpclient in my application.
When i call the statement as

tcpclient.getdata strdata

It raises an error showing as

Runtime Error : "10054"
The connection is reset by remote side

I don know why this error is coming pls help me if uve any idea


Thanx

Will Winsock Get Timedout? Can Do Login On Winsock.connect?
Hi all,
Just wondering, let say I connect to a server using Winsock and leave the connection open... does Winsock timeout or close that connection? If yes, how long winsock give before it timeout/close the connection?

Is it possible to do a login on winsock.connect; ie: winsock.connect userid, pwd? I'm thinking if possible everytime i connect, i pass the userid and pwd to the server for validation... if all correct than accept the connection else reject... is this possible?

Thank You
Regards

WINSOCK CONTROL Vs WINSOCK REFERENCE
Why with a Winsock refernce events don't work and with a Winsock control events work?
"public withevents MySock as winsock". With this declaration, I can't use events (like connectionrequest ecc.).
With a WinSock control I can use events. WHY????

Winsock API Webserver (not Winsock Control)
Hi,
I'm trying to do a winsock webserver, that can handle lots of connections at once.
each new connection request creates a new instance of the winsock control
ie load winsock(1).....etc
it needs to be able to handle 200 users but it looses connection requests every so often and so some people cant connect I think this is because the winsock control cant handle so many connections at once. Would coding using the WIN API be better (quicker)???
Thanks
Paul

WinCE Winsock And Regular Winsock
Hello all

Is there a certain way that win CE winsock sends its data? for example.

in the regular winsock i do something like
winsock.senddata "Hello World"

in the CE winsock i msgbox the data that is received and it is in one msgbox. However, if I turnaround and send something from the CE winsock to the regular windows winsock i would get two msgboxes one containing the first letter of the message, and a second box containing the rest of the message? Any ideas?

ActiveX DLL's, Winsock And Winsock Events
If I create an ActiveX DLL that has an winsock control in it, do the events for the winsock control still occur?

Flushing In Winsock Control And Winsock API
I used to work in Java Sockets previously and there I have been using flush method of the associated stream with Socket class to make sure that the data I sent using Sockets is successfully sent; simple to flush the Socket.

But, here in Vb I can find any function or method fulfilling the same purpose. Can anyone give me some idea about how to do it with Winsock Control or Winsock API?

Normally winsock works quiet well but in my previous project I faced a related problem about transmitting data. Therefore, while using it for the second time, I am a concious about it and working on the solution to the 'data delay' problem before working on the actual system.

thanx

Syntax
Hi there,
Using a rich text box, how could I colour as you type kinda thing. I'm making a php script writter, so it would need to be for the php syntax colours.

So, how can I colour ; (end of line) as you type, and colour any thing after " untill you reach the next "?

-Neo

A Little Syntax Help
What would be the right way to right this so it works?


Code:
If sock1.sock <> active Then
winsock.remotehost = "66.444.2.2.1
winsock.remoteport = 25
winsock.connect
else
Blah blah
Like the top line is wrong. What is correct to find if the socket is already active?

VB Syntax
Hi, I'm new to VB and using Access

I want to be able to store values of the control (textbox) into a table using VB.

How to I go about it?

Vb Syntax
Hi there,
I'm new to vb6 programming and I'm creating a process using automation. I want to accomplish 2 things:

- Open a new document based on a customized template
- Insert a table(s) at a specific point within the new document.

Thanks Chuck Hartford

Is It Right Syntax?
Hi friends,
I try to have two nested block am I wright in syntax?

Thanks,
Elahe

Code
-------
If StDev(Log(dblTest)) > 2 Then
dblTest = Log(dblTest) / Log(10)
Else
If 0 < dblTest And dblTest < 1 Then
'........
ElseIf dblTest > 1 Then
'.........
End If
End If

Help With Syntax Please
I am using the following command to set a variable to the value of a subform on for "laptop user".

Set MachineNames = "laptop users"!machine_name

I get this error:

"compile error: Expected end of statement."


What am I doing wrong, please?

Thanks in advance

PS: Please note the space in the form name. the complete parent/child location of the field is:

form-tabctrol-page-subform-field

VBA Syntax
I am trying to kick off a report through VBA using a where clause which I can get to work for a numeric but I can't seem to get it to work for a literal.

Below is the syntax I am using for a numeric could anyone please tell me what I have to change for it to work with a literal ie "Marsh"

DoCmd.OpenReport stDocName, acPreview, , "[qryNotificationsByBroker]![BrokerAddressID] = 112"

I would be grateful for any help

Thanks

Conor M Hamill

Need Some Syntax Help Please.
Hi I'm a novice at VB so if this question seems silly, please excuse me. I'm trying to program an excel macro for a datasheet download that I frequently use at work. Because the datasheet can vary in the number of columns and rows I need to program in relative formulas to account for this. At the beginning of the macro I use a counter to determine the number of rows and columns and assign those values to a variable.

ColCount = Selection.Columns.Count
RowCount = Selection.Rows.Count

I then want to use those values to calculate the relative formulas. Can anyone tell me the proper syntax for this? When I use the macro recorder I get something like this:

ActiveCell.FormulaR1C1 = "=R[-12]C/R14C"

I want to substitute the hard numbers in the formula with the values stored in the variables. Also how do I enter a placeholder ($) into the above formula? I have tried to play with it a bit and have tried to do a bit of research without much luck. Thanks for the help!

Syntax Help
hi all ,

i have a code like his Sql = Sql & "A1" where sql is defined as string
and if i have to replace it with "A2" but i want to make it take value from the i value in the for loop

for( i=1 to 3) for every loop i want it to show as A1 , A2 and A3

Better Syntax
Is there a better way to write this function? seems a bit long. It's adding cell values and setting it to a variable.


Code:
intSpotValue = Range(somecell).Value + Range(somecell1).Value + Range(somecell2).Value + Range(somecell3).Value + Range(somecell4).Value + Range(somecell5).Value


Thanks

VBA Syntax?
I want to code a module below using 2 worksheets i.e "Data" and "Query" but not good in vba code.

Look in the datasheet at row2 for a value of 1, if found, then look at next row i.e. row3 for value found in the querysheet. If the individual value found is the same as in the querysheet individual column, it will write the date & rowno of row2 of datasheet and the value of 1 or 0 will be insert accordingly to the column into the querysheet.

This macro will run the loops from row2 of datasheet until the last row. New found items/values will be written row after row in the querysheet. Can anyone help.

Some questions concerning VBA syntax.

Q1) To use a workbook/worksheet
Q2) Do whil not eof() & Enddo.
Q3) Checking a range of cells for value
Q4) Skipping next row
Q5) Writing value to particular cell into particular cell
Q6) Do Case & Endcase with Select.

Can someone tell me what are these syntax in VBA.

Thank you.

Help With Syntax!
Is there a place where a Visual Basic user can get a list of all syntax? Whenever I go to work on a program I always run into code that I don’ know how to use and I can’t seem to find it listed anywhere and it’s often just a simple matter of wording, ordering the syntax correctly.
I also have another question. Can anyone please explain how a variable, function, and statement are different? I use them all the time but what are they fundamentally?

Thanks

Help With Some Syntax
Code:

If txtUsername <> Mid(c001A, 56, 1)
I am very familiar with programming in general (Experience with Java and C/C++. I've also done some VBA.). Now, I cannot find any good documentation for VB and I don't care for purchasing a book at this time.


<>
Equal operator?

Mid(c001A, 56, 1)
c001A is a constant... and 56 and 1 look like bounds... what does this function return?

Any good documentation links would also be very helpful!

Ryan

Copyright © 2005-08 www.BigResource.com, All rights reserved