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.

Recommended Answers

All 3 Replies

so where are the attachments?
are you going to bind the rows in a datagrid or in a textbox?

So the picture i get from the information that you have provided is you have to get the regno when the Smartid is 0 or null

dim ldst as new dataset

declare a datset

the values that are returned should be stored in the dataset.. whether its gettin returned thru a textbox or a grid.

then try out

if ldst.Tables(0).Rows(0)(0) = 0 Then

'Checking whether the field SmartId is empty
ldst.Tables(1).Rows(0).Add.. and it goes something like that.. post in your code and will try to solve it out.

check this LINK

it has some basics of ADO.NET

Please provide me code to access data in VB 2005 am using MS ACCESS as database.
I want to retrive data on the from date (field) means data of any particular date like from 27 to 31. Pls help me to know how to accecc data am new on this thanks....asap help req.

Please start new thread.....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.