Last post May 06, 2013 06:17 PM by tricket7
Apr 17, 2013 12:01 PM|tricket7|LINK
I want to retrieve a persons real name stored in the access database by using the "txt_username.Text" and "txt_pass.Text" to get the name.
Currently I have my connection, and my Select contact from custTable Where ....
but how do I get the specific value, currently I am returning the whole row
Apr 23, 2013 11:31 AM|GrassProgrammer|LINK
OleDbConnection acon = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\\file.mdb");
string strSql = "SELECT EmployeeID, User, FirstName, LastName from Employees";
OleDbCommand acom = new OleDbCommand(strSql, acon);
OleDbDataAdapter asda = new OleDbDataAdapter(acom);
DataTable dt = new DataTable();
Label1.Text = dt.Rows.ToString();
First 0 is row.
Second 0 is column.
From here, typecast to the datatype you want, if not string.
May 06, 2013 06:17 PM|tricket7|LINK
I have what is most likely a stupid question.....
so for dt.Rows.ToString();
do I enter the 0's or is it more specific?
For example my table appears like this:
Cust_ID Cust_Name Cust_Pass contact
1 Jon jon Jon Doe
2 Ron ron Ron Roe
After I check for the existing user at login on table users.mdb, I want to retrieve contact and insert into table ipTrack.mdb
so for example I log in U: Ron ------> txt_user.Text
P: ron -------> txt_pass.Text
I want to retrieve the specific data of contact with the parameters of txt_user.Text and txt_pass.Text which should return Ron Roe,
and store the contact to be input into the ipTrack.mdb table
contact ip address date
Ron Roe 188.8.131.52 2/17/13 12:00 am
so , I guess my question is do I enter
because I know contact will always be column 4