Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2008 > SQL Server 2008
|
SQL Server 2008 General discussion of SQL Server *2008* version only - not related to a specific book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2008 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 29th, 2010, 06:50 AM
Authorized User
 
Join Date: Oct 2007
Posts: 46
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via MSN to debbiecoates
Question SQL 2008, Connection String

Hello

i had a little connection funtion that I could run from either vb or Access that would allow me to connect to our SQL Server 2000 with a trusted connection.
when we upsized to SQL Server 2005 Express I managed to adapt this, but I am having real problems with SQL Servr 2008.

The database is stored locally on the server, but I think our systems guy has set it up with sql Security instead of both, so now I have to add the sa password to my connection string. This isn't a problem as I have the sa password, but when I am running my function, it still seems to be using my normal network login and not the sa password i put in.

This is the code I am using

Dim cnn As ADODB.connection
Set cnn = New ADODB.connection
cnn.Open "Driver={SQL Server};Server=SQL-MAYTAS;Database=CRT1174;User ID=sa;Password=xxxx;Trusted_Connection=False;"

I would appreciate any help, I am really stuck on this
Thank You
 
Old April 29th, 2010, 07:10 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Please check the following link for usage of connections strings for SQL 2008
http://www.connectionstrings.com/sql-server-2008
__________________
Om Prakash Pant
Click the "Thanks" button if this post helped you.
 
Old April 29th, 2010, 07:19 AM
Authorized User
 
Join Date: Oct 2007
Posts: 46
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via MSN to debbiecoates
Default

I have, and as far as I can see my connection string is the same as in the heading Standard Security alternative syntax :

Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connecti on=False;

However, even thought I am putting a username of sa and the password of xxxx, its till looking for my domain name. rather than logging on a sa
 
Old April 29th, 2010, 07:53 AM
Authorized User
 
Join Date: Oct 2007
Posts: 46
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via MSN to debbiecoates
Default RESOLVED

I've sorted it, it was becasue i had use trusted connection on the end.
 
Old November 21st, 2013, 02:02 PM
Authorized User
 
Join Date: Jul 2006
Posts: 73
Thanks: 11
Thanked 1 Time in 1 Post
Smile Connected SQL Server 2008 with jdbc

Problam Connected SQL Server 2008 with jdbc





Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection String with sql db martin330 Classic ASP Databases 0 April 26th, 2010 09:40 AM
SQL connection string naeem.net SQL Server ASP 0 July 10th, 2007 02:17 PM
SQL Server Connection String Nicky2k Classic ASP Basics 4 January 13th, 2005 05:22 AM
connection string for sql server rj1406 ASP.NET 1.0 and 1.1 Basics 6 September 16th, 2004 02:49 PM





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