- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 15
- Posts with Upvotes
- 14
- Upvoting Members
- 13
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re: Hi, You need to use "Group by" functionality in SQL. Here is the modified query; [CODE]SELECT DISTINCT message_id, max(date_sent) FROM mail [COLOR="Green"]group by message_id[/COLOR][/CODE] Thank you. | |
Re: Hi, You need to add "PresentationFramework" in the reference to use "System.Windows.Controls" I have attached screenshot for reference. Thank you. | |
Re: Hi, The idea is, You need to override the adapter's fill method. Here is the the method info [CODE]adapter.Fill(Dataset, StartRecord, NumberofRecords, TableName)[/CODE] Let me add the sample program here. This will navigate the records as you needed. But you need to add the validations such as last record, first record … | |
Re: Hi, I would like to suggest following steps; 1) use OLEDB client to export the data Excel. 2) Connect Excel using OleDb methods. for detailed connection strings, have a look at [url]http://www.connectionstrings.com/excel[/url] 3) Using excel object you can create multiple sheets as well as columns. 4) use that excel sheets … | |
Re: Hi, Check the input values are having single quote (') - if so handle with having double single quotes in replace command [CODE]ex: address.replace("'","''")[/CODE] This issue arises when fields and input values are getting mismatched. Let us know if this helps. Good luck. | |
Re: Hi, The give code is working fine in both the places (insert & update). Could you check the values that you are passing like Insert and Update is having different values for same customer_id? Thank you. | |
Re: Hi, This is pretty simple. 1) Use the CheckedChanged event in Checkbox 2) Use the enabled property of Textbox. Good luck. | |
Re: Hi, The query is quite simple. Play with Count() and Group by (with parentpostid) options in the SQL query. Give your best try and let us know. Thank you, [QUOTE=rajandass65;1692493]hi, my table has following fields ForumPostsId(primary key),ForumPost,ParentPost parentpost can have 0(which means its parentpost) or ForumPostsId(which means its a chlid … | |
Re: Hi, From looking into the update query, I believe that your table is having varchar, datetime and numeric fields. So in the sql you should enclose the varchar and datetime fields with single quote("'"). Make the changes and it should work. Thank you, | |
Re: As an idea, [Split](http://msdn.microsoft.com/en-us/library/system.string.split(v=VS.80).aspx) the variable "line"(for loop var) with the character that separates key and value. You can play with [String.Format](http://msdn.microsoft.com/en-us/library/system.string.format.aspx) option to print the values. Give a try and update us. good luck. p.s: always use code-tags while posting the source code. > Hello, > > in my … | |
Re: Hi, As per the posted code ")" are missing. please check that. Thank you, [QUOTE=violette;1690024]but it still return the same error...[/QUOTE] | |
Re: As an alternative, You can try with IFrame where you can load external page. [QUOTE=jekMCMXC;1689107]Can anyone help me how to load an external page into a <div> tag? I've search the internet and still no answers.. please give me an example.. I have not started a thing yet...[/QUOTE] | |
Re: Hi, Are you expecting months list between two dates? [QUOTE=ssreevidya.m;1688954]Hai , I have 2 tables 1. [B]Transport_Details[/B] having columns user_id FareStageId StartDate EndDate and 2. [B]Route_Fee[/B] having columns FareStageId monthId fees I need to get a monthwise list by passing monthid. My problem is that , if start date and … | |
Re: Hi, If you google, You can get numerous articles about email validation in javascript. here is the one; [CODE]function validateEmailAddress(email) { var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\ ".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA -Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(email); } [/CODE] Thank you, [QUOTE=hindu times;1689293]Any help with this would be great. Working to a deadline and to be honest, I'm … | |
Re: Hi, Change the query like this; [CODE] UPDATE customers SET acc_balance = (SELECT sum (isnull(I.inv_amount,0)) FROM invoices I left join customers AA on AA.cust_id=I.cust_id where customers.cust_id=AA.cust_id GROUP BY AA.cust_id) [/CODE] This should work. Thank you, | |
Re: Hi, Since the object that you have used is null, you got the specified error. Check the few object values, (e.Row.FindControl("litPurata") DataBinder.Eval(e.Row.DataItem, "KUIZ1") check the "e" , e.Row value, findcontrol, dataitem values in the debug mode. similarly do the rest and let us know. as a feedback, Always use "CODE" … | |
Re: Hi, Also check the checkbox property "AutoPostBack" is set to true or not. Thank you. | |
Re: Hi, What is the error that you are getting with button? Let us know. Thank you, | |
Re: Hi, you can give a shot like this; 1) create a sql query; [CODE]select itemreceived, datediff(hh,itemreceived,getdate())[diff] from <tablename>[/CODE] This will give you the date and diff values. 2) Bind this query output to the gridview datasource. The output will have both the values in grid. Let us know if this … | |
Re: Hi, Few thoughts; 1) Create a separate class and function which contains the log file generation and appending the text using FileStream and StreamWriter Classes. 2) Derive the object for the class 3) Call the the function and pass the exception messages Some sample code; [CODE]public void writelog(string msg) { … | |
Re: Hi, The given code is working fine. for testing, I have replaced the Point values with (100,100) and the window popped up. So please check these line of code [CODE]F.Location = new Point(comboBox1.Location.X+comboBox1.Width, comboBox1.Location.X+comboBox1.Width+comboBox1.Height+comboBox1.Width);[/CODE] and verify the values of comboBox. Update us the results. Thank you. | |
Re: Hi, If you want to get only one row with value "12" then modify the query with [CODE]select from table where cast like "12"[/CODE] or use "cast=12" while using "%" on both sides in like operator it will list out all the matching entries which containing the string used in … | |
Re: Hi, Modify the trigger like this way; [CODE] CREATE TRIGGER TRG_UPDATECUSTBALANCE ON INVOICE AFTER INSERT [COLOR="Green"][B]AS[/B][/COLOR] --newly added UPDATE [COLOR="green"][B]Customer SET CUST_BALANCE= CUST_BALANCE[/B][/COLOR] + I.INV_AMOUNT FROM CUSTOMER C, INSERTED I WHERE C.CUST_NUMBER= I.CUST_NUMBER [/CODE] Changed codes are in green. Good luck. Thank you. | |
Re: Hi, When you are trying to cast textbox control instead of its value, the specified error will occur. So change the code as needed. good luck. | |
Re: Hi, You can try like this way in the query; [CODE]no_single_room.Text.Trim() == "" ? 0 : Convert.ToInt32(no_single_room.Text)[/CODE] Good luck. | |
Re: Hi, Usually these kind of errors appear when a non numeric(alpha numeic/string) value is casted to numeric. for example, [CODE] int i = Convert.ToInt32("abc"); int j = Convert.ToInt32("abc12"); [/CODE] The above conversion will throw the error. Can you check the values that are being converted in the procedure and let … | |
Re: Hi, few thoughts related with exception; 1) This exception occur when we are trying to access the properties/method of a Null object (not yet instantiated. having declaration only). for example, SQLCommand cmd =null; cmd.ExecuteNonQuery(); the above will throw the exception as you mentioned. So please check the objects declaration and … | |
Re: Hi, Here is the MySQL-C# code to store images; [CODE] MySqlConnection mcon = null; MySqlCommand cmd = null; FileStream fsObj = null; BinaryReader binRdr = null; try { //converting image to bytes fsObj = File.OpenRead(pictureBox1.ImageLocation); byte[] imgContent = new byte[fsObj.Length]; binRdr = new BinaryReader(fsObj); imgContent = binRdr.ReadBytes((int)fsObj.Length); mcon = new … | |
Re: Hi, Change the Max selection condition of the SQL query. Try to use the numeric field which holds the auto number in the table. For example, instead of using [CODE]select max(*) from supplier[/CODE] use as, [CODE][COLOR="Green"]select isnull(max(slno),0)[slno] from supplier[/COLOR][/CODE] Hope this helps. Thank you. |