173 Posted Topics
Re: even you can do this by Gettype Using the Form PrentForm propertie,Controls we csan find for E.g. [CODE] if (this.ParentForm.GetType() == typeof(ParentFormName)) ///Where In typeof() containss our parent form Name { ((ParentFormName)this.ParentForm).Label1.Text= "HI"; // where ResultId is my Parent form propertie. } [/CODE] | |
Re: just write in brif waht do you want and how it should be display then any one can help you. | |
Re: hi, xanawa you can create public properties which you can access through that form2 object see the Example. in form have two button [CODE] Class Form1 { private void btnAdd_click() { Form2 f=new Form2; f.select=0; f.show(); } private void btnDelete_click() { Form2 f=new Form2; f.select=1; f.show(); } } [/CODE] In … | |
hi,everyone I have one big problem. I have one Collapsible panel where i can add any control. but the problem how to give that panel header as editable at reuntime. means i'm thinking i want to give user can edit the header of that panel manually. please help me . … | |
HI all Experites can you help me on this Query How to get perfect result set I have three table. [CODE] 1)vitalsigns ID DisplayName DisplayShort ToMetrics ToEnglish 1 Temp Temp (0.556*({1}-32)) ({1}/0.556)+32 2 BP(Systolic) BPH (NULL) (NULL) 3 Wt WtH {3}/2.2 {3}*2.2 4 Height Height 2.54*{4} {4}/2.54 5 Pulse Pulse … | |
How to recover data from .ibd file if innodb is corrupted I have one test database and many table with the extension of .frm and .idb file. from frm file i got strucure of database but how to restore data from individiual file of .idb file. | |
Re: It can be said that humans have a bit of a short term view of things. We're concerned about the end of summer, the next school year, and maybe even retirement. But these are just a blink of an eye in cosmic terms. i think Humanity is not the top … | |
Re: so you want hyperlink on your gridview. and when you click it should be redirect to other page. after auto generate column false. Add a template filed in your gridview. This will you get from click on smart tag of grid. gor to Edit Column. And ther is available filed … | |
Re: Adding a Dropdownlist in gridview and add a Datasource to the dropdownlist first drag and drop one gridview: in the below example just i am going to display two columns in a gridview.one column for id and another column displaying a dropdownlist with data through sqldatasource.. in gridview create a … | |
Re: you can use displaymember and valuemember proprties of combobox. For e.g. [CODE] ---first Open the connection connection.OPen(); Dim dt as DataTable,sql as string sql="Select ID,Name from emplayee;" MysqlDataAdpter Adpter=new MysqlDataAdapter(sql,Connection); --fill the Datatable with the Data. Adpter.Fill(dt) --Now Combo BOx Combobox1.DataSource=dt; Combobox1.DispalyMember="ID" Combobox1.ValueMember="Name" --When you run the programm. combobox display … | |
Re: see this [URL="http://www.daniweb.com/forums/thread298171.html"]http://www.daniweb.com/forums/thread298171.html[/URL] link will help you. | |
Re: this will help you for lgoin form. on button click write this code [CODE] con = New SqlConnection(cons) con.Open() str = "Select [UserName], [Password] from [UserLogin] " cmd = New SqlCommand(str, con) Dim dr As SqlDataReader dr = cmd.ExecuteReader() If dr.HasRows = True Then While (dr.Read()) If dr(1).ToString() = Trim(txtuname.Text) … | |
Re: see this link which gives the full tutorial of ADO.NET [URL="http://www.java2s.com/Tutorial/VB/0480__Database-ADO.net/Catalog0480__Database-ADO.net.htm"]http://www.java2s.com/Tutorial/VB/0480__Database-ADO.net/Catalog0480__Database-ADO.net.htm[/URL] | |
Re: to valid textboxes write the code in keypress event like [CODE] private sub textbox1_keypress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles textbox1.KeyPress Dim KeyAscii As Integer KeyAscii = Asc(e.KeyChar) Select Case KeyAscii case 65 to 90 ''for capital ALPHABET A case 97 to122 case else keyascii=0 End Select If … | |
Re: you can pass the selected rows of the datagridview cell vlue through on click of datagridview _cellClick event like [code] dim id as Integer id = Convert.ToInt32(datagridview.Rows[e.RowIndex].Cells["ID"].Value.ToString())) [/code] //where ID is the name of the column. | |
Re: try this code it will work [CODE] If bSortBy Then If bSortByKioskID Then ' kioskno = "K0000-0002 " Dim sql as string sql = "SELECT KioskID,TransactionDate, AgencyName, AccountNo, BillNo, BillAmount, ServiceCharge, TotalAmount, DealerCommission FROM CreditLimit.dbo.TransactionRecord WHERE KioskID = '" & kioskno & "' ORDER BY TransactionRecord.KioskID" Dim dscmd As New … | |
Re: for removing the item from the listview you can use [CODE] For Each lvItem As ListViewItem In lstmat.SelectedItems lvItem.Remove() Next [/CODE] ''lstmat is listview 's name try this one it works | |
Re: huumn do one thing when you laod the MDi parent form show your login form on login form load disable the menu of MDi parent form. and on login button click enable the menu of MDiparent. and Cancel of login button exit from application. i think this will work for … | |
Re: as you written your code is write can you tell me what is error comes while inserting a command.i think in sqlDatabase it conficlt the datatype. but your code in debug mode or best way is write your code in try catch block. it will show which is the error … | |
Re: see this site it will explain you each and evryting about [URL="http://www.java2s.com/Code/ASP/Session-Cookie/WritevaluetosessionVBnet.htm"]session [/URL] | |
Re: just explian your your question. then we can help you. as per this try this code this will solve your problem. [CODE] DTPpicker.Value=DateTime.Now texbox.text=DTPpicker.Value.Tostring() [/CODE] | |
Re: this can be done through Array List Objects. see here [CODE]byte[] byteArray1 = new byte[5]; byte[] byteArray2 = new byte[11]; byte[] combined = new byte[byteArray1.Length + byteArray2.Length]; byteArray1.CopyTo(combined, 0); Array.Copy(byteArray2, 0, combined, byteArray1.Length, byteArray2.Length);[/CODE] | |
Re: hii prashant20, no need to use two connection you can do this one connection like when you clik save button that time first save your Exam table data. [CODE] sqlconnection con =new sqlconnection("connection string"); con.open(); try { sqlcommand cmd=new sqlcommand("your insert query",con); cmd.ExecutenonQuery(); cmd.dispose(); Sqlcommand cmd=new sqlcomman("another insert query",con); cmd.ExecutenonQuery(); … | |
Re: first add a namespace to your form for vb.net [CODE] imports System.Data.OledDb //then on button click event write this code dim con as new OleDbConnection con.ConectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Work\cvs_root\log4net-1.2\access.mdb;User Id=;Password=;"" Con.open()\\access.mdb is my databasename dim str as string try str="INsert into [table] values ('hi')" dim cmd=new sqlCommand(str,con) cmd.ExequteNonquery Msgbox ("Recored inserted") Catch … | |
Re: this [URL="http://www.daniweb.com/forums/thread298171.html"]Link [/URL] will help you. it is in VB.Net do small change it will work in C# also. | |
Re: Sealed Class: When applied to a class, the sealed modifier prevents other classes from inheriting from it. In the following example, class B inherits from class A, but no class can inherit from class B. class A {} sealed class B : A {} You can also use the sealed … | |
Re: huunnn. you are first start your transaction and in between you are retriving the data from the same table or query , so that time you get the error of that table is locked, right. if yes then when you open the form that just iopen the connection. don't open … | |
Re: when you are use mouse up event make label.locked=true. if you want to make that lable enable = false then change the back color of that label so it will looks in white whether it is Enable=true/False. try this is one :) | |
hello everyone. i have a problem with MDI parent.in my project there is parent form and child form. in my MDi parent form i had created fix layout panel where i want to show the other child form . but i dot no how to call child form on that … | |
Re: you have done mistak over this statment SqlDataAdapter da = new SqlDataAdapter("spSearch", conn); we cannot pass the Sp to adptaer. see asapter's parameter insted of passing Sp pass your command. i.e.[Code] SqlCommand check = new SqlCommand("spSearch", conn); check.CommandType = CommandType.StoredProcedure; check.Parameters.Add(new SqlParameter("@searchKey", SqlDbType.NVarChar,50)); check.Parameters["@searchKey"].Value = txtSearch.Text.Trim(); SqlDataAdapter da = new … | |
Re: huunnn. first create a instance of your login form.when application satrted first it will show the main form and login form will be visible so on form load event. [CODE] login lg =new login(); Private Void MDIFOrm_load() { lg=new login(); lg.MdiParentForm=this;\\means it will appear in MDI paren form lg.show(); } … | |
Re: if you want Tutorails for insert,update and delete[URL="http://www.daniweb.com/code/snippet217047.html"]this[/URL] is perfect link. and another one if you want to count the rows in the table you can simply fire a query of "SELECT Count(*) from table" and pass it to SqlCommand. and then exeuct this command with Execute Scalar you will … | |
Re: see this [URL="http://www.daniweb.com/forums/thread89479.html"]Link [/URL] it tell s about Sdf file. | |
hello experts. as per the my last problem was [URL="http://www.daniweb.com/forums/thread296536.html"]this[/URL] now i'm moing further in this repeater i want button for delete and Update. i had try but didn't work i want the button based on user authentication. for e.g. if user is Emplyee so he/she can edit when they … | |
Re: can you tell me why are you use dataset. when you fire a count(*) query it ultimatly gives only one row and one column . If youwant this result of the query you can directly execute your command With ExecuteScalar. ExecuteScalar this will give you first row of first column.. … | |
Re: Properties provide the opportunity to protect a field in a class by reading and writing to it through the property. C# properties enable this type of protection while also letting you access the property just like it was a field. Becuase of get /set our class contains control over the … | |
Re: see this [URL="http://www.daniweb.com/forums/thread291344.html"]Link[/URL] this will help you for inserting data in table | |
Re: textchanged event will not work for validation take a look for this link [URL="http://www.daniweb.com/forums/thread241075.html"]allow number1[/URL] [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.control.keydown.aspx"]allow number2[/URL] | |
Re: write your query like this [CODE]Dim myCommand As New SqlCeCommand("Select * from CDRecord where ArtisteName like '%" & (label4.text) & "%'", conn) [/CODE] try this query. | |
Re: [QUOTE=penguin22;1282208]Can anyone tell me where my error is I can't seem to find it.. Thanks, Penguin Code Snippet [code=c#]"UPDATE AddressEntry SET Cell = '" + txtCell.Text + "', Home = '" + txtHome.Text + "', Work = '" + txtWork.Text + "', Name = '" + txtName.Text + "', Address … | |
Re: The only mistak is you are not passing connection string to your finction i.e. GetDr(String sqltext, String ConnectionString). the only the command is passing at this function but connection string is not initialise that's why it gives error. for recovery create one public string for connection string string cons="User Id=WLL; … | |
Re: what do you want in this you have created table. so do you want to retive or insert this data/ table in your database pleas tell us in brief. | |
Re: i have seen this problem but that error message can occur if there is a constraint which the deletion violates. A common one might be that a field is set to "NOT NULL". or otherwise check is there any relation ship with other table.... i want to say Primary key … | |
We must reach out our hand in friendship and dignity both to those who would befriend us and those who would be our enemy. what do you think?:) | |
Re: for that first create aconnection with the database. Then create one Adapter and fire a querry in your adpter and fill the dataset with adapter and give your gridview datasource that dataset. e.g. [CODE] OleDbConnection con=new OleDbConnection ("Connection String"); Con.OPen(); string str="Select [name] from [tabel] Where [name] like '%" + … | |
Re: you can solve this problem using state managment or database. When you login store your username in cokkies and when you logout that time cler your cokkies. and on page postback check whether the Cokkies have username. If cookies dose not have any username then redirect User to login page … | |
Re: The idle timeout is based from the last time the server received a request from a client with a given session ID. You can use Session.Abandon() to force a log off or for this you can give a trimout for a session in webconfig file for e.g.[CODE]<system.web> <sessionState timeout="30"></sessionState> </system.web> … | |
Re: see this link will help you [URL="http://www.devasp.net/net/articles/display/717.html"]Kill process[/URL] | |
Re: i think the it's a problem of sql server 2000. first try to insert into table through query anlyzer. when i was doing some time it heppen reason is the default formate of sql 2000 for dattime is MM/dd/YYYY hh:mm:ss and so on. and when we pass the date as … | |
Re: i don't what do you want. but i can think you want like this type of query create procedure InsertPayment(@bn NChar(10),@un NChar(60),@ba float,@ccn NChar(20),@cct NChar(10),@at float) as insert into Payment_Info(cBill_No,cUser_Name,fBill_Amount,cCC_Number,cCC_Type,fAcc_Total) values(@bn,@un ,@ba ,@ccn ,@cct,@at=@at+@ba) if you want this then you can this from frontend. very confustion... in question.:( |
The End.