英文:
How to replace the contents of nsx file index from dbf in vb.net
问题
I have updated replace items with SQL in the DBF database but the DOS display of the item used in transactions cannot be selected and edited so the solution I have to replace the contents in the NSX file, which is the index of the DBF file.
如何使用vb.net从dbf替换索引文件内容?
Thanks
DBF数据库IFG.DBF是主数据项
INDEX DBF数据库IFGX.NSX是主数据项
DBF数据库GSD.DBF是详细销售数据
INDEX DBF数据库GSDX.NSX是详细销售数据
Private Sub updatepathdbfIFG()
Using cn = New System.Data.OleDb.OleDbConnection(String.Concat("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Path & "; Extended Properties=dBase IV"))
Dim tableDBF = "IFG"
cn.Open()
Using cmd = New OleDbCommand("UPDATE " & tableDBF & " SET " & "ITM=? WHERE ITM=? AND ITC=?", cn)
cmd.Parameters.Add("@ITM", OleDbType.VarChar).Value = TextBoxnewitem.Text
cmd.Parameters.Add("@ITM", OleDbType.VarChar).Value = TextBoxolditem.Text
cmd.Parameters.Add("@ITC", OleDbType.VarChar).Value = TextBoxITC.Text
cmd.ExecuteNonQuery()
End Using
cn.Close()
End Using
MessageBox.Show("已更新表格IFG", "", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
Private Sub updatepathdbfGSD()
Using cn = New System.Data.OleDb.OleDbConnection(String.Concat("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Path & "; Extended Properties=dBase IV"))
Dim tableDBF = "GSD"
cn.Open()
Using cmd = New OleDbCommand("UPDATE " & tableDBF & " SET " & "ITM=? WHERE ITM=? AND ITC=?", cn))
cmd.Parameters.Add("@ITM", OleDbType.VarChar).Value = TextBoxnewitem.Text
cmd.Parameters.Add("@ITM", OleDbType.VarChar).Value = TextBoxolditem.Text
cmd.Parameters.Add("@ITC", OleDbType.VarChar).Value = TextBoxITC.Text
cmd.ExecuteNonQuery()
End Using
cn.Close()
End Using
MessageBox.Show("已更新表格GSD", "", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
英文:
I have updated replace items with SQL in the DBF database but the DOS display of the item used in transactions cannot be selected and edited so the solution I have to replace the contents in the NSX file, which is the index of the DBF file.
How can I replace index file contents from dbf with vb.net?
Thanks
DBF database IFG.DBF is the master data item
INDEX DBF database IFGX.NSX is the master data item
DBF database GSD.DBF is the detailed sales data
INDEX DBF database GSDX.NSX is the detailed sales data
Private Sub updatepathdbfIFG()
Using cn = New System.Data.OleDb.OleDbConnection(String.Concat("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Path & "; Extended Properties=dBase IV"))
Dim tableDBF = "IFG"
cn.Open()
Using cmd = New OleDbCommand("UPDATE " & tableDBF & " SET " & "ITM=?" & "WHERE ITM=? AND ITC=?", cn)
cmd.Parameters.Add("@ITM", OleDbType.VarChar).Value = TextBoxnewitem.Text
cmd.Parameters.Add("@ITM", OleDbType.VarChar).Value = TextBoxolditem.Text
cmd.Parameters.Add("@ITC", OleDbType.VarChar).Value = TextBoxITC.Text
cmd.ExecuteNonQuery()
End Using
cn.Close()
End Using
MessageBox.Show("updated table IFG", "", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
Private Sub updatepathdbfGSD()
Using cn = New System.Data.OleDb.OleDbConnection(String.Concat("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Path & "; Extended Properties=dBase IV"))
Dim tableDBF = "GSD"
cn.Open()
Using cmd = New OleDbCommand("UPDATE " & tableDBF & " SET " & "ITM=?" & "WHERE ITM=? AND ITC=?", cn))
cmd.Parameters.Add("@ITM", OleDbType.VarChar).Value = TextBoxnewitem.Text
cmd.Parameters.Add("@ITM", OleDbType.VarChar).Value = TextBoxolditem.Text
cmd.Parameters.Add("@ITC", OleDbType.VarChar).Value = TextBoxITC.Text
cmd.ExecuteNonQuery()
End Using
cn.Close()
End Using
MessageBox.Show("updated table GSD", "", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
答案1
得分: 1
.NSX扩展名用于.DBF文件是一个叫做_HyperSix_的专有Clipper扩展。它不仅使用了不同的文件格式来存储Clipper索引文件(.nsx而不是.cdx),还使用了不同的MEMO格式(.smt),允许备忘录文件的大小达到2GB(在当时)。要使用这些数据库,您需要一个专有的商业ADO提供程序:Apollo ADO.NET数据提供程序。
英文:
The .NSX extension for .DBF files was a proprietary Clipper extension called HyperSix. It not only used a different file format for Clipper index files (.nsx instead of .cdx), but also a different MEMO format (.smt) which allowed memo file sizes to up to 2GB in size (at the time).
You require a proprietary commercial ADO provider to work with these databases: Apollo ADO.NET Data Provider
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论