我有一个带有AR System驱动程序的BMC Remedy数据库。我需要阅读此数据库,提取信息并将其保存在TXT中。 我在几个地方搜索过,什么也没找到。我试图用我正在阅读的内容来构建一些东西,但是效果不是很好。
dim sql
dim connectionString
Dim bindingSource1
Dim myAdapter
Dim commandBuilder
connectionString="DRIVER={AR System ODBC Driver};ARServer=10.2.67.22;ARServerPort=1530;UID=xxxxx;PWD=xxxxx;ARAuthentication=;SERVER=NotTheServer"
sql="SELECT ""Controle_Crachá"".""Request ID FROM Controle_Crachá Controle_Crachá"
Me.SQLDS_reportresults.DataSource = bindingSource1
myAdapter= New OdbcDataAdapter(sql, connectionString)
commandBuilder= New OdbcCommandBuilder(myAdapter)
Dim table As New DataTable()
table.Locale = System.Globalization.CultureInfo.InvariantCulture
myAdapter.Fill(table)
bindingSource1.DataSource = table
Me.SQLDS_reportresults.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCellsExceptHeader)