467 Posted Topics
Re: From my opinion you already wrote a code in cmblogintype SelectionChanged event which redirecting you on selection. Secondly, why are you using `loginCommand.ExecuteNonQuery()` . You can use it to write data in a table not for reading. To read use `ExecuteReader()` method of the command object loginCommand. Use parameterised query, … | |
Re: You can read [this post](https://www.daniweb.com/programming/software-development/threads/399212/printing-from-list-view), which can help you. | |
Re: Question is not understandable. Please, describe it perfectly and post your work what you did & what have you want. | |
Re: This is my opinion that you have faced an exception for the use of same **Command and reader ** objects for two different works simultaneously. I am tring to describe it. 1) Connection object **conn** is already opened at the line no. 14. So why are you tried to open … | |
![]() | Re: In your SQL statement there should be a space required before quatation mark. It should be Broker_Contact) " & _ "VALUES (@Serial_NO, Do not understand why you are using multiple Try EndTry at a time. a single use of Try EndTry is sufficient. |
Re: For this you donot have to write a macro in excel. You can do it by using `IF(<Condition>,True Value,False Value)` against a particular cell of the Sheet. Like =IF(A5<DATE(2016,12,22),0,IF((A5>=DATE(2016,12,22))*AND(A5<DATE(2016,12,31)),1,"Invalid Date")) Thanks | |
Re: > WHERE FLD_ORDER_ID = '" & id & "' IN (SELECT '" & id & "' FROM TBL_ORDERITEM_A15428 GROUP BY '" & id & "' HAVING COUNT(*) > 1 )") From my opinion in sql statement has problem. You have used `IN` predicate. The arithmatic operator equal to i.e. = … | |
Re: This means that you are trying to open a opened database connection. So Close the connection before open it if it is already opened. 'close your connection before opening it If con.Status=Opened Then con.Close() 'now open it con.Open() | |
Re: Your SQL statement is quite right. There is no mistake to get pid in the textbox. But where the codes in the sub procedure `run_sql_query()` ? Is there any mistake ? God knows. | |
Re: @jhai_salvador: `order` is not here a column name . It is a table name. nothing happens because it is in square bracket. check the field type of EDate and also if it is date type format the text properly. | |
Re: You can add a few lines in your codes in refresh_text subprocedure when id is null or whitespace, where you can nothing values to all textboxes and image control. | |
Re: You can try this statement Select A.tr, B.tt From (SELECT sum(total_amount) as tr from loan where loan_status = 'not finish') A,(SELECT sum(amount) as tt from settlement where sett_status = 'Active') B | |
Re: You can go through the tables column name . By control flow you can show the textboxs of the respective months. | |
Re: Instead of using textbox3 you can try this Form3.textbox1.Text = (Val(textbox1.Text) + Val(textbox2.Text))/2 | |
Re: If your database already opened before and after saving new garantor you can get this error because the new one is not loded in memory. After saving new garantor close the connection and re-open it before sving the new customer. | |
Re: You can use the following SQL Statement Select A.id, (A.jan + B.jan) As JANUARY, (A.feb + B.feb) As FEBRUARY, (A.mar + B.mar) As MARCH, (A.apr + B.apr) As APRIL From first A Inner Join second B On A.id=B.id Order By A.id | |
Re: Your codes are quiet correct. To display as you desire you have to add string values through a loop to the label text property and do label's AutoSize property to False at design time or by code. Label1.Text=Nothing For Each num As Integer In NumOfIntegers Label1.Text &= String.Format("Square Of {0} … | |
Re: > "SELECT* FROM tblReturnables WHERE Company = @Company OR @Company = ''" From my opinion your problem is ni SQL Statement It should be "SELECT * FROM tblReturnables WHERE Company = @Company OR Company = ''" | |
Re: What was your target form ? Form3 or Form2. Perfectly determine it. | |
Re: From my point of view you already complecated your code to check your database and then make permission. From my point of view first check if there any record exists or not then do the next step. If there is no record then exit from entire proceedure else try to … | |
Re: Hi! Sponge_1 to do that first you have to fill combobox1 with class field of your database. Then search your database on selection of class from combobox1 and you have to do this withen Combobox1.SelectionChange Event. | |
Re: Hi! You can do it by running a loop through the label controls of your form like Dim i as integer = 1 For each l as Label in Form1.Controls l.Text=i i+=1 Next | |
Re: You can directly mention the parameters without mentionning the field names. query = "INSERT INTO test.test VALUES (@id, @path)" But, at the time of adding the parameters with command object you must have to maintain the serial by which the parameter names were written in SQL syntax. | |
Re: You do not show the lines of codes for passing of parameter values for other that binary type. I can assume that your problem is in the declaration of parameter type and there size. You can use 'Parameters.AddWithValue' function to assign parameter value and there is no need to mention … | |
Re: The loop restricts you to create a new instance of a SQLCommand objects as same qualified name which you already disposed it. Create a single instace before calling the loop and dispose it after completing the loop. Your codes should be Dim Inveupdate As New SqlClient.SqlCommand Inveupdate.CommandType = CommandType.Text Inveupdate.Connection … | |
Re: Your SQL syntax should be as follows: Inveupdate.CommandText = "UPDATE tblItems SET Quantity = Quantity - 1 WHERE Barcode=@Barcode" MsSQl, MySql or Oracle alaways receive named parameter you can use "?" i.e. question mark when you use only OleDb database provider. | |
![]() | Re: Your SQL statement holds an extra `;` Semicolon at its end, which can give you this type of exception. In Oracle SQL editor or any other Database system like MySQL, MSSQL or PosgreeSQL semicolon should be used to denote as end of statement, but not in vb . Use semicolon … |
Re: Here is a similar post you can [read ](https://www.daniweb.com/programming/threads/503183/-copy-value-from-table-to-onther-table-in-same-database-in-vs2010#post2199550)that which can solve your problem . | |
Re: Are you personally sure that `Account.mdb` exists in Application Folder ? If so, please check the spelling of that mdb file. | |
Re: mysqlconn.Open() Dim reader As SqlDataReader reader = command.ExecuteReader If reader.HasRows Then TextBox39.text = reader.Item("Curlevel") End If You did a simple mistake in between the above lines. `command = New SqlCommand("select COUNT (*) as numRows from _Char Where CharName16='" & TextBox40.Text & "'", mysqlconn)` returns you the number of rows but … | |
Re: `Dim ds As New DataSet1` What is `DataSet1`? | |
Re: Remove two duoble quotation mark at the end of the SQL statement which may the cause to close the session. Use parameterised query to protect your database from unauthorised SQL injections and also it can help you to use spacial characters in your query. Dim cmd As New OleDbCommand sql … | |
Re: Your connection string should be Server=192.168.8.101;Port=3306;Database=moneycs;Uid=root; Pwd=mysql; You can get more from [this](http://www.connectionstrings.com/mysql/) site. | |
Re: Your codes are quite perfect. your problem arises for the line `Dim sql_empid As String = cmbaaa.SelectedValue.ToString`. When you are typing "A" sql_empid stores the value A and it displays all values which are using A. So you can use Dim sql_empid As String = cmbaaa.Items(cmbaaa.SelectedIndex) | |
Re: Did you instal oracle odbc driver ? If so make reference to your project and connect it through your [connection](http://www.connectionstrings.com/oracle/) object. | |
Re: Go through [this site](http://www.connectionstrings.com/mysql/) | |
Re: This is my opinion, you can use another two Radio Buttons in lieu of CheckBoxes. It can give you more simplicity to code the calculations. In general practice Radio Buttons are used to select only one option and checkboxes to select multiple. | |
Re: You can read [this post](https://www.daniweb.com/programming/software-development/threads/485768/retrieving-all-tables-in-ms-access#post2125438), from which you can get a conception to load objects dynamically with the help of a query from database. | |
Re: I am not sure about the intension of the OP. He puts some codes to show his efforts about his job and hopes any one can help him to do his home work. | |
Re: This is most challanging to a developer to control a printer properly. To do it you must have to calculate the cursor position with page height to feed next page and print properly. This is most tedious job. You can use Crystal Report which can solve your problems most effectively. | |
Re: You can try it Private Sub dgSO_CellContentClick(sender As Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgSO.CellContentClick If TypeOf dgSO.CurrentCell.OwningColumn Is DataGridViewCheckBoxColumn Then Dim chkcell As DataGridViewCheckBoxCell = CType(dgSO.CurrentCell, DataGridViewCheckBoxCell) If chkcell.EditingCellValueChanged Then If chkcell.EditingCellFormattedValue = True Then Dim x As String x = InputBox("please input a value.") If x = Nothing Then … | |
Re: check the field formatting property correctly. | |
Re: You can try it If TypeOf dgSO.CurrentCell.OwningColumn Is DataGridViewCheckBoxColumn Then Dim chkcell As DataGridViewCheckBoxCell = CType(dgSO.CurrentCell, DataGridViewCheckBoxCell) If chkcell.EditingCellValueChanged Then If chkcell.EditingCellFormattedValue = True Then MessageBox.Show(chkcell.OwningColumn.HeaderText) End If End If End If | |
Re: I suppose it could be done by Multimedia control. | |
Re: Firstly you must show your efforts where from we can help you to solve your problems. To get your result you can use `DateAdd(DateInterval, Double, DateTime)` method | |
Re: `LVEmp.ListItems.Remove x` here x should be an object not a numerical value which is ListItem or Item. `For x = LVEmp.ListItems.Count To 1 Step -1` and also the loop should be For x = (LVEmp.ListItems.Count-1) To 0 Step -1 | |
Re: You must have to add eventhandler to do any job by a dynamic control. subitem1.DropDownItems.Add(subitem2) subitem2.Text = "Alle dopen " + col2 AddHandler subitem2.Click, AddressOf Me.Click2 Here Click2 is a userdefined sub procedure, which can perfom on click event of subitem2 submenu. | |
Re: It should be Server=myServerAddress;Port=3306;Database=myDataBase;Uid=myUsername; Pwd=myPassword; |
The End.