English 中文(简体)
如何在VB6中找到一套记录?
原标题:How to get sets of Records in VB6?
  • 时间:2011-04-11 02:21:09
  •  标签:
  • vb6

y,只是想问你一个我知道你重新熟悉的简单问题。 我正在使用VB6,我只是想从我的数据库获取一套记录。 我的意思是,我有用户信息数据库,其中一部分编码如下:它只有一套记录<>。 同例如,用户信息数据库的价值是<>>>>,因此,与<<<<<>>/code>用户信息数据库的所有记录,必须在文本箱中分别显示,并得到>>>> 代码>datPayroll.Recordset.MoveNext<>>/strong>的协助。

With datPayroll
    .RecordSource = "select * from tblpayroll where empid like  " & UserID & " "
    .Refresh
    Me.txtRegularHours.Text = .Recordset.Fields!reghours
End With

- datPayroll: DataControl

-txtRegularHours : 文本箱

- UserID: Variable

问题回答

你或许想看MoveFirst、MoveNext等,以及EOF。

这里是联系的,或是联系的两条,以便你开始:

MoveFirst, MoveNext

You need to check that you have some data in your Recordset using EOF, then MoveFirst to move to the first record, and loop through using MoveNext.





相关问题
Prevent windows from queuing shellexecute requests

Win.ShellExecute 0, "open", "C:dirprogram.exe", "arguments", vbNullString, SW_SHOWNORMAL Win.ShellExecute 0, "open", "http://www.google.com", vbNullString, vbNullString, SW_SHOWNORMAL I want google....

Why is My Loop Only Deleting One File?

Using VB6 In a folder, i have n number of files, i want to delete a 0 kb files code Dim filename5 As String filename5 = Dir$(txtsourcedatabasefile & "*_*", vbDirectory) MsgBox filename5 Do ...

How to check the filesize?

Using VB6 I have the text file with different sizes, so i want to delete the file where filesize = 0 kb. How to make a vb6 code for deleting the 0 kb files. Need vb6 code Help

File Rename problem?

I m using VB6 and I have a folder where I have n number of files. I want to change the file extension to .txt. I used the code below to change the extension of all .fin files to .txt. Dim filename1 ...

Error 20728-F while in using Crystal Reports in VB6

I m using Crystal Reports in my VB6 project, but I m facing error while loading the report in crystalreport1.action=1; Please give me some solution for this problem. It is showing the error as Error ...

DllRegisterServer entry point was not found

When running my vb6 application I am getting error like, runtime error 53 : file not found: rscomclNoMsg.dll then i tried to register that dll from cmd line using regsvr32. Then I am getting ...

SQL Server 2000, ADO 2.8, VB6

How to determine if a Transaction is active i.e. before issuing Begin Transaction I want to ensure that no previous transaction are open.. the platform is VB6, MS-SQL Server 2000 and ADO 2.8