Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Problem sa connection.open()

[es] :: .NET :: ASP.NET :: Problem sa connection.open()

[ Pregleda: 2402 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

finderetf

Član broj: 103659
Poruke: 158
*.smin-1.sezampro.yu.



Profil

icon Problem sa connection.open()02.11.2008. u 15:19 - pre 188 meseci
Zasto ovo ne radi???

konekcija = new SqlConnection(@"Data Source=(local);Integrated Security=SSPI; " + "Initial Catalog=northwind;User ID=root;Password=0");
konekcija.Open();

Ova greska se javlja:
Baza je na MySQL serveru.User name ROOT, Pass : 0;
Mozda i treba u web konfigurisanju da se nesto uradi,ali ja to ne znam.Tamo nista nisam podesavao,pa molim da napisete gde se to i nalazi.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Ukljucio sam i remote connections. U cemu je problem, verovatno connection string, pa mi pomozite! Hvala


Mnogo biste mi pomogili kada bi bilo reci i pristupu bazi na nekom drugom racunaru (troslojna arhitektura – soket...)
 
Odgovor na temu

la_bomba
la_bomba
Software developer, -
Novi Sad

Član broj: 183802
Poruke: 10
*.dynamic.sbb.rs.



Profil

icon Re: Problem sa connection.open()02.11.2008. u 20:00 - pre 188 meseci
Probaj da umjesto (local) napises imeRacunara\SQLEXPRESS
 
Odgovor na temu

finderetf

Član broj: 103659
Poruke: 158
*.smin-1.sezampro.yu.



Profil

icon Re: Problem sa connection.open()02.11.2008. u 21:18 - pre 188 meseci
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Source Error:

Line 28: {
Line 29: konekcija = new SqlConnection(@"Data Source=gajic\SQLEXPRESS;Integrated Security=SSPI; " + "Initial Catalog=northwind;User ID=root;Password=0");
Line 30: konekcija.Open();


Preprevio sam ali opet isto. Probao sam preko System.Data.Odbc sve savrseno radi, cak menjam i masine koje su kao MySQL server i sve radi super.
Hocu da mi proradi i kao System.Data.SqlClient; samo da proradi ovaj connstring.

Hvala
 
Odgovor na temu

vujkev
Beograd

Član broj: 8072
Poruke: 1347
*.telekom.yu.



+104 Profil

icon Re: Problem sa connection.open()03.11.2008. u 01:40 - pre 188 meseci
Citat:

Line 29: konekcija = new SqlConnection(@"Data Source=gajic\SQLEXPRESS;Integrated Security=SSPI; " + "Initial Catalog=northwind;User ID=root;Password=0");

Citat:

Preprevio sam ali opet isto. Probao sam preko System.Data.Odbc sve savrseno radi, cak menjam i masine koje su kao MySQL server i sve radi super.


Jel je u pitanju MySQL server ili MSSQL server?
Naučio sam...
Da je važnije biti ljubazan nego biti u pravu
 
Odgovor na temu

Prokleta_Nedelja
Beograd

Član broj: 90608
Poruke: 450
*.teol.net.



+42 Profil

icon Re: Problem sa connection.open()03.11.2008. u 13:08 - pre 188 meseci
ako je MySQL server evo connstringa
"server=localhost;database=moja_baza;uid=root;pwd=moja_sifra;"

Takodje ne mozes koristiti SqlConnection objekt ako radis sa MySQL nego moras skinuti MySql.NET konektor (www.mysql.com) i koristiti MySqlConnection objekt
 
Odgovor na temu

[es] :: .NET :: ASP.NET :: Problem sa connection.open()

[ Pregleda: 2402 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.