 |
| ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application . |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ADO.NET 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
|
|
|
|

May 27th, 2004, 07:45 AM
|
|
Friend of Wrox
|
|
Join Date: May 2004
Posts: 120
Thanks: 0
Thanked 1 Time in 1 Post
|
|
how i can connect to remote sql server db
i need help about how i can connect to sqlserver db using ado.net(sqlClient NameSpace)
in a remote macine using remote db using ip address and user id and password
__________________
YoOrD .
Beauty is not on the face
Beauty is on the heart
~~<<Ghibran Khalil>>~~
|
|

May 27th, 2004, 09:47 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
You can check out the SDK that comes with the .NET framework. It features loads of examples. Also, a search on Google for SQL Server ADO.NET connect should yield you lots and lots of good examples.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

May 27th, 2004, 11:23 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
|
|
No IP is needded! Just make a Cunnection string as u do for ur local Server & then connect!
Always:),
Hovik Melkomian.
|
|

May 28th, 2004, 02:17 AM
|
|
Friend of Wrox
|
|
Join Date: May 2004
Posts: 120
Thanks: 0
Thanked 1 Time in 1 Post
|
|
hi
but yet i cant to solve my problem .
to all any to tell me how i can connect to remote sqlserver machine .
with special thanx mzz
|
|

May 28th, 2004, 02:22 AM
|
|
Friend of Wrox
|
|
Join Date: May 2004
Posts: 120
Thanks: 0
Thanked 1 Time in 1 Post
|
|
hi mr imar
i cant find any good code sample i u can please give me a sample code address or good links that guide me to do it .
how i can connet without using ip address and other things that how i can setup my web.config file it is very hard to use (send me a good sample of web.config)
with special thanx to u.
yoord
|
|

May 28th, 2004, 02:24 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
What do you want us to do? Create a full blown working example for you?
I think you need to do a bit of research yourself. Like I suggested before, search Google for "SQL Server ADO.NET connect". You'll get plenty of examples about connecting to SQL Server. Connecting to a remote machine is not that much different; all you need to do is use a different server's IP address and you may need to specify some additional attributes on the connection string. The link I posted earlier shows you how to create the connection string you need.
What more do you want? This should be enough to get you going, I'd say, right?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

May 28th, 2004, 02:33 AM
|
|
Friend of Wrox
|
|
Join Date: May 2004
Posts: 120
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Quote:
quote:Originally posted by melvik
No IP is needded! Just make a Cunnection string as u do for ur local Server & then connect!
Always:),
Hovik Melkomian.
|
please tell me how can setup up this connection(details of it).
with thanx yoord
|
|

May 28th, 2004, 02:37 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Oh come on!. I think you should *read* a little. Follow the link I posted. This will show you a connection string like this:
oSQLConn.ConnectionString = "Network Library=DBMSSOCN;" & _
"Data Source=xxx.xxx.xxx.xxx,1433;" & _
"Initial Catalog=myDatabaseName;" & _
"User ID=myUsername;" & _
"Pas sword=myPassword"
Change xxx.xxx.xxx.xxx with the IP address of your server, fill in the username and password, and off you go.
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

May 29th, 2004, 03:34 AM
|
|
Friend of Wrox
|
|
Join Date: May 2004
Posts: 120
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Quote:
quote:Originally posted by Imar
Oh come on!. I think you should *read* a little. Follow the link I posted. This will show you a connection string like this:
oSQLConn.ConnectionString = "Network Library=DBMSSOCN;" & _
"Data Source=xxx.xxx.xxx.xxx,1433;" & _
"Initial Catalog=myDatabaseName;" & _
"User ID=myUsername;" & _
"Pas sword=myPassword"
Change xxx.xxx.xxx.xxx with the IP address of your server, fill in the username and password, and off you go.
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
thanx its seems that i solve it :)
but i get another problem with form that action attribute of asp.net form replaced with form name instead of what next page that we set in action attribute how i can solve it.
with thanx
yoord
|
|

May 29th, 2004, 04:26 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
You can't, really. ASP.NET pages will post back to themselves. The action attribute will always point to the current page, to enable the PostBack mechanism.
You can take a look here: http://www.codeproject.com/aspnet/CHtmlForm.asp and here: http://www.experts-exchange.com/Prog..._20966296.html for some ideas on how to work around it.
My suggestion is to try and use the PostBack mechanism, instead of posting to another page. You'll avoid a lot of problems....
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|
 |