吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 2797|回复: 4
收起左侧

[其他转载] 动手制作PDA wince6.0 条码对比

[复制链接]
恒鑫电脑 发表于 2020-1-16 12:05
本帖最后由 恒鑫电脑 于 2020-1-16 12:09 编辑

工厂的许多产品都贴有二维码,为了快速识别产品是否正确,开发了这个软件。
1.选择类别,进行内容登记,录入正确的条码
2.在输入框进行扫描即可进行比对
话不多说  上图 1.png

成品图

成品图
附上源代码

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
这个是用来判断条码是不是正确?还是?
 楼主| 恒鑫电脑 发表于 2020-1-16 13:16
ckzx 发表于 2020-1-16 12:30
这个是用来判断条码是不是正确?还是?

判断货物和条码是否匹配,防止贴错
是你吗 发表于 2020-1-16 13:42
diyikuai 发表于 2020-1-16 14:38
试试看看吧!
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-11-16 19:47

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表