Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Connecting to a server/database.
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Mint




PostPosted: Wed Jun 16, 2004 8:35 pm   Post subject: Connecting to a server/database.

I am sort of new to VB blah blah blah... I was just woundering how I could get a a program client to connect to a server running server software (that would be custom made).

Basicaly I was woundering if anyone could inform me on making server and client software and to make the client side connect to the server with a specific IP and the like. I need the computers to be able to communicate with the server and write to and create a specific text files. (Each user that signs up gets a text file to store stats or whatnot, I know how to make the login and to create the text file on my machine but I have no idea how I can make the computer connect to one running the software.)

-How complicated is it?
-How can I do it?

Thanks.

Your's truly,

~Captain Me
Sponsor
Sponsor
Sponsor
sponsor
Mint




PostPosted: Wed Jun 16, 2004 9:34 pm   Post subject: Moo.

Oh, and any links to tuts that could help would be appreciated. That and a basic outline of what I would need if possible.

Thanks.
Mint




PostPosted: Thu Jun 17, 2004 11:37 am   Post subject: Wow.

Wow, I can't can't believe that I didn't remember that other post ("Network Program" by w00rm). I will most likely post more in this topic soon though. But still if anyone has anything at all that would help please post. Thanks.
Tony




PostPosted: Thu Jun 17, 2004 2:33 pm   Post subject: (No subject)

sockets come to mind... but I honestly haven't done any networking in VB Confused
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Mint




PostPosted: Thu Jun 17, 2004 4:27 pm   Post subject: (No subject)

tony wrote:
sockets come to mind... but I honestly haven't done any networking in VB Confused


Thanks for the feedback, it's really too bad there aren't many people who frequent the VB forums.
Tony




PostPosted: Thu Jun 17, 2004 10:44 pm   Post subject: (No subject)

yeah, it really is a shame...

I suspect the reason being is that so very few schools cover VB. other then Turing, its mostly C++ or Java Confused
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Mint




PostPosted: Fri Jun 18, 2004 11:37 am   Post subject: (No subject)

tony wrote:
yeah, it really is a shame...

I suspect the reason being is that so very few schools cover VB. other then Turing, its mostly C++ or Java Confused


Yeah, that and most people don't bother to try to learn basic, casting it aside as a useless language. Awell more for the rest of us ...or something.
Brightguy




PostPosted: Fri Jun 18, 2004 9:38 pm   Post subject: Re: Connecting to a server/database.

At first I thought you were talking about a FTP server... must read properly from now on...

Tony's right - if you use WinSock it shouldn't be a problem. Have the server application create the text file in Winsock's DataArrival event.

To connect to another computer, use WinSock's Connect method. First you must know the server's IP address (RemoteHost property) and the "listening" port (RemotePort property).

For the server, set the LocalPort property to the "listening" port and then use the Listen method.

Use the SendData method to send data, and the GetData method to retrieve the data (there is a DataArrival event).
Sponsor
Sponsor
Sponsor
sponsor
Mint




PostPosted: Fri Jun 18, 2004 10:14 pm   Post subject: (No subject)

Do you have to pay for Winsock, is it free? I need to know so I can 'buy' it.
Brightguy




PostPosted: Fri Jun 18, 2004 11:37 pm   Post subject: Re: Connecting to a server/database.

I think the Winsock control comes with VB, at least in some versions. So check if you have it installed... On the menu, go to Project > Components... and then check Microsoft Winsock Control.

If you don't have it installed search for MSWINSCK.OCX and then place that file in your C:\WINDOWS\SYSTEM directory. Some applications that require Winsock automatically install/register it, so I guess it can be distributed...
Mint




PostPosted: Fri Jun 25, 2004 1:43 pm   Post subject: Re: Connecting to a server/database.

Brightguy wrote:
I think the Winsock control comes with VB, at least in some versions. So check if you have it installed... On the menu, go to Project > Components... and then check Microsoft Winsock Control.

If you don't have it installed search for MSWINSCK.OCX and then place that file in your C:\WINDOWS\SYSTEM directory. Some applications that require Winsock automatically install/register it, so I guess it can be distributed...


Thanks for the help although I haven't gotten around to trying it yet. I did however find the file and put it in my \system directory.
Paul




PostPosted: Sat Jun 26, 2004 9:04 pm   Post subject: (No subject)

tony wrote:
yeah, it really is a shame...

I suspect the reason being is that so very few schools cover VB. other then Turing, its mostly C++ or Java Confused

Well u can expect me to be here next year, grade 11 compsci, contains VB, but first 3 months of turing, since grade 10 compsci isn't a pre-requisite for grade 11.
wtd




PostPosted: Tue Jul 06, 2004 5:00 pm   Post subject: (No subject)

Mint wrote:
tony wrote:
yeah, it really is a shame...

I suspect the reason being is that so very few schools cover VB. other then Turing, its mostly C++ or Java Confused


Yeah, that and most people don't bother to try to learn basic, casting it aside as a useless language.


It pretty much is, now.

VB.NET is essentially C# with a more verbose syntax that looks a bit like VB6, but is completely different in reality. Microsoft is clearly pushing C# first and foremost, and VB.NET is there to make VB programmers feel like MS cares about them.
Dan




PostPosted: Tue Jul 06, 2004 9:27 pm   Post subject: (No subject)

Mint wrote:
tony wrote:
yeah, it really is a shame...

I suspect the reason being is that so very few schools cover VB. other then Turing, its mostly C++ or Java Confused


Yeah, that and most people don't bother to try to learn basic, casting it aside as a useless language. Awell more for the rest of us ...or something.


You can keep it all for your self, even turing is more protable then VB. (there is truing for mac and some rummers of verson for linux).
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Tony




PostPosted: Tue Jul 06, 2004 9:29 pm   Post subject: (No subject)

yes dan, it's really a shame that we can't run a VB database management app on your toaster... Laughing
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 19 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: