Accessing Remote Sql Server

How to access a remote Sql server through windows Application

Page 1 of 1

4 Replies - 7909 Views - Last Post: 01 November 2008 - 07:56 AM Rate Topic: -----

#1 thava  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 180
  • View blog
  • Posts: 1,606
  • Joined: 17-April 07

Accessing Remote Sql Server

Posted 01 November 2008 - 05:34 AM

hi
there

is it possible to access a remote Sql server through a windows Application

if possbile pls Explain the steps

i need it urgently?
Is This A Good Question/Topic? 0
  • +

Replies To: Accessing Remote Sql Server

#2 n8wxs  Icon User is offline

  • --... ...-- -.. . -. ---.. .-- -..- ...
  • member icon

Reputation: 972
  • View blog
  • Posts: 3,878
  • Joined: 07-January 08

Re: Accessing Remote Sql Server

Posted 01 November 2008 - 05:41 AM

Google is your friend. See for example
http://aspnet101.com...ials.aspx?id=48
or
http://www.c-sharpco...105622AM/0.aspx
or
http://www.codeproje...pplication.aspx

I realize most of the code is c# but it should give you ideas. :)

This post has been edited by n8wxs: 01 November 2008 - 05:49 AM

Was This Post Helpful? 0
  • +
  • -

#3 thava  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 180
  • View blog
  • Posts: 1,606
  • Joined: 17-April 07

Re: Accessing Remote Sql Server

Posted 01 November 2008 - 05:53 AM

sorry i make a mistake
any way
thank you, i have found that similar one in msdn
but i need to know whether a windows application is access a sql server through the INTERNET
Was This Post Helpful? 0
  • +
  • -

#4 n8wxs  Icon User is offline

  • --... ...-- -.. . -. ---.. .-- -..- ...
  • member icon

Reputation: 972
  • View blog
  • Posts: 3,878
  • Joined: 07-January 08

Re: Accessing Remote Sql Server

Posted 01 November 2008 - 06:08 AM

Although the example code is accessing the SQL database on the local machine, the connection
is done through a TCP (Internet) channel:
//TcpChannel chan = new TcpChannel();
ChannelServices.RegisterChannel(new TcpClientChannel());
Hello obj = (Hello)Activator.GetObject(typeof(Hello),"tcp://localhost:8085/Hi");
DataTable dt=obj.GetData().Tables[0]; 


Change tcp://localhost:8085/Hi to tcp://some.sql.host.somewhere.com:sql-port-number".
Was This Post Helpful? 0
  • +
  • -

#5 thava  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 180
  • View blog
  • Posts: 1,606
  • Joined: 17-April 07

Re: Accessing Remote Sql Server

Posted 01 November 2008 - 07:56 AM

thank you for the link i found that
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1