我应该在vb.net 2010中将SET SQL_BIG_SELECTS = 1放在哪里

时间:2016-01-21 23:52:23

标签: mysql vb.net

到目前为止,我有这个:

Dim sqlconn As New MySqlConnection(connstring)
sqlconn.Open()

da.SelectCommand = New MySqlCommand(sql, sqlconn)
da.Fill(ds)
ds.WriteXml(CurDir() & "\SummaryReport.xml", XmlWriteMode.WriteSchema)
MsgBox("XML created!", vbInformation)

我应该把SET SQL_BIG_SELECTS=1放在哪里?我真的不知道,因为我是vb.net的新手。

1 个答案:

答案 0 :(得分:0)

Dim sqlconn As New MySqlConnection(connstring)
da.SelectCommand = New MySqlCommand("SET SESSION SQL_BIG_SELECTS=1;" & sql, sqlconn)
da.Fill(ds) 'da.Fill() will open and close the connection for you
ds.WriteXml(CurDir() & "\SummaryReport.xml", XmlWriteMode.WriteSchema)
MsgBox("XML created!", vbInformation)