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

Database

 
GeneralRe: Autonumber Fields Pin
polishprogrammer7-Dec-07 4:50
polishprogrammer7-Dec-07 4:50 
GeneralWhich Datatype is better Bit or tiny int? SQL Server 2005 Pin
Rocky#7-Dec-07 3:47
Rocky#7-Dec-07 3:47 
GeneralRe: Which Datatype is better Bit or tiny int? SQL Server 2005 Pin
pmarfleet7-Dec-07 10:04
pmarfleet7-Dec-07 10:04 
GeneralRe: Which Datatype is better Bit or tiny int? SQL Server 2005 Pin
Mark Churchill7-Dec-07 14:52
Mark Churchill7-Dec-07 14:52 
GeneralRe: Which Datatype is better Bit or tiny int? SQL Server 2005 Pin
Rocky#7-Dec-07 22:37
Rocky#7-Dec-07 22:37 
GeneralRe: Which Datatype is better Bit or tiny int? SQL Server 2005 Pin
Rocky#7-Dec-07 22:34
Rocky#7-Dec-07 22:34 
GeneralRe: Which Datatype is better Bit or tiny int? SQL Server 2005 Pin
Mike Dimmick9-Dec-07 6:51
Mike Dimmick9-Dec-07 6:51 
GeneralAutomatically update database defintion Pin
polishprogrammer7-Dec-07 3:35
polishprogrammer7-Dec-07 3:35 
QuestionData Regions within table/matrix cells are ignored Pin
praveenkjohn6-Dec-07 23:35
praveenkjohn6-Dec-07 23:35 
AnswerRe: Data Regions within table/matrix cells are ignored Pin
Saurabh09520-Oct-11 21:50
Saurabh09520-Oct-11 21:50 
General[Message Deleted] Pin
SreejithAchutan6-Dec-07 19:06
SreejithAchutan6-Dec-07 19:06 
GeneralRe: Check Condition Pin
Colin Angus Mackay7-Dec-07 1:08
Colin Angus Mackay7-Dec-07 1:08 
GeneralRe: Check Condition Pin
SreejithAchutan7-Dec-07 17:45
SreejithAchutan7-Dec-07 17:45 
GeneralRe: Check Condition Pin
Colin Angus Mackay8-Dec-07 0:43
Colin Angus Mackay8-Dec-07 0:43 
Generalneed solution for converting the varchar value to int ** Pin
VenkataRamana.Gali6-Dec-07 18:58
VenkataRamana.Gali6-Dec-07 18:58 
GeneralRe: need solution for converting the varchar value to int ** Pin
Krish - KP6-Dec-07 19:33
Krish - KP6-Dec-07 19:33 
GeneralRe: need solution for converting the varchar value to int ** Pin
VenkataRamana.Gali6-Dec-07 19:46
VenkataRamana.Gali6-Dec-07 19:46 
GeneralRe: need solution for converting the varchar value to int ** Pin
Paddy Boyd7-Dec-07 0:39
Paddy Boyd7-Dec-07 0:39 
GeneralRe: need solution for converting the varchar value to int ** Pin
Krish - KP7-Dec-07 3:13
Krish - KP7-Dec-07 3:13 
QuestionProblem while accessing the sqlserver2005 in c# Pin
mohanallam6-Dec-07 17:36
mohanallam6-Dec-07 17:36 
Hi friends

I am facing a problem while accessing database sqlserver 2005 from command prompt.
Here i am giving my code. I don't have any compilation errors,
But runtime errors as follows....

Unhandled Exception: System.Data.SqlClient.SqlException: An error has occurred w
hile establishing a connection to the server. When connecting to SQL Server 200
5, this failure may be caused by the fact that under the default settings SQL Se
rver does not allow remote connections. (provider: Named Pipes Provider, error:
40 - Could not open a connection to SQL Server)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception

my code is :

using System;
using System.Data;
using System.Data.SqlClient;

/// <summary>
/// Demonstrates how to work with SqlConnection objects
/// </summary>
class SqlConnectionDemo
{
static void Main()
{
// 1. Instantiate the connection

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

SqlDataReader rdr = null;

try
{
// 2. Open the connection
if (Conn.State == ConnectionState.Closed)
{
Conn.Open();
}


// 3. Pass the connection to a command object
SqlCommand cmd = new SqlCommand("select * from Customers", Conn);


// 4. Use the connection


// get query results
rdr = cmd.ExecuteReader();

// print the CustomerID of each record
while (rdr.Read())
{
Console.WriteLine(rdr[0]);
}
}
finally
{
// close the reader
if (rdr != null)
{
rdr.Close();
}

// 5. Close the connection
if (Conn != null)
{
Conn.Close();
}
}
}
}
Note: I am executing my program at cmd prompt.

Help please...........
GeneralRe: Problem while accessing the sqlserver2005 in c# Pin
pmarfleet6-Dec-07 21:08
pmarfleet6-Dec-07 21:08 
GeneralRe: Problem while accessing the sqlserver2005 in c# Pin
suyuan19846-Dec-07 23:09
suyuan19846-Dec-07 23:09 
QuestionDifference between SQL-Agent and SQL-QA when executing a SP Pin
asrs636-Dec-07 15:01
asrs636-Dec-07 15:01 
GeneralRe: Difference between SQL-Agent and SQL-QA when executing a SP Pin
Marek Grzenkowicz6-Dec-07 21:35
Marek Grzenkowicz6-Dec-07 21:35 
Questionlocal sql server database not updating Pin
webster.ut6-Dec-07 9:44
webster.ut6-Dec-07 9:44 

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.