需要帮助visual basic 6到数据库,投票系统投票从数据库更新 [英] need help visual basic 6 to database, voting system votes update from database

查看:65
本文介绍了需要帮助visual basic 6到数据库,投票系统投票从数据库更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


im当我点击我的数据库中的cmdbutton到flexgrid时,只是试图更改或更新投票



database 2003


< p style ="margin-bottom:6px; font-family:helvetica,arial,sans-serif; color:#1d2129; font-size:14px; line-height:19.32px">
visual basic 6.0



cbo>投票> flexgrid



combo从表单加载自动加载的盒子>来自数据库



我的代码截至目前请更正





connect

Dim ctr As Integer



如果cboprescandidates.Enabled = True那么

如果rec.State = 1那么

rec.Open" Open * from prescandidate",con,3,2 $
ctr = rec.Fields(" votes")+ 1

rec.Fields(" votes") = ctr

presfresh

否则

如果MsgBox("你确定留空总统盒子",vbWarning + vbYesNo,"警告消息")= vbYes然后是
Me.cboprescandi dates.SetFocus

否则

退出子

结束如果

结束如果





解决方案

Hallo Bertong,


Visual Basic 6.0已经过时了,它几乎是古老的。我们目前的版本是14.0。代码差别不大,但对于像recordset和flexgrid这样的东西,已经有了更好的解决方案。


如果你想继续使用VB6而不是在互联网上搜索一个特殊的论坛。你知道和汽车一样,总是有人想让它们继续运行。


如果你想使用版本14.0然后使用社区版。对于VB6你需要一个许可证.VB14是非商业用途免费软件。


https://beta.visualstudio.com/vs/community/  


im just trying to change or update the votes when i click the cmdbutton in my database to flexgrid

database 2003

visual basic 6.0

cbo > vote > flexgrid

combo box automatic loaded from form load > from database

my codes as of now please correct it

connect
Dim ctr As Integer

If cboprescandidates.Enabled = True Then
If rec.State = 1 Then
rec.Open "Open * from prescandidate ", con, 3, 2
ctr = rec.Fields("votes") + 1
rec.Fields("votes") = ctr
presfresh
Else
If MsgBox("Are you sure to leave blank the Presidential Box", vbWarning + vbYesNo, "WARNING MESSAGE") = vbYes Then
Me.cboprescandidates.SetFocus
Else
Exit Sub
End If
End If

解决方案

Hallo Bertong,

Visual Basic 6.0 is so old that it is almost antique. We are currently at version 14.0. The code is not much different but for things like recordset and flexgrid there have become much better solutions.

If you want to go on with VB6 than search on Internet for a special forum for that. You know like with cars are there always persons who want to keep them running.

If you want to use version 14.0 then use the community edition. For VB6 you need a license. VB14 is for not business usage freeware.

https://beta.visualstudio.com/vs/community/ 


这篇关于需要帮助visual basic 6到数据库,投票系统投票从数据库更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆