Click here to Skip to main content
15,914,780 members
Home / Discussions / Database
   

Database

 
AnswerRe: Drop Constraints in Oracle SQLPLUS Pin
Wendelius12-Jan-09 2:31
mentorWendelius12-Jan-09 2:31 
QuestionReset autonumber (ID) in SQL Server Pin
Matjaz-xyz11-Jan-09 19:53
Matjaz-xyz11-Jan-09 19:53 
AnswerRe: Reset autonumber (ID) in SQL Server Pin
Matjaz-xyz11-Jan-09 20:31
Matjaz-xyz11-Jan-09 20:31 
Questionsql connection error Pin
staticv11-Jan-09 8:01
staticv11-Jan-09 8:01 
AnswerRe: sql connection error Pin
Wendelius11-Jan-09 10:28
mentorWendelius11-Jan-09 10:28 
GeneralRe: sql connection error Pin
staticv12-Jan-09 0:23
staticv12-Jan-09 0:23 
GeneralRe: sql connection error Pin
Wendelius12-Jan-09 3:36
mentorWendelius12-Jan-09 3:36 
AnswerRe: sql connection error Pin
Henry Minute11-Jan-09 10:35
Henry Minute11-Jan-09 10:35 
manzoor10 wrote:
SQL Server does not allow remote connections


I have had this error in the past. It was along time ago but I am pretty sure that I remember the cause.


manzoor10 wrote:
"Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\DCV_DB.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True";


This line from your code is a string. To use the '\' character in C# there are two options

1. Convert all the '\' characters in your string to '\\' (C# requires that you 'escape' '\' (amongst other characters) 'escaping' means precede it with the '\' character. This means that you end up with "Data Source=.\\SQLEXPRESS;Attach......." and continue right through the path for the database which would then start "AttachDBFilename=C:\\Program Files\\Microsoft.......................".

2. Precede the entire string with '@' which means I want you to use this string exactly as I have typed it.
Quote from MSDN Help
The advantage of @-quoting is that escape sequences are not processed, which makes it easy to write, for example, a fully qualified file name:

@"c:\Docs\Source\a.txt" // rather than "c:\\Docs\\Source\\a.txt"

Try either of these.

[Mod]
Darn it, beaten to the punch again!
[/Mod]

Henry Minute

If you open a can of worms, any viable solution *MUST* involve a larger can.

QuestionInstall SQL Server on Vista Pin
George_George11-Jan-09 2:41
George_George11-Jan-09 2:41 
AnswerRe: Install SQL Server on Vista Pin
Wendelius11-Jan-09 3:05
mentorWendelius11-Jan-09 3:05 
GeneralRe: Install SQL Server on Vista Pin
George_George12-Jan-09 0:21
George_George12-Jan-09 0:21 
GeneralRe: Install SQL Server on Vista Pin
Wendelius12-Jan-09 2:26
mentorWendelius12-Jan-09 2:26 
AnswerRe: Install SQL Server on Vista Pin
Colin Angus Mackay11-Jan-09 3:20
Colin Angus Mackay11-Jan-09 3:20 
GeneralRe: Install SQL Server on Vista Pin
George_George12-Jan-09 0:24
George_George12-Jan-09 0:24 
AnswerRe: Install SQL Server on Vista Pin
Hamid_RT15-Jan-09 2:26
Hamid_RT15-Jan-09 2:26 
GeneralRe: Install SQL Server on Vista Pin
George_George15-Jan-09 18:36
George_George15-Jan-09 18:36 
Questionis there the sql syntex Limit in MS SQL? Pin
neodeaths11-Jan-09 0:44
neodeaths11-Jan-09 0:44 
AnswerRe: is there the sql syntex Limit in MS SQL? Pin
Reza Raad11-Jan-09 1:09
Reza Raad11-Jan-09 1:09 
Questionhow do i make a special sql statment filter? Pin
neodeaths10-Jan-09 22:55
neodeaths10-Jan-09 22:55 
AnswerRe: how do i make a special sql statment filter? [modified] Pin
Wendelius10-Jan-09 23:10
mentorWendelius10-Jan-09 23:10 
GeneralRe: how do i make a special sql statment filter? Pin
neodeaths11-Jan-09 0:43
neodeaths11-Jan-09 0:43 
QuestionWTL/ATL Pin
manosza10-Jan-09 21:21
manosza10-Jan-09 21:21 
AnswerRe: WTL/ATL Pin
Wendelius10-Jan-09 21:58
mentorWendelius10-Jan-09 21:58 
QuestionUpdating table based on search critea from two tables. Pin
Sunset Towers10-Jan-09 1:54
Sunset Towers10-Jan-09 1:54 
AnswerRe: Updating table based on search critea from two tables. Pin
Wendelius10-Jan-09 2:18
mentorWendelius10-Jan-09 2:18 

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.