15,949,686 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by kami124 (Top 200 by date)
kami124
12-Jun-14 2:21am
View
this is my function to send code to another frame text area but only once i can send not continuosly
public void recmsg()
{
try
{
String msg = dis.readUTF();
String oldText = txt_recMsgClient.getText();
StringBuilder yourStringBuilder = new StringBuilder();
yourStringBuilder.append("\n").append(oldText).append(msg);
txt_recMsgClient.setText(yourStringBuilder.toString());
}
catch (IOException ex)
{
Logger.getLogger(ClientForm.class.getName()).log(Level.SEVERE, null, ex);
}
}
kami124
11-Jun-14 7:15am
View
Perfect its working
kami124
11-Jun-14 6:36am
View
its declared its textfield
kami124
11-Jun-14 6:34am
View
its textfield. first i create txt_recMsg and then invoke append method
kami124
11-Jun-14 6:25am
View
Still same problem, problem some where in txt_recMsg
kami124
11-Jun-14 5:28am
View
i want two sided communication
kami124
4-Jan-12 6:47am
View
its kind of project but these specific answer after studying alot i cannot answer it, thats why i need help from you to whom i trust
kami124
30-Oct-11 6:15am
View
how to combine all the statements togather
kami124
29-Sep-11 3:23am
View
in the form i have a toolstrip1
and statusstrip1
and many others but i want to cahang these two only
kami124
29-Sep-11 2:56am
View
Deleted
here is my code
public void buttonLogin_Click_1(object sender, EventArgs e)
{
myform f1 = new myForm()
f1.Close();
userid = txtUserId_relogin.Text;
s1.user_verification(userid, txtPassword_relogin.Text);
}
public void user_verification(string u_id, string u_pwd)
{
using (DirectoryEntry entry = new DirectoryEntry())
{
entry.Username = u_id;
entry.Password = u_pwd;
DirectorySearcher searcher = new DirectorySearcher(entry);
searcher.Filter = "(objectclass=user)";
try
{
searcher.FindOne();
MessageBox.Show("valid user");
myForm();
}
catch (Exception)
{
MessageBox.Show("Invalid user try again");
Re_Login r1 = new Re_Login();
r1.Show();
}
}
}
kami124
27-Sep-11 3:17am
View
thanks
kami124
27-Sep-11 3:17am
View
but in this way it took multiple space as well
kami124
26-Sep-11 7:02am
View
ok i will thanks for ur advice
kami124
26-Sep-11 6:30am
View
thanks
i am getting it sorry i disturb u alot but u know i strat dot net 3.5 months before
thats y some time very little things i dont know, it dosent mean i diractly get help from u first of i try my best to sole myself if not then i refer to u.
kami124
26-Sep-11 5:30am
View
ya me using installer now if u some useful links for installer please send it to me
kami124
26-Sep-11 5:00am
View
ok thanks for helping me partially
kami124
26-Sep-11 4:02am
View
the moment i am not using installer
kami124
26-Sep-11 4:01am
View
oh! ya i got it what a silly mistake it is
then i shall combine multiple exe to one exe
kami124
26-Sep-11 3:43am
View
so where actually i have to save my ASD.EXE
kami124
25-Sep-11 6:13am
View
thanks
i was away thats y couldnt reply
kami124
25-Sep-11 0:43am
View
hello!
sorry i was on my week end so i couldnt see this
thanks for ur reply but frankly speaking i didnt understand
properly, what actulaay i have to do i told u before that my all applications are windows forms if its DLL then no problem, may i have to convert my winform app to dll or something else
kami124
21-Sep-11 7:58am
View
ok thats i know
but how to remove the icon
kami124
21-Sep-11 4:04am
View
i done it like this
thanks for your co operation
Regex regex = new Regex(@"^[a-zA-Z'' ']{1,40}$");
kami124
21-Sep-11 3:21am
View
ya i use it its ok but here is little problem
i make it like this
Regex regex = new Regex(@"^[a-zA-Z'' ']{1,40}$");
but i want to set only single space between the strings and no space at the end
how to do it
kami124
21-Sep-11 2:06am
View
there is no effect on text whats so ever i type i get
like i type "asd 34 =-'/[]"
and my output is also "asd 34 =-'/[]"
so what to do
kami124
21-Sep-11 1:34am
View
ok i use it like this
but its showing error
so i use KeyChar
if ((e.KeyChar < KeyChar.A) || (e.KeyChar > e.KeyChar.Z) || ((e.KeyChar < KeyChar.a) || (e.KeyChar > KeyChar.z))
e.Handled = true;
now the error is you are missing directive on KeyChar.a, KeyChar.z.....
kami124
21-Sep-11 0:52am
View
yes absolutaly right
all the characters except alphabets, numeric, single _, one space between two strings e.g Allan Donald, end of the string nothing like space
and text box should not be empty
kami124
21-Sep-11 0:51am
View
and text box should not be empty
kami124
21-Sep-11 0:50am
View
all the characters except alphabets, numeric, single _, one space between two strings e.g Allan Donald, end of the string nothing like space
kami124
20-Sep-11 5:28am
View
where i have to kept the EXE1.EXE
i kept in bin>debug
kami124
20-Sep-11 4:57am
View
i think u didnt understand my question properly
i have two different applications
app1 has two functions
in app2 i have to use that functions
kami124
20-Sep-11 4:08am
View
i have to use the functions of app2 in app1
assamble.loadForm will only display form
kami124
18-Sep-11 10:28am
View
thanks
what i was expecting
kami124
18-Sep-11 10:12am
View
ya single space like
asdd sdfdfg bnbbj jkhajksh
kami124
14-Sep-11 1:33am
View
what do u mean by 3rd party library
i create it using text.csv
but the problem over there is header filed is not saved
how to save the header
kami124
13-Sep-11 10:13am
View
can u please write the string where exactly i have to write
strValue={"AAA", "BBB", "CCC", "DDD", "EEE", "FFF"}
kami124
13-Sep-11 5:55am
View
me trying to get
thanks alot u help me too much
once again thanks
kami124
13-Sep-11 5:46am
View
at the end i got it
but how to get orginizational unit
i try with "ou"
but its not displaying
kami124
13-Sep-11 4:18am
View
dataGridView1.Rows.Add(email);
how to write in columns
col1, col2, col3
kami124
13-Sep-11 4:17am
View
here this statement is used to write data in rows
kami124
13-Sep-11 3:42am
View
oki want to display record in different column
kami124
13-Sep-11 3:18am
View
here i done some code can u tell me how to mention the column here for each field
////////////////////////////////////////////////////////////////////
try
{
department = (string)result.Properties["givenName"][0];
dataGridView1.Rows.Add(department);
}
catch
{
}
////////////////////////////////////////////////////////////////////
try
{
department = (string)result.Properties["telephoneNumber"][0];
dataGridView1.Rows.Add(department);
}
catch
{
}
////////////////////////////////////////////////////////////////////
try
{
department = (string)result.Properties["title"][0];
dataGridView1.Rows.Add(department);
}
catch
{
}
kami124
12-Sep-11 6:26am
View
thanks
kami124
12-Sep-11 3:21am
View
i didnt understand
kami124
8-Sep-11 7:54am
View
thanks
kami124
8-Sep-11 3:14am
View
no i voted 5 to u
kami124
28-Aug-11 5:17am
View
public static void checked_functions_for_modules_roles(string proc_mod_role, string mod,string rol, CheckedListBox cl1)
{
string sql_string = ("Data Source=sdfdfdf;Initial Catalog=dsdfsdfC;User Id=sdfsdf;Password=dfdfdsfsdfs");
SqlConnection conn = new SqlConnection(sql_string);
SqlCommand command = new SqlCommand(proc_mod_role, conn);
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@mid", mod);
command.Parameters.AddWithValue("@rid", rol);
conn.Open();
SqlDataAdapter a = new SqlDataAdapter(command);
"now what i have to write here to set items checked in lictbox"
}
kami124
28-Aug-11 4:46am
View
here is my code
from whic i got the items which is to be checked
now what condition i will apply to set that items to be checked in checkedlistbox others remain unchecked
private void comboBoxSelectModuleMRF_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBoxSelectModuleMRF.SelectedItem != null)
{
string a = comboBoxSelectModuleMRF.SelectedItem.ToString();
if (comboBoxSelectRoleMRF.SelectedItem != null)
{
string b = comboBoxSelectRoleMRF.SelectedItem.ToString();
SecurityModule.FillDataInGridView_umrf_users("proc_mrf_discription_users", a, checkedListBoxMRF);
comboBoxSelectModuleMRF.SelectedItem = null;
comboBoxSelectRoleMRF.SelectedItem = null;
}
}
}
private void comboBoxSelectRoleMRF_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBoxSelectRoleMRF.SelectedItem != null)
{
string a = comboBoxSelectRoleMRF.SelectedItem.ToString();
if (comboBoxSelectModuleMRF.SelectedItem != null)
{
string b = comboBoxSelectModuleMRF.SelectedItem.ToString();
SecurityModule.FillDataInGridView_umrf_users("proc_mrf_discription_users", a, checkedListBoxMRF);
comboBoxSelectModuleMRF.SelectedItem = null;
comboBoxSelectRoleMRF.SelectedItem = null;
}
}
}
kami124
24-Aug-11 7:19am
View
combobox consist of names
when i press any letter so all the names with that letter appears as dropdown menu
kami124
24-Aug-11 6:07am
View
thanks
Absolutly right
kami124
24-Aug-11 3:15am
View
i think you didnt read my question properly how they are similsr
now listen querry 2 i will get @mrfid
and by that mrfid querry 1 wil display complete row
so in querry2 we have more then one values
kami124
24-Aug-11 2:18am
View
Deleted
create procedure proc_mrf_discription_user (@uid nvarchar (50))
as
select sec_modules.modname_vc,
sec_roles.rolename_vc,
sec_functions.functionname_vc
from sec_umrf_details
left join sec_mrf_details on sec_umrf_details.mrfno_int = sec_mrf_details.mrfno_int
left join sec_modules on sec_modules.modid_int = sec_mrf_details.modid_int
left join sec_roles on sec_roles.roleid_int = sec_mrf_details.roleid_int
left join sec_functions on sec_functions.fnid_int = sec_mrf_details.fnid_int
where
sec_umrf_details.userid_vc = (@uid)
group by sec_modules.modname_vc, sec_roles.rolename_vc, sec_functions.functionname_vc
kami124
23-Aug-11 4:10am
View
here i create the code there is error at
textBoxModuleId.Text = rdr["modid_int"].ToString();
"that maximium index on a list is less then list size"
private void getMAXid()
{
System.Data.SqlClient.SqlDataReader rdr = null;
string strQ = "Select IsNULL(Max(modid_int+1), 1) ID from sec_modules";
string sql_string = ("Data Source=dfgfdgdsf;gInitial Catalog=cvfgdfg;User Id=dfgdfg;Password=dfgdfg");
SqlConnection conn = new SqlConnection(sql_string);
SqlCommand command = new SqlCommand(strQ, conn);
conn.Open();
rdr = command.ExecuteReader();
rdr.Read();
textBoxModuleId.Text = rdr["modid_int"].ToString();
rdr.Close();
}
kami124
22-Aug-11 5:59am
View
thanks
i am very much inspired from you
thanks once again
kami124
22-Aug-11 5:24am
View
this function execute only when i select any item from combobox
problem is some where here like to create new like this
string a = comboBoxSelectMRF.SelectedItem.ToString();
kami124
22-Aug-11 4:05am
View
here is my function but still i am confuse how to do this form procedure before i done tis simple querry
public static void FillDataInGridView_umrf(string proc_mod,int mrf, DataGridView dg1)
{
string sql_string = ("Data Source=345jk5jh5kjh;Initial Catalog=fgsdfgdfg;User Id=ertertd;Password=dfgdfgdfg;");
SqlConnection conn = new SqlConnection(sql_string);
SqlCommand command = new SqlCommand(proc_mod, conn);
conn.Open();
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@mrfid", mrf);
SqlDataAdapter a = new SqlDataAdapter(proc_mod, conn);
DataTable t = new DataTable();
a.Fill(t);
dg1.DataSource = t;
}
kami124
22-Aug-11 3:11am
View
thanks, now its working some how
kami124
22-Aug-11 2:25am
View
i checked with inner join same problem coming again
kami124
22-Aug-11 2:03am
View
where exactly i have to use code blocks
kami124
21-Aug-11 3:56am
View
so what to do now is there any other way
kami124
21-Aug-11 1:10am
View
yes i chect it twice there is result for sec_mrf_details.mrfno_nu = 1
and all other also
kami124
18-Aug-11 7:14am
View
ya by this code its diplaying the fields name only
i want the values of field also
kami124
18-Aug-11 4:54am
View
now i make changes
select distinct sec_umrf_details.mrfno_int, sec_modules.modname_vc,
sec_roles.rolename_vc, sec_functions.functionname_vc
FROM GCERP_SEC.dbo.sec_umrf_details
left join sec_mrf_details on sec_mrf_details.mrfno_nu = sec_umrf_details.mrfno_int
left join sec_modules on sec_modules.modid_int = sec_mrf_details.modid_int
left join sec_roles on sec_roles.roleid_int = sec_mrf_details.roleid_int
left join sec_functions on sec_functions.fnid_int = sec_mrf_details.fnid_int
where sec_umrf_details.userid_vc = 'igasa'
the result is showing on mrfno_int and all other s showing null
kami124
18-Aug-11 4:07am
View
ya i check all the values are there
i am running the querry diredt in sql server Managemnet atudio
kami124
18-Aug-11 3:20am
View
this is my actual querry but its just displaying column names but i need field values over ther as well what i am missing in the querry
can u check
select [sec_umrf_details].mrfno_nu, [sec_modules].modname_vc,
[sec_roles].rolename_vc, [sec_functions].functionname_vc
from [sec_umrf_details]
join [sec_mrf_details] on [sec_umrf_details].mrfno_nu = [sec_mrf_details].mrfno_nu
join [sec_modules] on [sec_mrf_details].modid_int = [sec_modules].modid_int
join [sec_roles] on [sec_mrf_details].roleid_int = [sec_roles].roleid_int
join [sec_functions] on [sec_mrf_details].fnid_int = [sec_functions].fnid_int
where [sec_umrf_details].userid_vc = 'iagsa'
kami124
18-Aug-11 1:38am
View
this is my actual querry but its just displaying column names but i need field values over ther as well what i am missing in the querry
can u check
select [sec_umrf_details].mrfno_nu, [sec_modules].modname_vc,
[sec_roles].rolename_vc, [sec_functions].functionname_vc
from [sec_umrf_details]
join [sec_mrf_details] on [sec_umrf_details].mrfno_nu = [sec_mrf_details].mrfno_nu
join [sec_modules] on [sec_mrf_details].modid_int = [sec_modules].modid_int
join [sec_roles] on [sec_mrf_details].roleid_int = [sec_roles].roleid_int
join [sec_functions] on [sec_mrf_details].fnid_int = [sec_functions].fnid_int
where [sec_umrf_details].userid_vc = 'i-jadoon'
kami124
15-Aug-11 6:22am
View
windows user
kami124
14-Aug-11 2:06am
View
the column name is correct
i set is identity specification "yes"
kami124
14-Aug-11 2:04am
View
ya it is
kami124
11-Aug-11 4:37am
View
ok thanks
i solved it
kami124
11-Aug-11 3:54am
View
now where i have to change in my code to get user id's also
kami124
11-Aug-11 3:53am
View
i am saying by this code i got all users name from active diractory
now what to do
to get all users id from active diractory as well in saved in combobox1
now its clear
kami124
10-Aug-11 5:24am
View
ok then
when i use main application exe
then from where i get the process
becouse in exe that is not attached
kami124
10-Aug-11 3:56am
View
i am newly in c sharp
sometime i dont come to know what i write on google to search
kami124
10-Aug-11 2:46am
View
this i want to do programittacially
kami124
10-Aug-11 1:51am
View
public static void create_button()
{
for (int i = 0; i < arrlist.Count; i++)
{
string value = arrlist[i] as string;
value.visible=true
}
MessageBox.Show(value);
}
now over here value and button name are same and i want to set visible like this
kami124
9-Aug-11 6:13am
View
ok i make it like this
but the result is displaying name of field
but i need the values of field
i make my code like this
select modname_vc
from sec_modules
inner join sec_mrf_details on sec_modules.modid_int=sec_mrf_details.modid_int
inner join sec_umrf_details on sec_mrf_details.mrfno_nu=sec_umrf_details.mrfno_nu
where sec_umrf_details.userid_vc='ali'
kami124
9-Aug-11 5:33am
View
ya its showing only the field name
i want field values
kami124
9-Aug-11 1:28am
View
yes this was my mistake
at the end i got it thanks
kami124
9-Aug-11 1:27am
View
sorry yestarday i was away so i couldnt reply you were absolutaley right
thanks a lot
kami124
8-Aug-11 7:32am
View
ya might be u r right
i will check it
kami124
8-Aug-11 7:23am
View
no, what i think problem is some wher here
subitem.Visible = true;
before all the code is working perfectally
kami124
8-Aug-11 6:54am
View
ya simply it can be done like this
but when my form load
i click on item1 one function is called
and this way five different functions are called one by one
e.g
private void item1_Click(object sender, EventArgs e)
{
function1()
}
function1()
{
function2()
}
function3()
{
menu1.visible=true
}
its actually like this
kami124
8-Aug-11 6:49am
View
any where except form_load
kami124
8-Aug-11 6:49am
View
not clear
kami124
7-Aug-11 5:30am
View
no i have a menu
then menu1
menu2
menu3
i dont have any sun menus
kami124
7-Aug-11 5:11am
View
now i make it like this
menuStrip1.Items[subitem.Name.Trim()].Enabled = true;
the error came object reference not set to an instance of an object
kami124
7-Aug-11 5:01am
View
no i didn't make it false any where and i am using the menustrip
i think problem is some where here
subitem.Visible = true;
kami124
7-Aug-11 4:05am
View
do u find some solution for my problem
kami124
7-Aug-11 3:37am
View
ya i check it under debugger every thing is ok
both subitem.Name.Trim() and display_form_str has same string
kami124
7-Aug-11 3:35am
View
no thats not the problem
what i think problem is of identifiers but i am not sure becouse i try with different identifiers
if (subitem.Name.Trim() == display_form_str)
this statemnt is true then
subitem.Visible = true;
this statement is also executed but visibility dosent change
kami124
7-Aug-11 3:02am
View
ok very nice now evert thing is working properly
but the problem is with visibility
subitem.Visible=true;
is executed but its visibility is not changed
can u help that whats the problem
kami124
7-Aug-11 2:56am
View
but the problem here is its visibility is not changed
by the default i set all items visibility false
kami124
7-Aug-11 2:52am
View
subitem.Name
i done it like this is this ok
kami124
7-Aug-11 2:48am
View
ya now its working now its checking but i want to check by its name
not by its text
kami124
7-Aug-11 2:41am
View
menu items are drop down menu
yes they are like this item1 item2 item3 item4 item5
kami124
7-Aug-11 1:48am
View
ok that currly bracket i already make it
the problem is some where else
kami124
7-Aug-11 1:17am
View
what you have update you write the same code which i wrote
i think you did not understand my question
see again
i have menustrip1
having items
item1
item2
item3
item4
and in dispaly_form_str has
item1 or item2 or item3 or item4
kami124
4-Aug-11 7:15am
View
how to use foreach with this code
kami124
4-Aug-11 6:55am
View
there is an error
could not find the implementation of querry pattern
how to do this
kami124
4-Aug-11 6:29am
View
here the error is could not find the implementation of querry pattern
kami124
4-Aug-11 5:15am
View
thank you very much
helping me in such a nice way
kami124
4-Aug-11 4:58am
View
private void formm_display_function(string display_form_str)
{
menuStrip1.Items[display_form_str].Visible = true;
}
i have done likr this but there is an error
"object reference not set to an instance of an object"
kami124
4-Aug-11 4:43am
View
now i did it like this but still its not setting it visible ture
if (display_form_str == "Users1")
Users1.Visible = true;
else
{
if (display_form_str == "Roles2")
Roles2.Visible = true;
else
{
if (display_form_str == "Functions4")
Functions4.Visible = true;
else
{
if (display_form_str == "FunctionA5")
FunctionA5.Visible = true;
else
{
if (display_form_str == "UserMRF")
FunctionB6.Visible = true;
else
messagebox.show("sorry");
kami124
4-Aug-11 4:30am
View
but still there is some problem
display_form_str="item1"
but in the code this ctrl.Length remains null
i didnt understand how to handle it
kami124
4-Aug-11 4:15am
View
private void formm_display_function(string display_form_str)
{
for (int i = 0; i < function_list_display.Count; i++)
{
Control[] ctrl = this.Controls.Find(function_list_display[i], false);
if (ctrl.Length == 1)
{
ctrl[0].Visible = true;
}
}
}
kami124
4-Aug-11 4:15am
View
here is my actual code check where i make a mistake
private void formm_display_function(string display_form_str)
{
// string[] theArr = new string[] { "listView1" };
// foreach (string item in function_list_display)
for (int i = 0; i < function_list_display.Count; i++)
{
Control[] ctrl = this.Controls.Find(function_list_display[i], false);
if (ctrl.Length == 1)
{
ctrl[0].Visible = true;
}
}
}
kami124
4-Aug-11 4:10am
View
ok when this condition will become true
if (ctrl.Length == 1)
kami124
4-Aug-11 3:08am
View
thanks
kami124
4-Aug-11 2:55am
View
here is little problem
e.g id= 123
name=asdf
then
iname=123asdf
but i want like this
asdf123
how to do this
kami124
4-Aug-11 2:22am
View
thanks
kami124
3-Aug-11 6:49am
View
how to get max(id) from table
kami124
1-Aug-11 2:42am
View
thanks
kami124
31-Jul-11 6:49am
View
ya its on another menustrip item
kami124
31-Jul-11 6:31am
View
ya from these menu items i have to open froms
kami124
31-Jul-11 6:12am
View
here is my code
private void formm_display_function(string display_form_str)
{
int A;
if (display_form_str == "Modules")
A = 1;
else
{
if (display_form_str == "Roles")
A = 2;
else
{
if (display_form_str == "Functions")
A = 3;
else else
A = 0;
}
}
switch (A)
{
case 1:
ModuleManagementToolStripMenuItem.Visible = true;
addNewModuleMenuItem.Visible = true;
break;
case 2:
RoleManagementMenuItem.Visible = true;
AddNewRoleMenuItem.Visible = true;
break;
case 3:
FunctionManagementMenuItem.Visible = true;
AddNewFunctionAMenuItem.Visible = true;
AddNewFunctionBMenuItem.Visible = true;
break;
default:
MessageBox.Show("Invalid");
break;
}
}
kami124
31-Jul-11 5:55am
View
ok, its clear now i have to add the string in menustrip
kami124
31-Jul-11 5:21am
View
no, i need only one column modname_vc
and these values i want to add on toolstrip
kami124
31-Jul-11 5:19am
View
when breakpoint hit its false
and after hiting it remain false
but my statement over ther is visible=true
kami124
31-Jul-11 5:16am
View
i got that actually i was adding the column into string its done now
i want to add these string items into an menu strip
here is my new code
if (rdr.HasRows)
{
StringBuilder sb = new StringBuilder();
string a;
int i = 0;
while (rdr.Read())
{
sb.Append(((string)rdr["modname_vc"]).ToString());
sb.Append("\n");
a = sb.ToString();
module_name_menustrip[i] = a;
menuStrip1.Items.Add(module_name_menustrip[i]);
sb.Length = 0;
count1++;
i++;
}
}
but i cannot view it on menu strip
kami124
31-Jul-11 4:36am
View
i put the break point but its not setting it visible and then i again set that item visible but still its not working
i dont know whats the problem
kami124
31-Jul-11 3:26am
View
i just make there visibility false by default else i didnt change any where
kami124
28-Jul-11 7:02am
View
same thin i have done but still
select sec_mrf_details.fnid_int
from sec_umrf_details
inner join
sec_mrf_details
on
sec_umrf_details.mrfno_nu = sec_mrf_details.mrfno_nu
where
sec_umrf_details.userid_vc='i-jadoon'
and
sec_umrf_details.mrfno_nu=1
kami124
28-Jul-11 6:30am
View
here in my code
sec_umfr_details is table 1 having userid_vc, mrfno_nu
sec_mrf_details is table 2 having mrfno_nu and fnid
i have userid_vc and mrfno_nu
and i have to display fnid
kami124
28-Jul-11 6:27am
View
but the value is not displaying only the name of field is displayed
select sec_mrf_details.fnid_int
from sec_umrf_details
inner join
sec_mrf_details
on
sec_umrf_details.mrfno_nu = sec_mrf_details.mrfno_nu
where
sec_umrf_details.userid_vc='abc'
and
sec_umrf_details.mrfno_nu=1
kami124
28-Jul-11 2:24am
View
the problem is here in this line
sb.Append(((int)rdr[mod_int] && rdr[rol_int]));
kami124
28-Jul-11 2:14am
View
at
sb.Append(((int)rdr[mod_int] && rdr[rol_int]));
how to read from multiple columns
before i done for single column like this which is working perfectally
sb.Append(((int)rdr[mod_int]// this code is for one column
but how to do for two columns
kami124
27-Jul-11 6:28am
View
ok nice
thanks alot its mean for command.commandText i have to write direct querry not any styored querry
ok thanks
kami124
27-Jul-11 6:01am
View
i change it but still the same problem
kami124
27-Jul-11 5:12am
View
here are the querries
sql_querry_string1 = "SELECT count(*) FROM sec_users WHERE (userid_vc) = ('" + (textBoxUserId.Text.Trim()) + "')";
sql_querry_string = "DELETE FROM sec_users WHERE (userid_vc) = ('" + (textBoxUserId.Text.Trim()) + "')";
kami124
27-Jul-11 5:11am
View
here is my code
public static void function_sql_connection_delete(string str_querry, string str_querry1, string str_id)
{
try
{
int count = 0;
sql_string = ("Data Source=aaa.asd.fdsf.gfhfg;Initial Catalog=sdfsdC;User Id=fghgfh;Password=gfhfghf");
SqlConnection conn = new SqlConnection(sql_string);
conn.Open();
SqlCommand command = conn.CreateCommand();
command.CommandText = (str_querry1);
int i = 0;
i = (int)command.ExecuteNonQuery();
if (i != 0)
{
MessageBox.Show("Record is Present in data base");
SqlCommand deleteCmd = new SqlCommand(str_querry, conn);
int res = 0;
res = deleteCmd.ExecuteNonQuery();
if (res > 0)
{
MessageBox.Show("Record is deleted Successfully");
count++;
conn.Close();
}
else
{
MessageBox.Show("Failed to delete the Record");
conn.Close();
}
}
else
{
MessageBox.Show("There is no such Record present in the List");
conn.Close();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
MessageBox.Show("Error in database connection");
}
}
kami124
27-Jul-11 4:52am
View
please come on its just example i wrote it in proper way there is no problem in the string
the problem is executing i=(int)cmd.ExecuteScalar(); and the value of i become -1
kami124
27-Jul-11 4:41am
View
still there is problem its executing
i=(int)cmd.ExecuteScalar();
and the value of i become -1
kami124
27-Jul-11 3:25am
View
hi there is some problem here in the above code which i make it
i=(int)cmd.ExecuteScalar();
the error is object refrence not set to an instance of an object
how to handle it
kami124
27-Jul-11 1:43am
View
ya you are absolutaly right but still there is one more problem
that before deleting from data base a message box show to re confirm it
if "yes" then delete and if no dont delete
kami124
26-Jul-11 9:50am
View
no not yet
kami124
26-Jul-11 9:39am
View
in windows forms
kami124
26-Jul-11 9:21am
View
if i use SelectedRow.Cells[1] the error is does not contain the defination for SelectedRow
if i use SelectedRows.Cells[1]or SelectedRows.Cell[1] the error is does not contain defination for Cells or Cell
kami124
26-Jul-11 9:13am
View
sorry to say i checked this before i think problem is some where else
let see
kami124
26-Jul-11 8:41am
View
string s1 = dataGridViewUser.SelectedRows.Cell[1].Text;
i am saying that in my above statement there is error
and is not executing
kami124
26-Jul-11 8:31am
View
string s1 = dataGridViewUser.SelectedRows.Cell[1].Text;
i do it like this
but here is one problem that
no extension method Cells accepting the first argument
kami124
26-Jul-11 8:22am
View
i use it like this but there is a problem
taht no extension method select row accepted
textBoxUserId.Text = dataGridViewUser.SelectedRows.Cell[1].Text;
kami124
26-Jul-11 7:21am
View
OK thanks!
sometime very little problem dosent come to mind
kami124
26-Jul-11 5:16am
View
sorry to disturb you
ok i got it
thanks
kami124
26-Jul-11 5:12am
View
can u please tell whats the problem now
the erro is not all code path return a values
private string RemoveNonAlphabets(string str)
{
StringBuilder sb = new StringBuilder();
for (int i = 0; i < str.Length; i++)
{
if (!((str[i] >= 'a' && str[i] <= 'z') || str[i] == '-'))
{
sb.Append(str[i]);
}
return sb.ToString();
}
}
kami124
26-Jul-11 4:32am
View
here is my function
private string RemoveNonAlphabets(string str)
{
StringBuilder sb = new StringBuilder();
for (int i = 0; i < str.Length; i++)
{
if(char.IsLetter(str[i]) || char.IsSeparator(str[i]))
sb.Append(str[i]);
}
kami124
26-Jul-11 4:25am
View
i make this function can u please tell me what i have to use for "-" becouse seperator is not working
private string RemoveNonAlphabets(string str)
{
StringBuilder sb = new StringBuilder();
for (int i = 0; i < str.Length; i++)
{
if(char.IsLetter(str[i]) || char.IsSeparator(str[i]))
sb.Append(str[i]);
} return sb.ToString();
}
kami124
25-Jul-11 8:34am
View
thanks
kami124
25-Jul-11 4:56am
View
ok its perfect
thanks
kami124
25-Jul-11 4:53am
View
no its just a querry, i am doing this in c sharp
kami124
25-Jul-11 1:14am
View
no, brother here my application is desktop
i know its name space but i dont know how to use it
switch user
using System.Management; // This is needed for manipulating services
using System.Security.Principal;//This is needed for logged-in user name
kami124
25-Jul-11 1:04am
View
ya this is my question how i have to do with in the application
ofcourse the one whih you sujjecting is not something in programming i want to switch user programmically
kami124
24-Jul-11 5:11am
View
what do you mean, i didnt understand
kami124
24-Jul-11 4:26am
View
hav you understand my question or not
kami124
24-Jul-11 4:08am
View
i want to create an application in which that application is only for the domain user
if someone has that application so my security module will authenticate that user from active diractory
that current login user is member of domain or not
in simple
authentication user from active diractory
kami124
24-Jul-11 3:33am
View
for(int i=0; i
kami124
24-Jul-11 3:32am
View
no thing over it is i am not getting items by their indexes i want to set conditions regarding their indexes like
for(int i=0; i
kami124
24-Jul-11 3:29am
View
no thing over it is i am not getting items by their indexes i want to set conditions regarding their indexes like
for(int i=0; i
kami124
21-Jul-11 5:57am
View
ya win forms
kami124
21-Jul-11 5:31am
View
ya win forms
kami124
21-Jul-11 1:31am
View
thank you very much
you are absolutally right
kami124
21-Jul-11 1:18am
View
if the problem is with the cases it will not execute the statement
but i told you that when a set a break point the satements are executing
but action is not performed
i thnik there is some other problem
kami124
21-Jul-11 1:14am
View
no, its still not
listen i use here function modifiers private
the function whic call this function is also private
and menu items are public
might be problem some where over there
kami124
21-Jul-11 0:58am
View
its enabled by default
i want to change its visibility
kami124
20-Jul-11 10:18am
View
ok!
before current page was not responding so done this text on other page
at the end both were sent
kami124
20-Jul-11 9:00am
View
sorry brother today i disturb you too much but the think over here is like
that i have more then hundred values in both comboboxes
i hav to perform operation on all the items of combobox1 and combobox2
e.g. item1 of combobox1 with all items of combobox2 and in this way i have to perform operation on all items of both combobox items its in two dimmension
for(int i = 0; i> combox1.items.count; i++)
{
for(int j = 0; j> combox2.items.count; j++)
{
operation [i][j];
}
}
kami124
20-Jul-11 8:40am
View
the problem here is i am not getting properly the combobox items
how to get combobox items
i dont want to check it by items
i want to check by the item index
becouse i have more then hundred records in both combox
kami124
20-Jul-11 8:18am
View
no, both combobox has differnt kind of values
if (combobox1.SelectedValue == item1 && combobox2.SelectedValue== item2)
my condition should be like this
kami124
20-Jul-11 7:51am
View
sorry i was away
i checked every thing but i didn't got
i think problem is me geting mod_int, and rol_int from combobox as a index .
can you please tell me that how to get combobox items by their indexes
i have two combo box
combobox1, combobox2
i want to relate the items of both the combo boxes
e.g. item1 of combobox1 == item5 of combobox2
then do operation one
becouse i found you as the most technical person in project code
kami124
20-Jul-11 6:22am
View
the same error is again coming
kami124
20-Jul-11 6:17am
View
mod_int is in column 2
and rol_int in column 3
but i am not using column 1 (becouse i have to get value from these two columns)
and the output value is from column 4
kami124
20-Jul-11 6:13am
View
reader has to read from two column
and output is one column
kami124
20-Jul-11 3:10am
View
now listen i have two combo boxes
combobox1, combobox2
i load the values in both comboboxes
now i want to perform some operations deponds upon the item selection from each combobox
e.g.
if i select item1 from combox1 and item3 from combobox2
operation1 will perform and so on....
now i think its clear
kami124
20-Jul-11 2:57am
View
its not a simple problem
i have more then hundred values
can i get these values by their indexes
kami124
20-Jul-11 2:55am
View
but i want to check by its index
becouse i have hundreds of values in combobox
i cant make it for each item value
kami124
20-Jul-11 2:15am
View
ya of cource its in proper place i think mistake is some where combox1.selectdindex, i think i have to use some other function but i am not sure
becouse when i debug it index value comes to -1
kami124
20-Jul-11 2:03am
View
i make it combobox1.items.count
still not getting the message
kami124
19-Jul-11 1:40am
View
thanks, so nice of you
kami124
19-Jul-11 1:20am
View
ya ok right but still getting problem here is my querry please tell me how to do
"DELETE FROM sec_users WHERE userid_vc = ('"+(textBoxUserId.Text) + "')"
kami124
18-Jul-11 3:01am
View
ya want to write 'n' in textbox "NAME"
OK i me doing the key events
kami124
17-Jul-11 5:39am
View
thanks "Original Griff" at the end i got the solution i was writing primary keys twice
thanks alot
kami124
17-Jul-11 5:32am
View
where is your answer
kami124
17-Jul-11 4:54am
View
ok
ok please
here is my stored procedure
USE [GCERP_SEC]
GO
/****** Object: StoredProcedure [dbo].[proc_userinfo] Script Date: 07/17/2011 08:04:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[proc_userinfo] (@uid nvarchar(50),@uname nvarchar (50), @uip nvarchar (50) )
as
INSERT INTO [GCERP_SEC].[dbo].[sec_users]
([userid_vc]
,[username_vc]
,[createdby_vc]
,[creationdate_dt]
,[modifiedby_vc]
,[modificationdate_dt]
,[ipadd_vc]
,[pcname_vc])
VALUES
(@uid, @uname, @uname, GETDATE(), @uname,GETDATE(),@uip, HOST_NAME())
what code i have to write in c sharp to update my table,
kami124
17-Jul-11 4:52am
View
ok please
here is my stored procedure
USE [GCERP_SEC]
GO
/****** Object: StoredProcedure [dbo].[proc_userinfo] Script Date: 07/17/2011 08:04:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[proc_userinfo] (@uid nvarchar(50),@uname nvarchar (50), @uip nvarchar (50) )
as
INSERT INTO [GCERP_SEC].[dbo].[sec_users]
([userid_vc]
,[username_vc]
,[createdby_vc]
,[creationdate_dt]
,[modifiedby_vc]
,[modificationdate_dt]
,[ipadd_vc]
,[pcname_vc])
VALUES
(@uid, @uname, @uname, GETDATE(), @uname,GETDATE(),@uip, HOST_NAME())
what code i have to write in c sharp to update my table, if u will then i wll accept ur answer with 5 marks
ok cheers
sorry to say all this becous i try alot but yet not got the solution
kami124
17-Jul-11 4:49am
View
no the problem is still there
i told you that its not a mistake in my code i wrote correct over there
but here i didnt write correct
in my code its already "@uid" in cs and in sp
problem is some where else
offcourse i will cheers and your answer if i got the solution
kami124
17-Jul-11 4:37am
View
execute a transact SQL statements against the connection and returns the number of rows effected
kami124
17-Jul-11 4:37am
View
ya its correct it was mistake here
in my code its correct
kami124
17-Jul-11 4:19am
View
ya its already the same thing in my code
problem is some where else
which i am alos not getting
kami124
17-Jul-11 4:03am
View
here is my stored procedure
USE [GCERP_SEC]
GO
/****** Object: StoredProcedure [dbo].[proc_userinfo] Script Date: 07/17/2011 08:04:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[proc_userinfo] (@uid nvarchar(50),@uname nvarchar (50), @uip nvarchar (50) )
as
INSERT INTO [GCERP_SEC].[dbo].[sec_users]
([userid_vc]
,[username_vc]
,[createdby_vc]
,[creationdate_dt]
,[modifiedby_vc]
,[modificationdate_dt]
,[ipadd_vc]
,[pcname_vc])
VALUES
(@uid, @uname, @uname, GETDATE(), @uname,GETDATE(),@uip, HOST_NAME())
kami124
17-Jul-11 4:02am
View
here is the error
execute a transact SQL statements against the connection and returns the number of rows effected
kami124
17-Jul-11 3:53am
View
here is my stored procedure
USE [GCERP_SEC]
GO
/****** Object: StoredProcedure [dbo].[proc_userinfo] Script Date: 07/17/2011 08:04:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[proc_userinfo] (@uid nvarchar(50),@uname nvarchar (50), @uip nvarchar (50) )
as
INSERT INTO [GCERP_SEC].[dbo].[sec_users]
([userid_vc]
,[username_vc]
,[createdby_vc]
,[creationdate_dt]
,[modifiedby_vc]
,[modificationdate_dt]
,[ipadd_vc]
,[pcname_vc])
VALUES
(@uid, @uname, @uname, GETDATE(), @uname,GETDATE(),@uip, HOST_NAME())
kami124
17-Jul-11 3:48am
View
you just please tell me that if u have this procedure which has three parameters how u will updtae your table
proc_function(@u_id, @u_name, u_ip)
this is connection string
sql_string = ("Data Source=23423423423;Initial Catalog=sdfgsdf;User Id=dsfsdsa;Password=sdfsdf;");
...... how it will be then, becouse i try alot but afer command.executenonquerry()
its not executing and give exceptions
kami124
17-Jul-11 3:42am
View
no, its still not working
what to do
kami124
17-Jul-11 3:09am
View
i update my question please go through it
kami124
17-Jul-11 3:09am
View
i update my question please go through it
kami124
17-Jul-11 2:52am
View
local_ip is declared in the same class as a global variable
kami124
17-Jul-11 2:50am
View
u_id = 'saad123'
u_name = 'saad'
u_ip = local ip adress
str_querry is a stored procedure where i have to pass three arguments
first column returned the result and other columns are ignored
kami124
17-Jul-11 2:10am
View
ya i told you that defualt i set visibility as a false and in display function i want to set it as a true
kami124
13-Jul-11 7:47am
View
ya both these are right i dont whats the problem and where exactly it is
lte see
kami124
12-Jul-11 4:31am
View
thank you ver much i appreciate you.
Show More