Dim cnn_char = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=数据库名称;Data Source=."
Dim conn = new System.Data.SqlClient.SqlConnection(cnn_char)
conn.Open()
Dim cmd = conn.CreateCommand()
cmd.CommandText = "use master;RESTORE FILELISTONLY FROM DISK = N'C:\Users\WU\Desktop\TSBF20170328120216.bak';"
Dim dataset As new system.data.DataSet()
Dim adapter = new System.Data.SqlClient.SqlDataAdapter(cmd)
adapter.Fill(dataset)
Dim dt = dataset.Tables(0)
conn.Close
Output.Show(dt.Rows(0)(0))
Output.Show(dt.Rows(1)(0))