Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 26th, 2004, 06:10 AM
Registered User
 
Join Date: Mar 2004
Location: Lahore, , Pakistan.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to simsimlhr Send a message via Yahoo to simsimlhr
Default Connecting To DataBase in WAN

I want to connect to database in the WAN.The Detail is as follows
The Database would be in the server. DBMS would be SQLSErver.
The Client Application would be installed in the client side .
The user will interact with the database using wan.How Can we do that.
What classes would we use.
Any url for article.
PLease Do Reply.
Qasim Raza


Reply With Quote
  #2 (permalink)  
Old March 28th, 2004, 04:32 AM
Friend of Wrox
Points: 3,558, Level: 25
Points: 3,558, Level: 25 Points: 3,558, Level: 25 Points: 3,558, Level: 25
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: California, USA
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

i couldnt get u clearly but if u r trying to develope a site in Internet using SQL Server & ...
after creating, development, test, upload & ... u'll only change [u]SERVER_NAME</u> in connection string.
Thats it! I hope i was right.

Always:),
Hovik Melkomian.
Reply With Quote
  #3 (permalink)  
Old March 29th, 2004, 02:04 AM
Registered User
 
Join Date: Mar 2004
Location: Lahore, , Pakistan.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to simsimlhr Send a message via Yahoo to simsimlhr
Default

I have made it by using TcpChannel.
Server Code would be
TcpChannel channel = new TcpChannel (1099);
ChannelServices.RegisterChannel(channel);
RemotingConfiguration.RegisterWellKnownServiceType (typeof(Form1),
                "Form1",
                WellKnownObjectMode.Singleton);

Client Code Would be
TcpChannel channel = new TcpChannel ();
ChannelServices.RegisterChannel (channel);
Form1 keeper= (Form1) Activator.GetObject (typeof( Form1 ),
                "tcp://192.168.7.130:1099/Form1");
keeper.Add(textBox1.Text);


Where Add functin is of server.
If need to know further.I m ready to told anybody.
Qasim Raza


Reply With Quote
  #4 (permalink)  
Old March 29th, 2004, 04:41 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Connecting to a WAN based server will be no different than a LAN or local server. As long as you can access it and you don't have some weird router or VPN problems.

For MSSQL Server, use the System.Data.SqlClient namespace classes.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
connecting to database stealthdevil Visual Basic 2005 Basics 2 November 5th, 2007 01:31 PM
Connecting to a database mfos Classic ASP Basics 0 December 20th, 2006 07:59 AM
connecting to a database nehalw VB.NET 0 January 5th, 2005 05:59 AM
Connection Error over WAN Gaz LG Danha Pro VB Databases 0 November 4th, 2004 05:21 AM
database connecting princeofdhump Classic ASP Databases 3 August 7th, 2004 02:46 AM



All times are GMT -4. The time now is 09:59 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.