Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
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
 
Old April 22nd, 2004, 06:36 AM
Authorized User
 
Join Date: Apr 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default connecting to SQL DB through a domain

How do I change my SQL connection string to get to a SQL DB on a domain

This is what I currently have:

strConnectString = "data source=(local);initial catalog=LoansDB;integrated security=SSPI;persist security info=False;workstation id=(local)";

Any help will be appreciated

jan

dude_in_africa
__________________
dude_in_africa
 
Old April 22nd, 2004, 06:49 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

here's an example from http://www.able-consulting.com/ADO_Conn.htm

oConn.Open "Provider=sqloledb;" & _
           "Network Library=DBMSSOCN;" & _
           "Data Source=xxx.xxx.xxx.xxx,1433;" & _
           "Initial Catalog=myDatabaseName;" & _
           "User ID=myUsername;" & _
           "Password=myPassword"
Where:
- "Network Library=DBMSSOCN" tells OLE DB to use TCP/IP rather than Named Pipes
- xxx.xxx.xxx.xxx is an IP address
- 1433 is the default port number for SQL Server.
- You can also add "Encrypt=yes" for encryption

hth
Phil
 
Old April 22nd, 2004, 07:21 AM
Authorized User
 
Join Date: Apr 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanx worked like a house on fire

jan

dude_in_africa





Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting to remote Oracle DB BrianWren Pro VB Databases 2 August 22nd, 2007 03:46 PM
Connecting existing program to SQL Express DB jscammell VB Databases Basics 2 April 19th, 2007 02:03 PM
Connecting to Pubs DB on SQL server..easy !!! tumbleweed VB Databases Basics 2 January 12th, 2005 04:40 PM
Connecting to Access Db mattastic Classic ASP Databases 3 October 14th, 2004 02:32 AM
Connecting to a DB from another server... dungey PHP Databases 1 May 7th, 2004 11:13 AM





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