I have the following code that works about 95% of the time:
Imports ByteFX.Data.MySqlClient
Imports System.Web.Mail
Imports System.Text
Friend Class DB
Friend Shared connstr As String = "Data
Source=MSS003;database=Midwest;user
ID=Global;password=****;connect timeout=5"
Public Sub fillProducts(ByVal ds As DataSet)
Dim conn As New MySqlConnection(connstr)
conn.Open()
Dim cmd As New MySqlCommand
cmd.Connection = conn
cmd.CommandText = "SELECT ProductID,
ProductName, LegacySKU, UnitSize, Color, CatagoryID, " & _
"StockNumber from Products Where SoldOut = '0'"
Dim daProdID As MySqlDataAdapter = New
MySqlDataAdapter(cmd)
daProdID.Fill(ds, "Products")
conn.Close()
End Sub
End Class
The other 5% of the time the application hangs at the
conn.open() line, and I must end task the app, the redo
the action then it works.
Any ideas why this may be happening? Please let me
know if you need any other info from me on this item.
Logged In: YES
user_id=523261
This could be pooling. What version of the provider are you
using? Also, add pooling=false to your connection string
and see if it still happens.
Reggie
Logged In: YES
user_id=823798
I'm using .75, and will try adding pooling=false to the
connection string to see what happens.
Brandon
Logged In: NO
i have the same problem! but i have it in 100% of the time...
after the open command, there's no timeout...