•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 423,511 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,619 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 3729 | Replies: 2
![]() |
•
•
Join Date: Jun 2007
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
hello all please help me out,I have designed a database in access having two fields(1.Regno 2.Smartid).I hav also kept some dummy values in RegNo,But the Smartid is empty.
Now what code should I write to retrive the RegNo for which the Smartid is empty.
I hav used only these three declarations:-
Dim con As System.Data.OleDb.OleDbConnection
Dim cmd, cmd1 As OleDbCommand
Dim dr As OleDbDataReader
Note:please answer me only using these declarations.
I have also attached the vb.net source file .please find the same in the attachment>>>>
the code is to be written in the next button action.
Now what code should I write to retrive the RegNo for which the Smartid is empty.
I hav used only these three declarations:-
Dim con As System.Data.OleDb.OleDbConnection
Dim cmd, cmd1 As OleDbCommand
Dim dr As OleDbDataReader
Note:please answer me only using these declarations.
I have also attached the vb.net source file .please find the same in the attachment>>>>
the code is to be written in the next button action.
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,123
Reputation:
Rep Power: 38
Solved Threads: 929
•
•
Join Date: Jun 2007
Posts: 166
Reputation:
Rep Power: 2
Solved Threads: 7
The VBcode remains same whether you use the .Net or not. Only thing changes is the connection and data stream. here you have declared dr as the data reader. First use the con to get the connection established to your Access Data base. Then
con.Open
bind you dr with the activeconnection con and what property your dr should have.
dr.Open "select regno from hell where smartid IS null;"
fill your combo or list inside a loop with the Additem(dr.fields("regno"))
that's all... and don'be too smart. Because when you can Dimension the OLEDB codes, I think the question is absolutely out of place.
con.Open
bind you dr with the activeconnection con and what property your dr should have.
dr.Open "select regno from hell where smartid IS null;"
fill your combo or list inside a loop with the Additem(dr.fields("regno"))
that's all... and don'be too smart. Because when you can Dimension the OLEDB codes, I think the question is absolutely out of place.
![]() |
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
access activation code daniweb data database debugging dell development dreamweaver drivers firefox gpl hacker hardware html ibm innovation internet key linux microsoft mozilla net news open open source open-source product programming red hat reuse security serial server software source sql storage sun super survey system ubuntu vista web wikipedia windows wysiwyg
- online exam application source code (VB.NET)
- Checking vulnerabilities without access to the source code? (IT Technologies and Trends)
- How can i access data from MS Access using VB6 (I need the connection code) (Visual Basic 4 / 5 / 6)
- VB6 and MS Access Problem (Visual Basic 4 / 5 / 6)
- vb.net code to access data from Access Database (VB.NET)
- How do you access Data in a QBasic 2.0 Data Table (Legacy and Other Languages)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: deleting record from db using tableadapter
- Next Thread: Storing Text file in Database through VB



Linear Mode