Connection problem between MySQL and ASP.NET

P

Polarsilver

Hello,

I have problem with the connection between MySQL 5.0 and my ASP.NET (VB)
homepage. Framework 1.1 and Visual Studio .NET 2003. I have installed MyODBC
3.51 driver. I'm using Windows XP SP2 and ZoneAlarm Security Suite 5.1.

I have made a class to connect to the database and return the datareader.

---
Imports System.Data.Odbc

Public Class Database

Private strConn As String = "DRIVER={MySQL ODBC 3.51
Driver};SERVER=localhost;DATABASE=dbname;USER=myuser;PASSWORD=mypassword;OPTION=3"
Private objConn As New OdbcConnection(strConn)

Function GetData(ByVal strSQL As String)
Dim objCommand As New OdbcCommand(strSQL, objConn)
objConn.Open()
Dim objReader As OdbcDataReader = objCommand.ExecuteReader()
Return objReader

objReader.Close()
objConn.Close()
End Function

End Class
---

Sometimes the system is hanging when I try to load the webpage in IE and I
need to restart the computer. It occur often after I have build the
soloution in VS.NET and try it in IE. After the restart it often works again
but it's very irritating and I want to solve the problem and I i'm greatful
for any help.


Thanks in advance,

Polarsilver
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top