如何将VB 6中的代码转换为VB.NET? [英] How to Convert the Code in VB 6 to VB.NET?

查看:95
本文介绍了如何将VB 6中的代码转换为VB.NET?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我有机会在迁移项目中工作(从VB到VB.NET),我对RecordSet功能感到困惑.在我们的项目中,我们根据情况采用了DataReader. br/>

Hi All,


I got a chance to work in the migration project(VB to VB.NET).I was confusing in the RecordSet functionality.In our project we are taking the DataReader according to the scenario.But in the Looping cases like dsr.EOF.

Dim recordset As dao.RecordSet
If recordset .EOF Then
       '    '    msgbox "Please enter some number ", vbOKOnly, "Number Not Found"
       '    '    txtAdd.SetFocus
       '    '    Exit Sub
End If


如何将其转换为VB.NET?
我们需要编写If Not reader.Read或If reader.Read.

有什么可以帮助我的吗?


How to convert this into VB.NET?
Either we need to write If Not reader.Read or If reader.Read.

Can any help me regarding this ?

推荐答案

您可以执行以下操作:

You can do something like:

If Not reader.Read() Then
    ' do the processing
End If


这篇关于如何将VB 6中的代码转换为VB.NET?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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