MySql + ASP.net Connections problem..

monsterhit

New Member
Messages
1
Reaction score
0
Points
0
i m getting this error while using MySql variables like in my asp.net website
# Host = 'localhost'
# Port = '3306'
# User = [Your cPanel username followed by an underscore and the MySQL username you configured in cPanel]
# Pass = [The password that you used when creating the MySQL user]
# Database = [ Your cPanel username followed by an underscore and the name of the database that you created in cPanel]

Server Error in '/' Application

--------------------------------------------------------------------------------

Connection refused
Description: HTTP 500. Error processing request.

Stack Trace:

System.Net.Sockets.SocketException: Connection refused
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remote_end) [0x00000]
at System.Net.Sockets.Socket+Worker.Connect () [0x00000]


code:

MySqlConnection cn = new MySqlConnection("Server=localhost;Database=rajbaj_database;Uid=rajbaj_rajeev;Pwd=;");
cn.Open();



________________________________________________________________

and also when i m using,, System.Data.Obdc

then i m getting this error

libodbc.so

Description: HTTP 500. Error processing request.

Stack Trace:

System.DllNotFoundException: libodbc.so
at (wrapper managed-to-native) System.Data.Odbc.libodbc:SQLAllocHandle (System.Data.Odbc.OdbcHandleType,intptr,intptr&)
at System.Data.Odbc.OdbcConnection.Open () [0x00000]

so i m not able to use mysql database provided by the x10hosting,
however i downloaded a php script to test connection to database,, it is working in php..

but i want to use mysql database in my ASP.net Website..
Thanking you

________________________________________________________________

and also after trying above two i tried connecting to a ms access database...
it again shows me error like

gda-2

Description: HTTP 500. Error processing request.

Stack Trace:

System.DllNotFoundException: gda-2
at (wrapper managed-to-native) System.Data.OleDb.libgda:gda_init (string,string,int,string[])
at System.Data.OleDb.OleDbConnection.Open () [0x00000]
at (wrapper remoting-invoke-with-check) System.Data.OleDb.OleDbConnection:Open ()
at _Default.Page_Load (System.Object sender, System.EventArgs e) [0x00000]
at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Page.ProcessLoad () [0x00000]
at System.Web.UI.Page.ProcessPostData () [0x00000]
at System.Web.UI.Page.InternalProcessRequest () [0x00000]
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000]


so i was unable to use database connectivity through asp.net c#

please solve my problems or tell me a better way to connect to mysql database through c# asp.net

reply as soon as possible..
thanking you
 
Last edited:

thearchedone

New Member
Messages
18
Reaction score
0
Points
0
Hi,

Did you ever solve this? I'm also getting the DllNotFoundException error:

System.DllNotFoundException: gda-2
at (wrapper managed-to-native) System.Data.OleDb.libgda:gda_init (string,string,int,string[])
at System.Data.OleDb.OleDbConnection.Open () [0x00000]

Please can someone help me out?

Thanks in advance

TAO
 

zegnhabi

Member
Messages
44
Reaction score
2
Points
8
Ya probaste en agregar el nombre de servidor que te da PHPMyAdmin!?
 
Top