Click here to Skip to main content
Page 1 of 3
Page Size: 10 · 25 · 50


Author filtered by: milenalukic [x]
Answer 3 Feb 2013   license: CPOL
Hi,You need to change the status column in the table to a calculated field. This will need to be calculated like:Case when publishingdatetimeThis will result in 0 if pending or 1 if published.If you prefer you can replace the 0 and 1 in the calculation to pending or published and...
Answer 3 Feb 2013   license: CPOL
You need to use the onselectedindexchanged event to select your new category and then run your add animal from there.
Answer 3 Feb 2013   license: CPOL
I found this link very helpful.http://stackoverflow.com/questions/706361/getting-return-value-from-stored-procedure-in-c-sharp[^]
Answer 3 Feb 2013   license: CPOL
Hi,The error suggests that the table has a field that does not allow null values.Either one of your variables is null or there other fields in the table that do not allow nulls and do not have a default value set.You can try running the insert statement direct form SQL management...
Answer 3 Feb 2013   license: CPOL
Hi,You are skipping the creating of the report itself.To use report viewer you either need an server report or a local report. I will assume that you require a local report.Click on the report viewer control to activate it. On the top right you will see a small arrow which will give...
Answer 3 Feb 2013   license: CPOL
Hi,It looks like you are missing some of the syntax for a stored procedure.CREATE PROCEDURE -- Add the parameters for the stored procedure hereASBEGIN -- Insert statements for procedure hereENDGOSo after AS you need to insert BEGIN and END at...
Question 3 Feb 2013   license: CPOL
Hi,I have a windows forms application. When I click on a window this activates the form and then I need to click again to call the particular control click event. For example if I click on a button this activates the form and then I need to click the button again.Is there a way to...
C#
Answer 20 Jan 2013   license: CPOL
Hi,In this case I don't know of a way that Linq can help you.You either need to stick to your current way or look into dynamic SQL.To be honest it's more of a case that if it works don't fix it!
Answer 20 Jan 2013   license: CPOL
I found the solution.I had been running an impersonator on visual studio and that was reverting back after running my original report. So when I clicked to view the second report I had no rights - hence the error. I added the impersonator to the form rather than the report and all works...
Answer 20 Jan 2013   license: CPOL
Hi,If your grid is set to allow user to add there is always an extra row. Check for that and either do not allow edit or use row count -2.
C#
Answer 20 Jan 2013   license: CPOL
Hi,You will need to insert your xml data into a table and then perform your operation on this new table.Depending on your process you may need a temp table or permanent table. If it is permanent you can truncate table when your process is finalised not to have unnecessary data.Hope...
Answer 20 Jan 2013   license: CPOL
Hi,Set the table not to allow nulls and it will take the default value when a value is not assigned on insert.
Answer 20 Jan 2013   license: CPOL
Hi,Try this:Form myform = null;form_2search myform=null;List frms = Application.OpenForms.OfType().ToList(); foreach (Form f in frms) { string type = f.Name.ToString(); if (type == "FormWebCam") { myform =...
Answer 20 Jan 2013   license: CPOL
Hi,For consistency I would assume you require the server time and not the client pc time.All you need to do is set the Time on your table with a default of Getdate().In this way you don't pass any value on insert.
Answer 20 Jan 2013   license: CPOL
Hi,For consistency I would assume you require the server time and not the client pc time.All you need to do is set the Time on your table with a default of Getdate().
Answer 20 Jan 2013   license: CPOL
Hi,Grid view design has properties under Edit Columns.Autosizemode gives various options.For exact width set autosize to not set and width to the pixels you require.For columns to fill the whole available space in the table width set autosize to fill.If you want more than 1...
Answer 20 Jan 2013   license: CPOL
Hi,You need to change the report from US to UK format from report properties.
Answer 20 Jan 2013   license: CPOL
Hi,If you believe that you need 2 primary keys it looks like your data is not normalised.It is highly likely that you will need to split your table in to two and maybe also require a link table to map the primary keys of table1 to table2.If two columns together give you your unique...
Answer 20 Jan 2013   license: CPOL
Hi,I have a similar application.What I did was to create the necessary tables in my database.Then have a paste button for the user to paste excel copied data to grid.Then a save button to save to the database.The save button runs a stored procedure accepting all the required grid...
C#
Answer 20 Jan 2013   license: CPOL
Hi,It seems that you are going about this the wrong way round.What you need to do is a query or stored procedure accepting both parameters to return the required data in the first place. Then create your new report.
Answer 20 Jan 2013   license: CPOL
Hi,Have you tried running the code in the job on the test server under that user? It could be a rights issue. Try running each step separately to make it easier to identify where the error lies.
Answer 20 Jan 2013   license: CPOL
Hi,You need to retrieve the correct data from your DB first and then show it on the report. I suggest amending your query.
Answer 20 Jan 2013   license: CPOL
HiFor average you need to do Sum over count and not count/sum.
Answer 20 Jan 2013   license: CPOL
Hi,As regards the inwards quantity I cannot see why it will not return values if a record exists in O,P and I.What I suggest is to break down the query and test joining O and P. Then join the result with I and check your results and so on.To include all dates even when not in I you...
Answer 20 Jan 2013   license: CPOL
Hi,It would help if we knew what fields you have available on update or delete, but here I will assume you have al the fields in the user table.For UpdateCreate Procedure ProcUpdateUser()@logid int,@name varchar(50)as beginupdate user set name=@name where...
Answer 20 Jan 2013   license: CPOL
Hi,As others have mentioned the result for A is unclear.Assuming this is an error what you need to to is:Select wbs_id,wbs_name,startdate1 as startdate, end_datefrom projwbs inner join task on projwbs.wbs_id=task.wbs_idHope this helps you
Question 20 Jan 2013   license: CPOL
Hi,I have a report on SSRS with an action on a textbox to open another report.This works fine when testing on the report server but gives and error when clicking on the link via a win app. The win all calls server report.Error: The report execution has expired or cannot be found....
Answer 18 Oct 2012   license: CPOL
Well it depends on the functionality you are looking for.If you use multiple forms the users would need to open a form for each control.If the controls are related and are intended for use by the same people, it could be easier to use if all in one form in different tabs.
Answer 18 Oct 2012   license: CPOL
Hi,First add in ID column to your database if you have not already done so. Make this the primary key by clicking the key icon. Then in the properties section at the bottom find identity and set it to yes. The seed is the starting number you would like. for example if you want your first...
Question 18 Oct 2012   license: CPOL
Hi,I need to import a complex XML file into multiple SQL tables. I have tried using data maps but can only manage to import 1 node at a time. what I need to do is to be able to select foreign keys from parent nodes.Can someone please help?Here is a reduced version of my...
Question 20 May 2012   license: CPOL
Hi,I am trying to get my win app to have an option to start automatically, by adding it to the startup menu. The user has an option to delete the startup and to add it.I have the following code which works with Windows 7 but gives an error with windows XP. All I can find is that XP...
animated gif in Win app by milenalukic
Forum Message 7 May 2012  
Is there any control that can be used in windows forms that can take formatted text and animated gifs. In a richtextbox I can place a control(picturebox) with an animated gif inside but I cannot ge
Answer 4 May 2012   license: CPOL
Hi,If I understand you correctly you want t use the results of 1 stored procedure in another.In that case you need to creat a third procedure. This needs to have a temptable or even a normal table to hold the results of the first procedure. Then run he second procedure using the...
Answer 4 May 2012   license: CPOL
Hi,With the query above yu get 2 rows like:20112012You want your result to look like:2011,2012To do this you need to use a cursor. the cursor will loop through your results and perform an action on them:declare @result varchar(max)declare @rowdata...
Answer 3 May 2012   license: CPOL
Hi,To restore a database you will need to modify it to single user. Then after it is restored change it back to multi user.You do this by right clicking on the database and selecting properties. Go to options. Then on the right hand side scroll to the bottom and amend the Restrict...
XML import into SQL 2005 by milenalukic
Question 2 May 2012   license: CPOL
Hi ,I am importing xml data into SQL server 2005 in this manner:MyXML 1 mydetails 1.1 myproduct ...
Answer 22 Apr 2012   license: CPOL
you need this:=Declare @paydate1 datetimeDeclare @paydate2 datetimeSelect @paydate1 = TOP 2 [pay_date] from [Peyment] where [pay_sm_id]=2 and [pay_cus_id]=3Select @paydate2 = TOP 2 [pay_date] from [Peyment] where [pay_sm_id]=2 and [pay_cus_id]=3 order by [pay_date] descselect...
Answer 22 Apr 2012   license: CPOL
Hi,The last option should be the fastest as you should have less employees with that name then employees in that city.SQL will perform the first clause and then the second so the first should always be the one with least results unless you are only indexing on the city.I hope this...
Answer 22 Apr 2012   license: CPOL
I would have designed the db differently:Give all partners and ID (numeric). On insert into your join table of partner1, partner2 always make sure they are in numeric order ie if you have partner 1 and 2 always put 1 in the first column if its partners 2 and 1 then you put 1 in the first col...
SQL
Answer 22 Apr 2012   license: CPOL
If you have an identity column in your table delete will keep a record of this and when you insert will continue from the last id.Truncate will clear this and start again from 1 or whatever you seed is set to.
SQL
Answer 22 Apr 2012   license: CPOL
Hi,I had this issue personnaly and did not have the luxory of an additional server.My reports needed to be correct as of close of business the previous day. So what I did was to perform overnight jobs with the complex queries in question and storing the results in a flat file. Then I could...
Answer 22 Apr 2012   license: CPOL
Hi,To read the results of a stored procedure in Linq you need to create a list for the proc to populate:using(objEfoDataContext dc = new objEfoDataContext()){List myresult = new List();myresult= dc.usp_tblPropertyResult().tolist();//myresult will have the data from your stored...
Progress Bar in c#....! by milenalukic
Answer 22 Apr 2012   license: CPOL
There are 2 ways to use a progress bar:One is to manage it yourself performing steps when you want the bar to increase:progressBar1.PerformStep();Using this you will need to calculate the number of steps you want and when you want them to show in the code. so if you have 2 steps you...
C#
Answer 22 Apr 2012   license: CPOL
Hi,First of all I would do all the database work on the server side using stored procedures. Then you call these as necessary and pass the required parameters.e.g.CREATE PROCEDURE [dbo].[ProcInsertTable1] @value1 varchar(50), @value2 intASBEGIN -- SET NOCOUNT ON added to...
Answer 22 Apr 2012   license: CPOL
Hi,To read from a listview you can select a particular item first.private void mylistview_SelectedIndexChanged(object sender, EventArgs e) { string listviewtext = mylistview.SelectedItems[0].SubItems[1].Text; }If you allow multiselect you should be able...
Question 22 Apr 2012   license: CPOL
Hi,I am tring to write code to open a user file using openfiledialog:private FileStream OpenFile() { // Displays an OpenFileDialog and shows the read/only files. OpenFileDialog dlgOpenFile = new OpenFileDialog(); dlgOpenFile.ShowReadOnly =...
Answer 17 Apr 2012   license: CPOL
Hi,What you will need to do is to query your dictionary using LINQList mylist = new Listmylist = dict.where(x=>x.value.deptID=yourdepID).tolist();if(mylist.count>0){// value exists// to update you will need to create a new entry// delete the old one// insert the new...
Question 17 Apr 2012   license: CPOL
Hi,I have the following xml data that I need to import into SQL. ABC-00110 04-11-12 ...
Forum Message 30 Mar 2012  
The XML data will be put on my ftp server and I need to read the data. I have created the tables in SQL but now need to write a stored procedure to read the XML. All examples I found only use the
Answer 30 Mar 2012   license: CPOL
Hi,It looks like you have some incorrect syntax here. All I can say without seeing the whole function is this:DECLARE @INPUT VARCHAR(MAX)DECLARE @RESULT VARCHAR(MAX)SELECT @INPUT='10000*0.40+200'SELECT @RESULT = 'SELECT ' + @INPUTSELECT @RESULT AS OUTPUTI hope...

Page 1 of 3
1 2 3


Advertise | Privacy | Mobile
Web01 | 2.6.130513.1 | Last Updated 14 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid