Click here to Skip to main content
15,881,882 members
Home / Discussions / C#
   

C#

 
QuestionComboBox In DataGridView Pin
Thaer Hamael5-Aug-07 4:21
Thaer Hamael5-Aug-07 4:21 
QuestionTry to use C# code in C++ code as com instance ... Pin
Yanshof5-Aug-07 1:56
Yanshof5-Aug-07 1:56 
QuestionReading file as binary. Success. But...... Pin
Life as a Coder5-Aug-07 1:12
Life as a Coder5-Aug-07 1:12 
AnswerRe: Reading file as binary. Success. But...... Pin
Colin Angus Mackay5-Aug-07 1:27
Colin Angus Mackay5-Aug-07 1:27 
NewsRe: Reading file as binary. Success. But...... Pin
Life as a Coder5-Aug-07 1:35
Life as a Coder5-Aug-07 1:35 
AnswerRe: Reading file as binary. Success. But...... Pin
Luc Pattyn5-Aug-07 1:56
sitebuilderLuc Pattyn5-Aug-07 1:56 
Questionhow to detetmine that sql was installed on computer or not ? Pin
hdv2125-Aug-07 1:05
hdv2125-Aug-07 1:05 
AnswerRe: how to detetmine that sql was installed on computer or not ? Pin
Developer6115-Aug-07 1:14
Developer6115-Aug-07 1:14 
Hi there .

A simple way to do this , just send and open empty connection in try catch block
Your connection string can looks like this following code :

<br />
private Boolean TestConnectionString()<br />
{<br />
string sqlServerDefaultConnectionString = "Data Source = (local) ; initial catalog = Master ; Integrated Security = true; ";<br />
<br />
SqlConnection sqlConnection = new SqlConnection();<br />
sqlConnection.ConnectionString = sqlServerDefaultConnectionString ;<br />
try<br />
{<br />
sqlConnection.Open();<br />
return true;<br />
}<br />
catch { /*CCommon.WriteToErrorFile(err.ToString());*/ return false; }<br />
finally <br />
{ <br />
if (!(sqlConnection == null)) <br />
{ sqlConnection.Close(); <br />
sqlConnection.Dispose();<br />
} <br />
}<br />
}<br />
<br />



DMASTER

GeneralRe: how to detetmine that sql was installed on computer or not ? Pin
Colin Angus Mackay5-Aug-07 1:24
Colin Angus Mackay5-Aug-07 1:24 
AnswerRe: how to detetmine that sql was installed on computer or not ? Pin
Colin Angus Mackay5-Aug-07 1:33
Colin Angus Mackay5-Aug-07 1:33 
AnswerRe: how to detetmine that sql was installed on computer or not ? Pin
Paul Conrad5-Aug-07 5:06
professionalPaul Conrad5-Aug-07 5:06 
QuestionCrystal Report working with generic collections Pin
Developer6114-Aug-07 22:44
Developer6114-Aug-07 22:44 
Questionwhat is exe of search option in win xp Pin
San@Coding4-Aug-07 22:11
San@Coding4-Aug-07 22:11 
AnswerRe: what is exe of search option in win xp Pin
Luc Pattyn4-Aug-07 23:56
sitebuilderLuc Pattyn4-Aug-07 23:56 
Questiondraw a box on screen Pin
hamid_m4-Aug-07 21:50
hamid_m4-Aug-07 21:50 
AnswerRe: draw a box on screen Pin
ArunkumarSundaravelu6-Aug-07 5:22
ArunkumarSundaravelu6-Aug-07 5:22 
QuestionProperties Window [modified] Pin
sniper474-Aug-07 21:22
sniper474-Aug-07 21:22 
AnswerRe: Properties Window Pin
Hessam Jalali4-Aug-07 22:36
Hessam Jalali4-Aug-07 22:36 
GeneralRe: Properties Window Pin
sniper475-Aug-07 0:31
sniper475-Aug-07 0:31 
GeneralRe: Properties Window Pin
J. Dunlap5-Aug-07 8:48
J. Dunlap5-Aug-07 8:48 
QuestionC# error " not all code paths return a value" Pin
jayarajmrj4-Aug-07 19:36
jayarajmrj4-Aug-07 19:36 
AnswerRe: C# error " not all code paths return a value" Pin
Hessam Jalali4-Aug-07 21:27
Hessam Jalali4-Aug-07 21:27 
NewsRe: C# error " not all code paths return a value" Pin
javajohn5-Aug-07 5:42
javajohn5-Aug-07 5:42 
Questionmasterpage Pin
TAREQ F ABUZUHRI4-Aug-07 12:23
TAREQ F ABUZUHRI4-Aug-07 12:23 
AnswerRe: masterpage Pin
Paul Conrad4-Aug-07 12:53
professionalPaul Conrad4-Aug-07 12: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.