271 Posted Topics
Re: You need something like this [code=sql] SELECT COUNT(ID) AS EmploCount, DEPARTMENT_ID, Salary FROM (SELECT ID, DEPARTMENT_ID, CASE WHEN salary < 5000 THEN 'Less than 5000' ELSE CASE WHEN salary BETWEEN 5000 AND 10000 THEN 'More thant 5000 and less than 10000' ELSE 'More than 10000' END END AS Salary FROM … | |
Re: I do not use too much SqlDataSource but i believe you can do this [code=csharp] if (DropDownList1.SelectIndex > 0) { SqlDataSource1.FilterExpression = "FieldInYourDataSource = " + DropDownList1.SelectedItem.Value; } else { SqlDataSource1.FilterExpression = null; } [/code] Try something like that. but if you really want to build your sql statement and … | |
Re: What exactly does not work? its just the program wont start at all, or it crash at certain point? | |
Re: You have two options: first: you can create a extra column in your query to return true or false if your part No start with your criteria, then bound that to the checkboxcolumn. Second: you have to use the DataGrid.OnItemDataBound Method [URL="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datagrid.onitemdatabound.aspx"]here is an example[/URL] then with in that method … | |
Re: I use FusionChart Free, there is a pay version but if you want something simple and easy to use this is one of the best for me. | |
Re: I still dont get what is your problem, but it sounds like you need a recursive function or a loop somewhere. you have to explain a little bit more. | |
Re: another way to retrieve just one value from the database is using the executescalar method. in that case you will add after this line [code=vb] Dim commando As New SqlCommand(sql,SQLConn) SQLConn.Open() EditItem.Text = commando.ExecuteScalar().ToString() SQLConn.Close() [/code] ExecuteScalar return an object. so maybe you want to check if that object is … | |
Re: My opinion is, first HTML is not a programming language, is a MARKUP, TECHNOLOGY what ever you want it to call it, but not a programming language. About math, i would say that all depends on what you are programming, but indeed you can do a lot of work with … | |
Re: This is from head so try it. Replace with your original field name. [code=sql] select first_name, last_name, count(match_id) as match_total, sum(match_points) as match_points from player group by first_name, last_name having count(match_id) > 10 and sum(match_points) > 330 [/code] regards | |
Re: This is what i use if i want to open a new page. I create a static class like this. [code=csharp] public static void OpenWebSite(string webUrl, Control cntrl) { ScriptManager.RegisterStartupScript(cntrl, cntrl.GetType(), "Open", "window.open('" + webUrl + "');", true); } [/code] And then whenever i want to open a particular web … | |
Re: can you be more specific about what you do not understand? | |
Re: if you need the last reportid how come you have reportid 86 in your example picture? because if reportid is integer in increment by one you need something like this. [code=sql] SELECT TOP 1 IDREPORT FROM Report ORDER BY IDREPORT DESC [/code] but again i dont know why do you … | |
Re: Its hard to say without viewing that particular table structure, in what data type are you saving the hour in the database? i have seen people who use float type and others datetime. | |
Re: Uhm you can try this [code=csharp] for(int i = 0 ;i < numberOfDays; i++) { TextBox tb = new TextBox(); tb.ID = "txt" + i; form1.Controls.Add(tb); } [/code] regards. | |
Re: Uhmm, so basically one profile can has multiple address link to it? that is your relation between both tables? | |
Re: DateTime.Today[U].ToShortDateString()[/U]; Use ToShortDateString() Method. | |
Re: [code=html] <input type="button" value="Disable all DropDownList" onclick="DisableDropDown();"/> [/code] [code=javascript] <script language="javascript" type="text/javascript"> function DisableDropDown() { var x = document.getElementsByTagName("select"); for(var i = 0; i < x.length; i++) { x[i].disabled = true; } } </script> [/code] if you need to disable just a few dropdownlist then you have to put a … | |
Re: i bet you dont need to include all this reference but i need it because i made like a report builder anyway. maybe this can help you. oh this is c# but you should be able to translate that to vb.net [code=csharp] using CrystalDecisions.CrystalReports.Engine; using CrystalDecisions.Shared; using CrystalDecisions.ReportSource; using CrystalDecisions.Web; … | |
Re: Hi, i do not too much about vb, but for the most part c# and vb share the same concepts, so maybe what you need is parsing the find control to a panel like this. [code=vbnet] Dim pnl As Panel = (Panel)Me.Parent.FindControl("Panel1") [/code] | |
Hello my friends. I am having problem with a GridView that its been filled by a LinqDataSource, and the footer i have the option to insert a new row, but if the DataSource is empty the footer wont show up. What is the best option to fix this. Thanks. | |
Re: Hi, you saying that you can get into the multiboot selection, but you actually select the hard drive or even the cd at the time you try with the win xp recovery? if that does not work try to go into F2 setup and check the available drive, make sure … | |
Re: I have a common class and one of my method is this one [code=csharp] public static void Message(String message, Control cntrl) { ScriptManager.RegisterStartupScript(cntrl, cntrl.GetType(), "alert", "alert('" + message + "');", true); } [/code] then any time i want to display a message i just call that method like this. [code=csharp] … | |
Re: You have to add the OnRowDataBound method for the gridview. so add this method and give it a name like this OnRowDataBound="BoundRow" then lets implement the method. in your source code create a method called BoundRow. [code=csharp] protected void BoundRow(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { if(e.Row.Cells[2].Text … | |
Re: try do the same thing but move DataGrid1.DataBind() and DataGrid1.Dispose() to the last line of the method. | |
Re: Did you try this and did not work? "<customErrors> tag should then have its "mode" attribute set to "Off"."" <customErrors mode="Off" /> | |
Re: [code=mysql] SELECT * FROM table1 JOIN table2 ON table1.ID=table2.ID JOIN table3 ON table1.ID=table3.ID WHERE (table1.someotherfield='b') and (table1.someotherfield='a') [/code] | |
Re: Line 39 should be like this SqlCommand cmd1 = new SqlCommand("usp_selectnodes", conn1); | |
Re: Can you show the method used to save the data? | |
| |
Re: how you say, massive web sites like this one or others, requires massive period of time, and this time share by a group of people from different are of expertise that share knowledge to come up with a great and massive sites. what i can tell you right now is, … | |
Re: I guess you only need two tables to accomplish this a "PERSON" table which hold all general information. and a "friend" table contains two fields both pimary keys, "ID_PERSON" and "ID_PERSON_FRIEND" in this case to get the person's friend should be very straightforward [CODE=SQL] SELECT * FROM PERSON INNER JOIN … | |
Re: To get the selected item from a dropdownlist you do this. [code=csharp] String selectedItem = DropDownList1.SelectedItem.Value; [/code] now if you want to save that value right after the user change selection you have to set autopostback property in the dropdownlist to true and under the OnselectedIndexChanged event create your procedure … | |
Re: basically you have to create a forum system from scratch? and you want to know what type of controls you have to use and database design? | |
Re: you have to create a foreach loop like this [code=csharp] foreach(ListItem li in SelecteduserCheckBoxList.Items) { if(li.Selected) { String itemSelect = li.Text; } } [/code] regards | |
Re: Can you show what have you done so far? | |
Re: once you have your dataset you can do this. [code=csharp] DataSet.Tables[IndexTable or NameTable].Rows[RowIndex][ColumnIndex].ToString() [/code] | |
Re: cblTest = CheckBoxList control [code=csharp] List<string> AllModules = new List<string>() { "Module1", "Module2", "Module3", "Module4", "Module5", "Module6" }; cblTest.DataSource = AllModules; cblTest.DataBind(); string ModuleIds = "Module2,Module5"; string[] arrayModule = ModuleIds.Split(','); foreach (string st in arrayModule) { cblTest.Items.FindByText(st).Selected = true; } [/code] the above example works great, if you know that … | |
Re: the basic code to retrieve data to a dataset is like this. [code=csharp] SqlConnection conn = new SqlConnection("ConnectionString"); DataSet ds = new DataSet(); String sqlStatement = "Select FIelds From Table"; SqlDataAdapter adapt = new SqlDataAdapter(sqlStatement, conn); adapt.Fill(ds); [/code] now you have you result set into the dataset, then you can … | |
Re: I like your idea apegram!!!. the only thing is that I will exclude the date check since you can schedule windows to run daily in a specific time, i do not see the need to make date check. | |
| |
Re: [code=sql] select * from 1 left outer join 2 on 1.a = 2.d left outer join 3 on 2.f = 3.i [/code] | |
Re: well if you want both tables to be the same if its not a problem i would say turn off the autonumber in the column's table you trying to insert to. then turn it back on. in think i did something like that once. | |
Re: Uhmmm, Thats wierd in my case it always pick it up automatically anyway, if you pay an external hosting you should contact their support, in the other hand if you are managing your own server then you have to find something to make a default content, for example in IIS … | |
Re: there are two things i can think of first [code=sql] SELECT DATEPART(Month, DATE) AS month, DATENAME(month, DATE) AS Name, avg(NetAmount) as AverageCustomerBill from salesmaster GROUP BY DATEPART(Month, DATE), DATENAME(month, DATE) ORDER BY DATEPART(Month, DATE) [/code] the other one [code=sql] SELECT CASE DATEPART(Month, DATE) WHEN 1 THEN 'January' WHEN 2 THEN … | |
Re: If you want to create a trigger in the update event do this. [code=sql] create trigger money_from_vault on table1 after update as DECLARE @Money Int DECLARE @AccountID varchar(10) SET @Money = (Select Money from Inserted) SET @AccoundID = (Select AccountId from Inserted) IF @Money != 0 BEGIN UPDATE table2 SET … | |
Re: I have a similar problem a few days ago, the problem was that i forgot to link a primary key with a foreign key, i suggest you that double check your links and that your not forgetting anything. | |
Re: What do you have so far? what exactly is that you stuck with? | |
Re: Make a left outer join between Document and Clearance ,Document and Sedula. | |
Re: You can try making a stored procedure and see how faster you receive your answer back. |
The End.