Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connection String Problem
Message
De
05/02/2005 21:59:53
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
00983149
Message ID:
00984262
Vues:
25
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform