到目前为止,我有这个:
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的新手。
答案 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)