hi all!! I am on a project that need show the fields that have a DB, but in a APP of Desktop I haven't problem to do this. Now in ASP I don't know do that. In a simple way to show what I do, I drop yours this code, that try to fill a dataset to show then in a crystalR. DataSet ds = new DataSet(); sqlConn = ConnectionPool.GetConnection(); SqlTransaction sqlTrans = sqlConn.BeginTransaction(); ds = SqlHelper.ExecuteDataset(CommandType.StoredProcedu re,"DP_GetAllEmp",sqlTrans); sqlTrans.Commit(); sqlTrans = null; ConnectionPool.ReleaseConnection(sqlConn); CrystalReport1 cr1 = new CrystalReport1(); cr1.SetDataSource(ds); CrystalReportViewer1.ReportSource = cr1; //this is the problem //in this place exploit, and said me that the report data source isn't valid if everybody have any idea, please say me
sno 1
Posts
-
crystalreport problem -
How to persist datareaderbe more explicit, and tell my if you need still this answer yet regards
-
Sounds with c#yes as you know, all word that we say, more or less, have a average in a frequency scale, but not wory, indeed I star now a project for do many things using this topic "sound", when I finish this a post that... regards for all:-D
-
Sounds with c#greetings for all, I am very instered in learn how work with sound in c#... for instance load a music file, see the frequency of that, if any one have any idea or better have a project as example, please tell my, regards my;)
-
Inserting data based on multi select listbox datahi, in the last reply, I show you how you can select the rows in a listbox, but how you no tell my any more, I expect that you stand all.... regards sno-1:laugh:
-
Inserting data based on multi select listbox datasorry for the long time, but I can'nt seat before my pc in some many hours, ok your question is simple the best mode to give you the answer is with a example.... if you have a listbox and in them properties selection mode you put "MultiSimple", and you do a correct add of the elements to show in run time, you selected the item that you need to save in your DB maybe using that int [] a; int p=0; p=this.listBox1 .SelectedIndices.Count ; a=new int[p]; for (int i = 0;i < p;i++) a[i] = this.listBox1 .SelectedIndices [i]; and in the array "a" you have all the position that be selected, the rest i think you know, make a loop wih that and with the class SqlParameter add all this position or the name of the item under this position.... is a plaesure help you, if you have any question tell me ok....:laugh::laugh::laugh:
-
changing application icon at runtime without recompilingis very simple only you need keep in a loop for instance this: System .Drawing .Icon nuevo=new Icon (@"D:\MyIconNow.ico"); Random manual=new Random (); int p = manual.Next (2); if (p == 1) base.Icon=nuevo; else base.Icon=null; of course, the loop is'nt the only way too keep that atach in execution, try with delegate... if you wanna know anything write me :laugh::laugh::laugh:
-
Threading Questionfirst sorry if I give'nt you a good answer because I dont undertand you a lot, ok this is fact: if you need know the process data of this 4 thread, you can use many tools, such as delegate, create a delegate and add all this function inside this, and then put the delegate on execution, for more explanation look this example, using a ProgressBar... public delegate void ExceutionAsyncronous(); public void function1(){} public void function2(){} public void function3(){} public void RequestTime(ProgressBar som, int value, int max) { som.Increment(value++,max); } inside your function put this method "RequestTime" in a way that the increment always keeping inside a correct interval, an then ... ExceutionAsyncronous ob = new ExceutionAsyncronous(function1); ob+=new ExceutionAsyncronous(function2); ob+=new ExceutionAsyncronous(function3); ob(); Remember that this explanation only want give you a Idea, ok if you need know anything else, please write me ok :-D:-D:-D
-
changing application icon at runtime without recompilingok this is the fact, first you can do that for a very simple way, for instance: System .Drawing .Icon nuevo=new Icon (@"D:\MyIconDirection.ico"); Random manual=new Random (); int p = manual.Next (2); if (p == 1) base.Icon=nuevo; else base.Icon=null; and I dont know, you can use for repeat that many times, a timer, thread, delegate to do that ashyncrons:-D, you choose... for any question or another think write me... :-D:-D:-D
-
Inserting data based on multi select listbox dataremember that the listbox in this powerfull lenguage c#, have many components that you can use in your project, for intance, only you need load the information in a datatable for example, and then tell to the listbox, and you can use too a combobox, the properties datasource that you load from a datatable: public void LoadDatatable(ref system.data.datatable some) { cmd = new SqlCommand("yourStoredProcedureOrStatement",con); cmd.CommandType = CommandType.StoredProcedure; try { adapt = new SqlDataAdapter(cmd); adapt.Fill(some); } catch(Exception ex){throw ex;} finally { con.Close(); } } system.data.datatable p=new system.data.datatable(); LoadDatatable(ref p); and after all this, only rest that you tell to the combobox or listbox, anyone that the properties DataSource = p; and the way too show the thinks that was load: ListBox.DataSource = p; ListBox.DisplayMember = "The name of the thinks that you like show"; ListBox.ValueMember = "A id, if exist, only to give more handle to this control"; ok I hope that this thinks help you.... one think: Forgive me by my English ok, because in my contry this idioms i'snt speak a lot.... if you wanna another answer o whatever please write me :laugh::laugh::laugh: e-mail:joelintel@gmail.com