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.

moved

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.

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.