Click here to Skip to main content
15,898,222 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to select mulitiple files for upload Pin
Christian Graus23-Apr-09 10:21
protectorChristian Graus23-Apr-09 10:21 
QuestionProcess.Start is eating spaces Pin
Miszou23-Apr-09 10:06
Miszou23-Apr-09 10:06 
AnswerRe: Process.Start is eating spaces Pin
fly90423-Apr-09 12:04
fly90423-Apr-09 12:04 
GeneralRe: Process.Start is eating spaces Pin
Miszou23-Apr-09 13:23
Miszou23-Apr-09 13:23 
GeneralRe: Process.Start is eating spaces Pin
fly90423-Apr-09 15:23
fly90423-Apr-09 15:23 
Questionurl issue Pin
Zafar Sultan23-Apr-09 7:18
Zafar Sultan23-Apr-09 7:18 
AnswerRe: url issue Pin
Christian Graus23-Apr-09 11:02
protectorChristian Graus23-Apr-09 11:02 
QuestionCannot connect into SQL Server using C# Pin
Gindi Bar Yahav23-Apr-09 6:46
Gindi Bar Yahav23-Apr-09 6:46 
Bey guys,
i have a little problem, so if you can help me ill thank you...
i built a Sql server using Visual Stuido 2008 ( it created me a file name my_database.sdf ). now i am tring to connect to the sql server i have created,

i using the code below:
public void Connect()
        {
            this.han = new SqlConnection(@"Data Source=C:\Users\יהב\Documents\Visual Studio 2008\Projects\ADOtutorial\ADOtutorial\my_database.sdf;Persist Security Info=True;Application Name=ConnectDB");
            Console.WriteLine(this.han.ConnectionString);
            try
            {
                this.han.Open();
            }
            catch (NullReferenceException e)
            {
                Console.WriteLine(e);
            }
            catch (SqlException e)
            {
                Console.WriteLine(e);
            }
        }

this is a code in class, the class using this.han to make theconnection, the connection string i have copied from the connection strind i got from VS when i did motify connection -> advance. but for some resons i cant connect

the error i got:
Data Source=C:\Users\יהב\Documents\Visual Studio 2008\Projects\ADOtutorial\ADOtu
torial\my_database.sdf;Persist Security Info=True;Application Name=ConnectDB
System.Data.SqlClient.SqlException: אירעה שגיאה הקשורה לרשת או שגיאה ספציפית למו
פע במהלך יצירת חיבור ל- SQL Server.  השרת לא נמצא או שאינו נגיש. ודא כי שם המופע
 נכון וכי SQL Server מוגדר לאפשר חיבורים מרוחקים. (provider: ממשקי רשת של SQL, e
rror: 26 - שגיאה באיתור שרת/מופע שצוין)
   ב-  System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exceptio
n, Boolean breakConnection)
   ב-  System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateOb
ject stateObj)
   ב-  System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInterna
lConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boo
lean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection
 owningObject)
   ב-  System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
 serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire
, SqlConnection owningObject)
   ב-  System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String hos
t, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObjec
t, SqlConnectionString connectionOptions, Int64 timerStart)
   ב-  System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnect
ion owningObject, SqlConnectionString connectionOptions, String newPassword, Boo
lean redirectedUserInstance)
   ב-  System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIden
tity identity, SqlConnectionString connectionOptions, Object providerInfo, Strin
g newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
   ב-  System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionO
ptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnectio
n owningConnection)
   ב-  System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbCon
nection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
   ב-  System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection ownin
gObject)
   ב-  System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject)
   ב-  System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owni
ngObject)
   ב-  System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection o
wningConnection)
   ב-  System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection o
uterConnection, DbConnectionFactory connectionFactory)
   ב-  System.Data.SqlClient.SqlConnection.Open()
   ב-  ADOtutorial.Database_Driver.Connect() ב- C:\Users\יהב\Documents\Visual St
udio 2008\Projects\ADOtutorial\ADOtutorial\Database_Driver.cs:שורה 46
Press any key to continue . . .

google translate for the hebrew there:

There was an error related to the network or specific error Lmo <br />
According to the connection during the creation - SQL Server. Server not found or is not accessible. Verify that the instance name <br />
  Correct and that SQL Server is configured to allow remote connections. (provider: Web interface of SQL, e <br />
rror: 26 - Error locating server / instance specified)<br />


hope you can help me, thanks, Yahav Wink | ;)

Gindi Bar Yahav - Web & Software defeloper.

AnswerRe: Cannot connect into SQL Server using C# Pin
Eddy Vluggen23-Apr-09 6:49
professionalEddy Vluggen23-Apr-09 6:49 
GeneralRe: Cannot connect into SQL Server using C# Pin
Gindi Bar Yahav23-Apr-09 6:58
Gindi Bar Yahav23-Apr-09 6:58 
AnswerRe: Cannot connect into SQL Server using C# Pin
Eddy Vluggen23-Apr-09 7:18
professionalEddy Vluggen23-Apr-09 7:18 
GeneralRe: Cannot connect into SQL Server using C# Pin
Gindi Bar Yahav23-Apr-09 7:28
Gindi Bar Yahav23-Apr-09 7:28 
GeneralRe: Cannot connect into SQL Server using C# Pin
Eddy Vluggen23-Apr-09 8:47
professionalEddy Vluggen23-Apr-09 8:47 
AnswerRe: Cannot connect into SQL Server using C# Pin
SayreCC23-Apr-09 15:41
SayreCC23-Apr-09 15:41 
GeneralRe: Cannot connect into SQL Server using C# Pin
Gindi Bar Yahav23-Apr-09 22:56
Gindi Bar Yahav23-Apr-09 22:56 
QuestionXML Serialisation on Circular Dependency Pin
EnlilCox23-Apr-09 6:19
EnlilCox23-Apr-09 6:19 
AnswerRe: XML Serialisation on Circular Dependency Pin
Le centriste23-Apr-09 9:10
Le centriste23-Apr-09 9:10 
GeneralRe: XML Serialisation on Circular Dependency Pin
EnlilCox23-Apr-09 22:13
EnlilCox23-Apr-09 22:13 
GeneralRe: XML Serialisation on Circular Dependency Pin
Le centriste24-Apr-09 2:30
Le centriste24-Apr-09 2:30 
GeneralRe: XML Serialisation on Circular Dependency Pin
EnlilCox26-Apr-09 23:07
EnlilCox26-Apr-09 23:07 
QuestionUnit Testing Pin
mark_w_23-Apr-09 5:09
mark_w_23-Apr-09 5:09 
AnswerRe: Unit Testing - WORKED IT OUT Pin
mark_w_23-Apr-09 5:15
mark_w_23-Apr-09 5:15 
QuestionDeploying custom fonts at Client Place Pin
ramz_g23-Apr-09 3:24
ramz_g23-Apr-09 3:24 
AnswerRe: Deploying custom fonts at Client Place Pin
Eddy Vluggen23-Apr-09 3:45
professionalEddy Vluggen23-Apr-09 3:45 
GeneralRe: Deploying custom fonts at Client Place Pin
ramz_g23-Apr-09 5:01
ramz_g23-Apr-09 5:01 

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.