Click here to Skip to main content
15,887,344 members
Home / Discussions / C#
   

C#

 
Generalcomparing two arrays Pin
rameshdontagani6-Dec-07 17:50
rameshdontagani6-Dec-07 17:50 
GeneralRe: comparing two arrays Pin
Sathesh Sakthivel6-Dec-07 17:52
Sathesh Sakthivel6-Dec-07 17:52 
GeneralRe: comparing two arrays Pin
rameshdontagani6-Dec-07 18:05
rameshdontagani6-Dec-07 18:05 
GeneralProblem in CheckedLitBox Pin
chanzeb6-Dec-07 17:47
chanzeb6-Dec-07 17:47 
GeneralRe: Help meeeee!!!! Pin
Sathesh Sakthivel6-Dec-07 17:51
Sathesh Sakthivel6-Dec-07 17:51 
GeneralRe: Help meeeee!!!! Pin
Abhijit Jana6-Dec-07 18:02
professionalAbhijit Jana6-Dec-07 18:02 
QuestionNew to C# .Problem while accessing sql server Pin
mohanallam6-Dec-07 17:28
mohanallam6-Dec-07 17:28 
GeneralRe: New to C# .Problem while accessing sql server Pin
I.explore.code6-Dec-07 17:43
I.explore.code6-Dec-07 17:43 
mohanallam wrote:
// 1. Instantiate the connection

string strConnection = "server=localhost; Trusted_Connection=yes; timeout=120";
SqlConnection Conn = new SqlConnection(strConnection);


In this line are you specifyinng DataSource or InitialCatalog ? I think you also need to specify the data base you want to connect to.

I believe you are accessing SQL Server on the same machine as you have your code in, which is also visible from the Server=localhost line of code.

If your DB server lies on some remote machine you gotta change some settings from SQL Server Surface Area Configuration regarding local and remote connections.as under default settings, remote connnections are not allowed by SQL Server and you may also need to turn off your firewall to be able to access remote server.

Also, you can have various versions of connection strings for connecting to SQL server.

Just try specifying the initial catalog and/or datasource parameters in the connection string and see if it works. if it doesnt let me know.
GeneralRe: New to C# .Problem while accessing sql server Pin
mohanallam7-Dec-07 16:54
mohanallam7-Dec-07 16:54 
GeneralSetting value in installer and reading at runtime Pin
atuldeore6-Dec-07 17:26
atuldeore6-Dec-07 17:26 
GeneralRe: Setting value in installer and reading at runtime Pin
Jacky Yiu6-Dec-07 17:48
Jacky Yiu6-Dec-07 17:48 
GeneralRe: Setting value in installer and reading at runtime Pin
I.explore.code6-Dec-07 17:52
I.explore.code6-Dec-07 17:52 
Generalquestion on database query Pin
angels7776-Dec-07 16:57
angels7776-Dec-07 16:57 
GeneralRe: question on database query Pin
Jacky Yiu6-Dec-07 17:44
Jacky Yiu6-Dec-07 17:44 
GeneralRe: question on database query Pin
angels7776-Dec-07 18:06
angels7776-Dec-07 18:06 
GeneralRe: question on database query Pin
Jacky Yiu6-Dec-07 22:15
Jacky Yiu6-Dec-07 22:15 
GeneralRe: question on database query Pin
angels7776-Dec-07 23:09
angels7776-Dec-07 23:09 
GeneralRe: question on database query Pin
angels7777-Dec-07 19:50
angels7777-Dec-07 19:50 
GeneralRe: question on database query Pin
angels7779-Dec-07 0:43
angels7779-Dec-07 0:43 
GeneralRe: question on database query Pin
Jacky Yiu9-Dec-07 15:11
Jacky Yiu9-Dec-07 15:11 
Generalwhy update data is wrong.. Pin
angels7776-Dec-07 16:33
angels7776-Dec-07 16:33 
GeneralRe: why update data is wrong.. Pin
Jacky Yiu6-Dec-07 17:36
Jacky Yiu6-Dec-07 17:36 
GeneralRe: why update data is wrong.. Pin
angels7776-Dec-07 18:18
angels7776-Dec-07 18:18 
GeneralRe: why update data is wrong.. Pin
angels7776-Dec-07 18:55
angels7776-Dec-07 18:55 
GeneralRe: why update data is wrong.. Pin
Jacky Yiu6-Dec-07 22:07
Jacky Yiu6-Dec-07 22:07 

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.