Click here to Skip to main content
15,902,447 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have a database named db1.mdb. Its path is F:\client management systemfinalz\db1.mdb

Connection String
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\\client management systemfinalz\\db1.mdb;Persist Security Info=False";


It can execute INSERT query

obj.IDUCommand("insert into tbl_password  values('" + '3' + "','" + "kishore" + "','" + "kishore" + "','" + "kishore" + "','" + "kishore" + "')");


The table tbl_password contains 5 fields, 1 is number and others are text.

The above INSERT query is working,bt the following SELECT query is not working

dr2=select cmpname from tbl_password where password='12345'
 txtcount.Text = dr2["cmpname"].ToString();


dr2 get return value of reader

When debugging its shows that "no data/column exists", but it contains values

Kindly help me
Kishore R
Gis Solutions
www.uniquewebdeveloper.co.cc
Posted
Updated 24-Apr-11 9:02am
v6

1 solution

Check whether column "cmpname" and "password" exist or not?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900