Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #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


  #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.
  #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


  #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.


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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.