Click here to Skip to main content
15,895,667 members
Home / Discussions / Database
   

Database

 
GeneralRe: query inside a dataset Pin
ekolis31-May-04 13:54
ekolis31-May-04 13:54 
GeneralRe: query inside a dataset Pin
fuel2run31-May-04 22:02
fuel2run31-May-04 22:02 
GeneralProblems porting a DataSet from SQL Server to XML Pin
Jordan Breckenridge24-May-04 6:23
Jordan Breckenridge24-May-04 6:23 
GeneralADO and Excel File Pin
bigBA24-May-04 1:45
bigBA24-May-04 1:45 
GeneralRe: ADO and Excel File Pin
-Dr_X-26-May-04 17:17
-Dr_X-26-May-04 17:17 
GeneralDBase file table names Pin
IJay24-May-04 0:27
IJay24-May-04 0:27 
GeneralProblem connecting to sql with C# and ASP.NET Pin
Aviv Halperin23-May-04 10:38
Aviv Halperin23-May-04 10:38 
GeneralRe: Problem connecting to sql with C# and ASP.NET Pin
Grimolfr24-May-04 3:30
Grimolfr24-May-04 3:30 
In your first example, OleDbConnection conn = new OleDbConnection(@"Provider=SQLOLEDB;User ID=sa;Initial Catalog=master;Data Source=(local);");, you didn't provide a password for the 'sa' account. But in your statement about how you installed MSDE, you said that you set the password to 'sa'. So, for this connection string, you should add Password=sa;. However, it is recommended that you not use a system administrator account to connect to the database from an application.

In your second example, you are using integrated security, which means that the connection is made to the database using the currently active Windows login. I assume from the username in the error message, and your statement that it's the machine name, that you're writing a service, and it's set up to run using the system account. This would work, but you'll have to use a tool (or write an app) to configure the database server to allow this account to login, and give it access to the specific database that it needs to access. Note that since you set Integrated Security=SSPI;, the User Id=sa; part of the connection string is ignored.


Grim
(aka Toby)
MCDBA, MCSD, MCP+SB

GeneralConnection String for Database access Pin
Ali Alaradi22-May-04 19:55
Ali Alaradi22-May-04 19:55 
GeneralRe: Connection String for Database access Pin
Hesham Amin23-May-04 11:12
Hesham Amin23-May-04 11:12 
GeneralSQL Pin
Member 110684620-May-04 21:02
Member 110684620-May-04 21:02 
GeneralRe: SQL Pin
Hesham Amin20-May-04 21:48
Hesham Amin20-May-04 21:48 
Generaltext to ntext Pin
ShankarPS20-May-04 16:59
ShankarPS20-May-04 16:59 
GeneralRe: text to ntext Pin
Grimolfr21-May-04 4:17
Grimolfr21-May-04 4:17 
GeneralRe: text to ntext Pin
ShankarPS23-May-04 19:54
ShankarPS23-May-04 19:54 
GeneralRe: text to ntext Pin
Grimolfr24-May-04 4:36
Grimolfr24-May-04 4:36 
GeneralDataTable Pin
IamADotNetGuy20-May-04 10:35
IamADotNetGuy20-May-04 10:35 
GeneralRe: DataTable Pin
Jackiemcki25-May-04 12:39
Jackiemcki25-May-04 12:39 
GeneralSQL Server Pasword Changing Pin
Imtiaz Murtaza19-May-04 21:09
Imtiaz Murtaza19-May-04 21:09 
GeneralRe: SQL Server Pasword Changing Pin
Aryadip19-May-04 21:36
Aryadip19-May-04 21:36 
GeneralRe: SQL Server Pasword Changing Pin
Grimolfr20-May-04 1:49
Grimolfr20-May-04 1:49 
GeneralRe: SQL Server Pasword Changing Pin
mozka20-May-04 14:14
mozka20-May-04 14:14 
GeneralEncrypt stored procedure Pin
CT CHANG19-May-04 19:24
CT CHANG19-May-04 19:24 
GeneralRe: Encrypt stored procedure Pin
Grimolfr20-May-04 1:44
Grimolfr20-May-04 1:44 
GeneralRe: Encrypt stored procedure Pin
CT CHANG20-May-04 3:53
CT CHANG20-May-04 3:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.