Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connection String Problem
Message
From
05/02/2005 21:59:53
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
C# 1.1
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
00983149
Message ID:
00984262
Views:
24
>Greetings,
>I am unable to connect to my SQl Database with this connection string (see below) from within a C# program. Same parameters work fine in SQL Query Analyzer when connecting.
>
>This is the code:
>
>public class DataAccessSql : DataAccessBase
>{
>public DataAccessSql()
>this.ConnectionString= "server=myserver;uid=sa;pwd=mypass;database=Northwind;";
>
>Many thanks, Todd

Probably SQL server is configured for Windows authentication (good and recommended way).
Query Analyzer or another local application would succeed with that connection string as behind the scenes it'd use windows authentication. You might try in Query analyzer with a dummy password succeeding (might need a valid connection first, connect, disconnect and try dummy pw).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform