动手制作PDA wince6.0 条码对比
本帖最后由 恒鑫电脑 于 2020-1-16 12:09 编辑工厂的许多产品都贴有二维码,为了快速识别产品是否正确,开发了这个软件。
1.选择类别,进行内容登记,录入正确的条码
2.在输入框进行扫描即可进行比对
话不多说上图附上源代码
Module Module1
'Public A(1000) As String
'Public B(1000) As String
'Public C(1000) As String
'Public D(1000) As String
'Public i_A As Integer
'Public i_B As Integer
'Public i_C As Integer
Public i_D As Integer
Public LocalSqlConn As OleDb.OleDbConnection
'Public strUserName As String
'Public strClass As String
Public Function GetLocalSqlConn() As Boolean
GetLocalSqlConn = False
Try
LocalSqlConn = New OleDb.OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data Source=" & Application.StartupPath & "\database.mdb")
LocalSqlConn.Open()
GetLocalSqlConn = True
Catch ex As Exception
GetLocalSqlConn = False
End Try
End Function
'Public Function GetDs(ByVal strsql As String, ByVal strtable As String) As DataSet
' Try
' Dim sqlda As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter(strsql, LocalSqlConn)
' Dim myds As New DataSet
' sqlda.Fill(myds, strtable)
' GetDs = myds
' sqlda.Dispose()
' Catch ex As Exception
' GetDs = Nothing
' End Try
'End Function
Public Function GetTab(ByVal strsql As String, ByVal strtable As String) As DataTable
Try
Dim sqlda As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter(strsql, LocalSqlConn)
Dim myds As New DataSet
sqlda.Fill(myds, strtable)
GetTab = myds.Tables(0)
myds.Dispose()
sqlda.Dispose()
Catch ex As Exception
GetTab = Nothing
End Try
End Function
Public Function GetCom(ByVal strsql As String) As Boolean
Try
Dim sqlcom As OleDb.OleDbCommand = New OleDb.OleDbCommand(strsql, LocalSqlConn)
sqlcom.ExecuteNonQuery()
sqlcom.Dispose()
GetCom = True
Catch ex As Exception
GetCom = False
End Try
End Function
End Module 这个是用来判断条码是不是正确?还是? ckzx 发表于 2020-1-16 12:30
这个是用来判断条码是不是正确?还是?
判断货物和条码是否匹配,防止贴错 可以编译一下发出吗~~ 试试看看吧!
页:
[1]