15,897,273 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 Python 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 babli3 (Top 168 by date)
babli3
27-Jan-16 7:54am
View
Hi Ryan,
public static FileInfo GetNewestFile(DirectoryInfo directory)
{
return directory.GetFiles()
.Union(directory.GetDirectories().Select(d => GetNewestFile(d)))
.OrderByDescending(f => (f == null ? DateTime.MinValue : f.LastWriteTime))
.FirstOrDefault();
}
FileInfo newestFile = GetNewestFile(new DirectoryInfo(@"C:\Log"));
This code will give me the latest downloded log file . now I have to read the contents from this file and pick the max id from it.
Can you please suggest how I can achieve this.
Thanks
babli3
29-Oct-14 8:57am
View
Thanks This has beedn resolved now.
Web service was no longer using SSL3 instead we had to use Tls.
Thanks for your responses.
babli3
22-Sep-14 5:00am
View
Thank You
babli3
16-Sep-14 6:06am
View
ok thank you. will try this
babli3
16-Sep-14 5:25am
View
Hi
vs 2013 express and classic asp
babli3
5-Sep-14 7:31am
View
sorry i mean app.config.
Ok Thanks alot
babli3
5-Sep-14 7:13am
View
Thank you. My windows forms contains only a grid and connection string is in web.config.
But the users where this exe will be installed will not have sqlserver installed at all.
Do i still need to attach my db?
babli3
5-Sep-14 6:54am
View
I didnt attach any database to the set up ...do i need to attach the database aswell?
babli3
2-Sep-14 11:26am
View
Hi Thanks.
I tried this earlier , its not working either.
userid is (int) in this format 0x0000000000000576
babli3
1-Sep-14 10:13am
View
My combo box has all employee names (a-z).Thanks
babli3
1-Sep-14 10:08am
View
It is a string . I want that string to be converted as binary
babli3
26-Aug-14 12:18pm
View
i tried
private void dgvReport_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
{
var Processstartinfo = new ProcessStartInfo
{
FileName = "cmd"
};
Process process = Process.Start(Processstartinfo);
}
I want to open the command prompt with that particular path.
Thanks
babli3
26-Aug-14 6:29am
View
Thank You :)
babli3
21-Aug-14 4:46am
View
Hi Kumar
This is the query which i used before and was giving me output with 0.
output:
27, 0, PL1 1DQ
I dont want this 0 to be displayed.
Many Thanks
babli3
20-Aug-14 12:37pm
View
Hi
Its throwing an error
Msg 8114, Level 16, State 5, Line 2
Error converting data type varchar to numeric
Thanks
babli3
20-Aug-14 12:28pm
View
Thank You
babli3
20-Aug-14 5:19am
View
I Changed the query
select (CAST(ISNULL(BuildingNumber,0) AS NVARCHAR(20)) +', '+ ISNULL(BuildingName,0) +', '+ ISNULL(Postcode,0)) as CompleteAddress from AddressRecord
where( CAST(ISNULL(BuildingNumber,0) AS NVARCHAR(20)) +' ,'+ ISNULL(BuildingName,0) +' ,'+ ISNULL(Postcode,0) )like '%PL1 1DQ%'
But now the output I am getting is with 0 aswell.
output:
27, 0, PL1 1DQ
Please can u suggest me as I dont want this 0 to be displayed.
Many Thanks
babli3
20-Aug-14 4:57am
View
If one of the column is null then it is not displaying anything.
Please could you suggest how to resolve this.Thanks
babli3
20-Aug-14 4:53am
View
Thank You it's working:)
babli3
20-Aug-14 4:50am
View
Hi
Thank You .
But when I am running this query it's giving me empty result.
But I do have values in the database for this postcode.
Many Thanks
babli3
15-Aug-14 11:45am
View
Hi richard! Thanks for the reply.
The details are stored in a database and Pivotal CRM system access the same database.
We have credentials to connect to the system.
Thanks
babli3
8-Aug-14 5:24am
View
I still couldnt resolve it.
I am trying different things but none of them working.
If you find any solution please do post it.
Many Thanks
babli3
7-Aug-14 4:45am
View
Hi Thanks for the reply
Yes I am accessing the web service remotely.
Can you please post me sone examples to write firewall rules as I am new to WCF.
Thank You
babli3
14-May-14 8:58am
View
Thanks alot
babli3
14-May-14 8:13am
View
it is the value from the data reader
babli3
14-May-14 8:09am
View
it is decimal
babli3
8-May-14 10:04am
View
Hi Thanks
but in the same script i need to even add if it exists then alter the column .
How Do I do that? Thanks
babli3
6-Dec-13 10:18am
View
Thank you so much...its working...u solved my big problem.thanks once again
babli3
6-Dec-13 10:07am
View
Thank u so much for your help:)
babli3
6-Dec-13 7:26am
View
Deleted
Hi
Thanks for your reply.
Yes i have a column name stage
bokId QuesId Question Stages
1 1 question1 Book
.
..
10 1 question1 Travel
11 2 question2 Travel
.....
I dont have any experience in writing triggers.Please can u help me to update this.Thanks
babli3
6-Dec-13 6:37am
View
H THis is updating all the rows thats fine. But in my table there are 3 stages where each stage is having they own set of questions.
Assume: Stage1
question1 .......question10
Stage2
Question1......Question5
How can I updatedelending on each stage.
Thank you so much.
babli3
6-Dec-13 6:03am
View
Ok Thank you I will try this.
babli3
6-Dec-13 5:18am
View
Thanks
babli3
6-Dec-13 5:17am
View
Thanks
babli3
7-Nov-13 6:58am
View
ok
babli3
7-Nov-13 6:55am
View
Hi Its a jquery popup
babli3
9-Oct-13 10:40am
View
hi thanks and what about classic asp?
babli3
8-Oct-13 11:40am
View
thanks
babli3
24-Sep-13 5:53am
View
thank u
babli3
24-Sep-13 5:38am
View
thanks
babli3
24-Sep-13 5:36am
View
HiIs this right .... I am assigning the above session values for the different(2nd page) page
sYear = Session["Year"].ToString();
sNo = Session["no"].ToString();
Thanks
babli3
24-Sep-13 5:36am
View
HiIs this right .... I am assigning the above session values for the different(2nd page) page
sYear = Session["Year"].ToString();
sNo = Session["no"].ToString();
Thanks
babli3
23-Sep-13 11:55am
View
ok thank you :)
babli3
23-Sep-13 11:40am
View
Hi
I cannot assign the actual values because the values changes according to the project...
babli3
23-Sep-13 11:39am
View
Hi
I want these query string values to be used in my another page....Thanks
babli3
23-Sep-13 11:37am
View
Yes sorry ! I was not clear actaully..
I have one master page from where we will get these query string values and then I have to store these values into session so that these can be accessed in another pages.... thanks
babli3
23-Sep-13 11:37am
View
Yes sorry ! I was not clear actaully..
I have one master page from where we will get these query string values and then I have to store these values into session so that these can be accessed in another pages.... thanks
babli3
12-Sep-13 6:29am
View
Yes Mona I did... thanks....
babli3
2-Aug-13 9:01am
View
Thank You ....
Its working now ...Actually it didnt require any break...as it was executing line by line.Thank You for your help:)
babli3
2-Aug-13 7:38am
View
Thank You
babli3
2-Aug-13 7:37am
View
Hi Adarsh
Its throwing me an error...
babli3
2-Aug-13 7:10am
View
Thank you ...I will try this
babli3
2-Aug-13 5:59am
View
But if I want to have a break keyword in this function how can I do that...sorry I am bit new to sql server functions...
babli3
2-Aug-13 5:47am
View
ok thanks
babli3
2-Aug-13 5:40am
View
I want this statement to execute one by one... so I want to add a break keyword to this function.Thanks
babli3
2-Aug-13 5:40am
View
I want this statement to execute one by one... so I want to add a break keyword to this function.Thanks
babli3
29-Jul-13 7:03am
View
Thank You...
babli3
29-Jul-13 6:50am
View
Ok
babli3
29-Jul-13 6:50am
View
Ok Thanks
babli3
29-Jul-13 6:48am
View
Deleted
ok thanks u
babli3
29-Jul-13 6:36am
View
Thanks ! Actually if I try to upload the same file again then it should delete the old one and update the new one...
Do I need to remove the unique nonclustered index ...sorry i am quite new into development. Thanks
babli3
29-Jul-13 6:26am
View
Can you please suggest me , do I need to change the Stored procedure or table because I am quite new into development... so thought someone could guide me on this.
Thanks
babli3
15-Jul-13 10:07am
View
ok thank you...
babli3
15-Jul-13 9:59am
View
Thank you
babli3
15-Jul-13 9:58am
View
ok thanks I will share my code....
babli3
15-Jul-13 9:58am
View
I changed the web.config file aswell... is there any way I can check the business layer code in my test server.
babli3
12-Jul-13 6:02am
View
HI
Can you pls advice.... I changed few things in business layer...so i copied the dll's and pasted in respective bin folder(test server) and then changed the web.confog aswell.
Do I need to do anything else? sorry i am a fresher...thanks
babli3
12-Jul-13 5:49am
View
yes i changed it and its inserting properly but it rolls back after sometime....I only changed my code in business layer...so i copied and pasted the respective dll's. Thanks
babli3
12-Jul-13 5:47am
View
Thank you
babli3
12-Jul-13 5:43am
View
ok thanks
babli3
5-Jul-13 11:17am
View
ok thanks
babli3
5-Jul-13 11:10am
View
I have a test server and my changes are in business layer, so please can you tell me how can i apply them to test on test server. thanks
babli3
5-Jul-13 11:10am
View
thanks...I have a test server and my changes are in business layer, so please can you tell me how can i apply them to test on test server. thanks
babli3
5-Jul-13 11:09am
View
thanks
babli3
5-Jul-13 10:10am
View
ok sorry i am a fresher... i thought it is same as svn... I have used svn before but not source safe.
Thanks
babli3
5-Jul-13 6:52am
View
Thank you so much
babli3
5-Jul-13 6:52am
View
Thank you so much
babli3
5-Jul-13 6:52am
View
Thank you so much
babli3
5-Jul-13 5:29am
View
ok thanks i am going to remove them and run the code again....
babli3
5-Jul-13 5:29am
View
ok thanks i am going to remove them and run the code again....thank you
babli3
5-Jul-13 5:26am
View
But my table has all 23 parameters ...will it make any difference if my table has 23 parametrs...sorry i am a fresher...thanks
babli3
5-Jul-13 5:15am
View
When i debugged this exception i got
" Procedure or function IMS_NB_EMRUP_Client_Insert has too many arguments specified"...
Thanks
babli3
5-Jul-13 5:15am
View
When i debugged this exception i got
" Procedure or function IMS_NB_EMRUP_Client_Insert has too many arguments specified"...
Thanks
babli3
4-Jul-13 16:11pm
View
Ok I will thanks
babli3
4-Jul-13 11:06am
View
Thanks the error is gone when i restarted the IIS. Thanks for your help :)
babli3
4-Jul-13 7:22am
View
thanks alot
babli3
4-Jul-13 7:20am
View
Deleted
Sorry I am a fresher , if you dont mind can you please link me the steps to reset IIS.
Thank you
babli3
4-Jul-13 7:02am
View
Hi I have debugged my code and found this error
I could not understand why i got this error....
please can you help
""DataPortal.Update failed (System.ApplicationException: An error occurred whilst open a connection to a database. System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
babli3
4-Jul-13 6:20am
View
Yeah I understand thanks
babli3
4-Jul-13 6:05am
View
Hi,
Sorry still couldnt fix the problem. when i debugged i found _fileGuid has null value... please help if you can...Thanks
babli3
28-Jun-13 6:41am
View
Ok thank you
babli3
28-Jun-13 6:40am
View
Thank you
babli3
28-Jun-13 6:40am
View
Thank you
babli3
28-Jun-13 6:36am
View
hi I did google it but couldnt actually understand as i am a fresher. So thought someone from this blog can give me better view. Thanks
babli3
28-Jun-13 5:32am
View
Thanks I will check that.
babli3
28-Jun-13 5:27am
View
Hi It works fine when i run the stored procedure in sql management studio.
But when I am debugging in visual studio , I found the exception "Update fails in inserting the values". Thanks
babli3
26-Jun-13 7:25am
View
Thank You
babli3
26-Jun-13 5:09am
View
HI i am using the following namespaces
using System.Collections;
using New.Business.eMRUpload;
using System.Threading;
using New.Business.Core.Security;
using System.Collections.Generic;
babli3
25-Jun-13 11:57am
View
if (temp.Completed != -1)
{
completedClients += temp.Completed;
}
hi i am getting error here...
babli3
25-Jun-13 11:38am
View
I am getting the error when i upload my file. It says 50% uploded and then says 100% complteed and gives me the error "upload fails and file rollbacks.thanks
babli3
25-Jun-13 8:05am
View
Hi thanks. I have updated the code where i am getting this error. Please help.thank you
babli3
24-Jun-13 5:55am
View
I have posted my code.Thanks
babli3
24-Jun-13 5:55am
View
I have posted my code.Thanks
babli3
24-Jun-13 5:55am
View
I have posted my code.Thanks
babli3
12-Jun-13 5:56am
View
Thanks
babli3
12-Jun-13 5:54am
View
Thank You
babli3
18-Apr-13 10:02am
View
yes i did
babli3
18-Apr-13 9:51am
View
yes I have this in my LoadDetailsmethod(). But still its inserting the default values only.
babli3
18-Apr-13 9:09am
View
Hi Tushar
Thanks
The above code displays the default data on page load but , it is inserting only the default values into the database. Its not inserting the new values i m selecting.Thanks
babli3
18-Apr-13 8:53am
View
Deleted
Hi Zafar
Thank you
Dropdownlists are inserting the new value i selected .
But the text box is still not taking any new value which i am entering . Please help
Thanks
babli3
18-Apr-13 6:56am
View
Thank You...
babli3
18-Apr-13 6:47am
View
Really sorry to bother you...
Now getting this error:
'DropDownList1' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value
babli3
18-Apr-13 6:32am
View
Hi
I just posted my code. Thank you
babli3
18-Apr-13 6:25am
View
Assume my default values are 3,india
and i want to insert 5, uk
But 3, india (default values) are getting inserted into the database...thanks
babli3
18-Apr-13 6:22am
View
yes
babli3
18-Apr-13 6:16am
View
Hi Zafar
Thanks
This code is working fine . But when I am trying to enter any values in text box or dropdown
list, its not taking those values and instead inserting the default values in the database.
babli3
18-Apr-13 6:00am
View
Hi Zafar
Thanks the code you gave me is working for default if there is nothing in database.
But when i am trying to insert new values , its inserting the default values in the databse.
Thanks
babli3
18-Apr-13 5:50am
View
HI ,
I tried this code but
I am again getting this error "Invalid attempt to read when no data is present"
Thanks
babli3
18-Apr-13 5:43am
View
HII am again getting this error
"Invalid attempt to read when no data is present"
Thanks
babli3
18-Apr-13 5:35am
View
Hi
With this code its showing the default values on pageload even if i have data in the database.
I want to show the default values on pageload only if there is no data in the databse ortherwise it shoud display values from databse.
Please help. Thank you
babli3
18-Apr-13 5:24am
View
It says "The name count does not exists in the current context"
babli3
18-Apr-13 5:16am
View
I tried using is null but isnt working
babli3
18-Apr-13 5:16am
View
If there is no data in the database then these web forms should display some default values and let user insert new values.
i am not able to do this....
babli3
18-Apr-13 5:14am
View
I have posted my code. Thanks
babli3
17-Apr-13 7:48am
View
HOW TO MARK AS SOLVE ... I CANT FIND ANYTHING
babli3
17-Apr-13 6:41am
View
Thanks its working now
babli3
17-Apr-13 6:38am
View
Its working Thanks!
babli3
17-Apr-13 6:22am
View
i have to add triggers to the add button isnt.
babli3
17-Apr-13 6:21am
View
no i didnt , i will add now. thanks
babli3
17-Apr-13 6:18am
View
sorry its not updating still
babli3
17-Apr-13 6:05am
View
ok let me try thanks
babli3
16-Apr-13 10:00am
View
Thanks
babli3
16-Apr-13 10:00am
View
Thanks
babli3
16-Apr-13 3:48am
View
hi can you please help me with an example...
babli3
15-Apr-13 5:49am
View
1.when i select a value in the dropdownlist , it should show in a list box.(This i have done)
2. These data(multiple values ) from list box should get stored into the database(here i am having trouble).
Please can someone help!!
babli3
15-Apr-13 4:49am
View
thanks
babli3
15-Apr-13 4:44am
View
protected void usersavebtn_Click(object sender, EventArgs e)
{
string connectionString = ConfigurationManager.AppSettings["ApplicationServices"];
SqlConnection myconnection = new SqlConnection(connectionString);
SqlCommand cmd = new SqlCommand("sp_InsertAdmin_User", myconnection);
cmd.Parameters.Clear();
cmd.Parameters.AddWithValue("@Userid", Convert.ToInt32(usersddl.SelectedValue));
cmd.Parameters.AddWithValue("@TierCode", Convert.ToInt32(userbranchgrplistbox.Text));
cmd.Parameters.AddWithValue("@BranchCode", Convert.ToInt32(branchddl.SelectedValue));
cmd.CommandType = CommandType.StoredProcedure;
myconnection.Open();
cmd.Connection = myconnection;
cmd.ExecuteNonQuery();
myconnection.Close();
}
babli3
10-Apr-13 10:31am
View
Can you please give me a small example as I am very new to this. Thanks
babli3
10-Apr-13 10:14am
View
But can I have 2 update statements for one gridview control?
When I tried It says i cant have 2 update statements .
babli3
10-Apr-13 9:16am
View
Yes i am using multiline for my text box.
Sorry its still not working... its displaying now as sum,add
babli3
10-Apr-13 8:57am
View
its saving into the database but in the same row.ex: aaabbb
babli3
10-Apr-13 8:47am
View
Hi Raji
Its giving me this error:
String cannot be of zero length.
Parameter name: oldValue
Thanks
babli3
10-Apr-13 8:34am
View
Hi Raji
sorry to be a pain. But I replaced space instead of comma then its not saving in another row.In the text box I have user is going to enter the data line by line. Please help
babli3
10-Apr-13 8:17am
View
Thank you so much Raje...
babli3
10-Apr-13 8:16am
View
Hi Prashant
I have tried with your code as well and its working. Thank you so much
babli3
10-Apr-13 8:12am
View
Thanks alot as I was trying this since two days ....Now finally its done
babli3
10-Apr-13 8:08am
View
Thanks alot its working! But if the user doesnt use comma its not inserting the data row by row
babli3
10-Apr-13 7:46am
View
ok let me try thank you
babli3
10-Apr-13 6:56am
View
Hi Raji
Your example is working fine but still the values are saving in the same row like
id value
2 sk sd ss
I want them to be saved like
id value
2 ss
2 sd
2 sk
Thanks. Please help
babli3
10-Apr-13 6:23am
View
thanks alot Raje
babli3
10-Apr-13 5:51am
View
Thanks alot. Its on every button click there will be a different id .
sorry i think i didnt ask the question properly. If example in a text box if i enter mango,bananna,apple then on save button click these values should be entered row by row with id=1 and then next time if a user enters other vaues then they should get saved as id=2 .
Hope now i have explained the question in a clear way. Please can you help me to do this. Thanks
babli3
10-Apr-13 5:48am
View
Thank you
babli3
10-Apr-13 5:26am
View
thanks
babli3
10-Apr-13 5:25am
View
Deleted
thanks
babli3
10-Apr-13 5:23am
View
Deleted
is it ok if i delete my email id now. Thanks
babli3
10-Apr-13 5:21am
View
Deleted
Once you copy the email id i will delete it. Thanks.Please let me know when you are done
babli3
10-Apr-13 5:20am
View
Deleted
hi Anurag,
Thanks alot. My email is
agni_ks@yahoo.co.in.
babli3
10-Apr-13 5:10am
View
protected void newsubgrpddl_SelectedIndexChanged(object sender, EventArgs e)
{
getData(newsubgrpddl.SelectedItem.Text);
}
private void getData(string grades)
{
DataTable dt = new DataTable();
string connectionString = ConfigurationManager.AppSettings["ApplicationServices"];
SqlConnection myconnection = new SqlConnection(connectionString);
myconnection.Open();
SqlCommand sqlCmd = new SqlCommand("SELECT * from Admin_SubjectGroups WHERE SubjectGroupName = @SubjectGroupName", myconnection);
SqlDataAdapter sqlDa = new SqlDataAdapter(sqlCmd);
sqlCmd.Parameters.AddWithValue("@SubjectGroupName", subgrptxtbox.Text);
sqlDa.Fill(dt);
if (dt.Rows.Count > 0)
{
subprefixtxtbox.Text = dt.Rows[0]["subprefixtxtbox"].ToString();
}
myconnection.Close();
}
my tables:
Admin_SubjectGroups:
AuthorityCode int not null
SubjectGroupid int not null
SubjectGroupName nvarchar(50)
Admin_Subjects
SubjectGroupid not null
subjectprefix nvarchar(50)
Please can you help.. I have just tried the above code but its not displaying anything in the text boxwhen i select a value from dropdown list. Thanks
babli3
10-Apr-13 5:03am
View
sorry i think i didnt ask the question properly.
If example in a text box if i enter mango,bananna,apple then on save button click these values should be entered row by row with id=1 and then next time if a user enters other vaues then they should get saved as id=2 .
Hope now i have explained the question in a clear way.
Please can you help me to do this.
Thanks
babli3
10-Apr-13 4:46am
View
ok thanks I will try ...
babli3
10-Apr-13 4:32am
View
Hi Jagadesh
Thanks but I am not very experienced . If possible can you please give me a small example. Thanks
babli3
10-Apr-13 4:25am
View
ok thanks i will try
babli3
9-Apr-13 7:58am
View
Thank you so much for your help
babli3
9-Apr-13 7:48am
View
I already tried the single querty and its working fine.
But problem is i am placing this update command in Gridview for updating rows
and i cant keep two update commands together .
so i wanted to join these two tables and update
babli3
9-Apr-13 6:39am
View
i did run on sql server the errror is on update a,b . Thanks
babli3
9-Apr-13 6:31am
View
Thanks a lot but I am getting this error. Please help
System.Data.SqlClient.SqlException: Incorrect syntax near ','.
Thanks
babli3
9-Apr-13 6:10am
View
yes ,there is TierCode common in both
babli3
9-Apr-13 4:31am
View
Thanks.Its working for 1 column but it isnt working for the other.
UPDATE Admin_Tier set TierName=@TierName where TierCode=@TierCode .
Is it possible to join these two update statements?
Show More