Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection String - SQL Server 2005

Status
Not open for further replies.

samurrai

MIS
Mar 10, 2009
20
US
I'm trying to connect to a SQL server 2005 database on another server. This is my 1st attempt at using Crystal to connect with a SQL db. I assume I need to set up an ODBC connection (the option I see is OBDC (RDO)). I've been using the examples on connectionstrings.com to create a connection string. I'm not sure which string format I ought to use, or which values go where.

I know the server assigned name and the server ip address (which do I use?) I know the database name. I have a working user name and password. We use windows authentication to connect to SQL Server 2005, so I assume my username is domain\username in the connection string.

I'm currently seeing an error whenever I try to input any combination of values to make up a string. The error is: "Logon Failed. Details: Can not find DNS in Connection String". I'm not sure what that means. It's possible I have the entire string wrong or just one piece. (Beats me!)

Maybe there's another way to go about connecting entirely?

If someone could help a novice out I'd be very appreciative!

Thanks!

 
I'm not 100% sure what you are looking at. If you would like a different way to look at setting up an ODBC connection try this site:


I personally have never tried to use one of the strings they are talking about on connectionstrings.com. I always go throught the administrative tools to the Data Source (ODBC). Then it is just a matter of choosing a new system DSN and following the wizard. It's maybe not an option for you but I thought I'd mention it. Can't hurt right?
 
I gave up on OBDC (RDO) and I'm not trying to connect via OLE DB. I'm getting a new error:

Login Failed.
Details: ADO Error Code: 0x80040e4d
Source: Microsoft OLE DB provider for SQL Server
Description: login failed for user 'my domain\my username'
SQL State: 42000
Native Error: 18456 [Database Vendor code:18456]

Our Sql Server 2005 uses windows authentication. So I do have a valid windows username & pw that can connected directly with Sql Server Management Studio.

What can I do to connect to the database via Crystal Reports?


 
Hi,
Yes, SqlServer will expect you to be using a validated Windows user account that has permission to access the database.




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Got it working with ODBC.

Thank you for the reply!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top