Click here to Skip to main content
15,903,362 members
Home / Discussions / C#
   

C#

 
Question[Message Deleted] Pin
kKamel6-Jul-09 11:37
kKamel6-Jul-09 11:37 
AnswerIgnore repost Pin
Manas Bhardwaj6-Jul-09 11:42
professionalManas Bhardwaj6-Jul-09 11:42 
QuestionCase sensitve Column Pin
kKamel6-Jul-09 11:31
kKamel6-Jul-09 11:31 
AnswerRe: Case sensitve Column Pin
Manas Bhardwaj6-Jul-09 11:44
professionalManas Bhardwaj6-Jul-09 11:44 
GeneralRe: Case sensitve Column Pin
kKamel6-Jul-09 11:47
kKamel6-Jul-09 11:47 
GeneralRe: Case sensitve Column Pin
Manas Bhardwaj6-Jul-09 12:02
professionalManas Bhardwaj6-Jul-09 12:02 
GeneralRe: Case sensitve Column Pin
kKamel6-Jul-09 12:06
kKamel6-Jul-09 12:06 
GeneralRe: Case sensitve Column Pin
kKamel6-Jul-09 12:36
kKamel6-Jul-09 12:36 
And Sorry to tell you it can be done but it is inefficient regarding the performance issues.
How it could be done:
DataSet ds = new DataSet();
DataTable dt = new DataTable();
string xmlPath=Server.MapPath("/Database/Credential.xml");
ds.ReadXml(xmlPath);
dt=ds.Tables[0];
DataView dv = new DataView();
dt=ds.Tables[0];
dv = dt.DefaultView;
dv.Table.CaseSensitive = false;//Set dv to case insensitive
dv.RowFilter="username ='"+txtUsername.Text+"'";//check for username
if (dv.ToTable().Rows.Count==1)//Valid Username
{
dt=dv.ToTable();//here i get the row that has the valid username and with its password and put it in DT
dv=dt.DefaultView;//then i reset the dv to the new dt
dv.Table.CaseSensitive=true;then i change the dv table to case sensitive
dv.RowFilter="password ='"+txtPassword.Text+"'";then i check for the password
if(dv.ToTable().Rows.Count==1)//if it retireved a record this means a valid password
{
//Code todo when login
}

}

PS: You might refine the code for better performance but the code i did above is better regarding performance

Please Rate If It helped and same thing for the code above
AnswerRe: Case sensitve Column Pin
Ennis Ray Lynch, Jr.6-Jul-09 12:42
Ennis Ray Lynch, Jr.6-Jul-09 12:42 
QuestionDesign Ideas / nested DataGridView?? Pin
Muammar©6-Jul-09 10:46
Muammar©6-Jul-09 10:46 
AnswerRe: Design Ideas / nested DataGridView?? Pin
Mycroft Holmes6-Jul-09 19:13
professionalMycroft Holmes6-Jul-09 19:13 
GeneralRe: Design Ideas / nested DataGridView?? Pin
kKamel6-Jul-09 22:36
kKamel6-Jul-09 22:36 
GeneralRe: Design Ideas / nested DataGridView?? Pin
Mycroft Holmes6-Jul-09 23:09
professionalMycroft Holmes6-Jul-09 23:09 
GeneralRe: Design Ideas / nested DataGridView?? Pin
Mohammad Mahdipour20-Oct-09 19:26
Mohammad Mahdipour20-Oct-09 19:26 
GeneralRe: Design Ideas / nested DataGridView?? Pin
Mycroft Holmes21-Oct-09 0:23
professionalMycroft Holmes21-Oct-09 0:23 
QuestionMessage Removed Pin
6-Jul-09 10:40
professionalN_tro_P6-Jul-09 10:40 
AnswerRe: Retrieve the PK after an add into an in memory DataTable Pin
Ennis Ray Lynch, Jr.6-Jul-09 12:44
Ennis Ray Lynch, Jr.6-Jul-09 12:44 
GeneralRe: Retrieve the PK after an add into an in memory DataTable Pin
Mycroft Holmes6-Jul-09 19:16
professionalMycroft Holmes6-Jul-09 19:16 
AnswerRe: Retrieve the PK after an add into an in memory DataTable Pin
zlezj6-Jul-09 20:43
zlezj6-Jul-09 20:43 
Questioncode behind method Pin
zoyakhan6-Jul-09 8:00
zoyakhan6-Jul-09 8:00 
AnswerRe: code behind method Pin
Pete O'Hanlon6-Jul-09 9:13
mvePete O'Hanlon6-Jul-09 9:13 
Questionthis.NotifyIcon.BalloonTipShown not executing Pin
ark_mage26-Jul-09 7:56
ark_mage26-Jul-09 7:56 
QuestionExecute workflow using windows service Pin
Member 40084926-Jul-09 7:23
Member 40084926-Jul-09 7:23 
QuestionProperties.Settings (Application connectionstring) Pin
Jacob Dixon6-Jul-09 6:54
Jacob Dixon6-Jul-09 6:54 
AnswerRe: Properties.Settings (Application connectionstring) Pin
Jacob Dixon6-Jul-09 7:13
Jacob Dixon6-Jul-09 7:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.