467 Posted Topics

Member Avatar for Jim Clinton

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, …

Member Avatar for Santanu.Das
0
470
Member Avatar for Ivan_14

You can read [this post](https://www.daniweb.com/programming/software-development/threads/399212/printing-from-list-view), which can help you.

Member Avatar for Santanu.Das
0
419
Member Avatar for batoolhussain

Question is not understandable. Please, describe it perfectly and post your work what you did & what have you want.

Member Avatar for Mohamed_82
0
398
Member Avatar for iriah

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 …

Member Avatar for Mr.M
0
5K
Member Avatar for සශික

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.

Member Avatar for lolafuertes
0
632
Member Avatar for tom_17

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

Member Avatar for tom_17
0
292
Member Avatar for nadiam

> 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. = …

Member Avatar for nadiam
0
363
Member Avatar for Sashika_1

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()

Member Avatar for Mr.M
0
428
Member Avatar for nadiam

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.

Member Avatar for nadiam
0
538
Member Avatar for rasheedraj

@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.

Member Avatar for Santanu.Das
0
356
Member Avatar for nadiam

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.

Member Avatar for jhai_salvador
0
473
Member Avatar for Sashika_1

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

Member Avatar for Santanu.Das
0
966
Member Avatar for savedlema

You can go through the tables column name . By control flow you can show the textboxs of the respective months.

Member Avatar for tinstaafl
0
299
Member Avatar for Frank_16

Instead of using textbox3 you can try this Form3.textbox1.Text = (Val(textbox1.Text) + Val(textbox2.Text))/2

Member Avatar for tinstaafl
0
378
Member Avatar for Sashika_1

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.

Member Avatar for Oleg_3
0
387
Member Avatar for savedlema

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

Member Avatar for savedlema
0
391
Member Avatar for abdullah_11

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} …

Member Avatar for Santanu.Das
0
423
Member Avatar for wilsonchama

> "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 = ''"

Member Avatar for Santanu.Das
0
490
Member Avatar for Sashika_1
Member Avatar for Sashika_1

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 …

Member Avatar for Sashika_1
0
2K
Member Avatar for Sponge_1

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.

Member Avatar for Sponge_1
0
210
Member Avatar for Alvin_6

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

Member Avatar for Santanu.Das
0
187
Member Avatar for Sashika_1

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.

Member Avatar for Sashika_1
0
985
Member Avatar for M.I.Sahil

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 …

Member Avatar for Santanu.Das
0
260
Member Avatar for wilsonchama

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 …

Member Avatar for Santanu.Das
0
262
Member Avatar for wilsonchama

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.

Member Avatar for wilsonchama
0
364
Member Avatar for Santanu_1
Member Avatar for සශික

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 …

Member Avatar for Santanu.Das
0
4K
Member Avatar for tshukela.george

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 .

Member Avatar for tshukela.george
0
334
Member Avatar for Tarun_4

Are you personally sure that `Account.mdb` exists in Application Folder ? If so, please check the spelling of that mdb file.

Member Avatar for Santanu.Das
0
2K
Member Avatar for Abdelaziz_1

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 …

Member Avatar for Santanu.Das
0
328
Member Avatar for sashiksu
Member Avatar for pezzinae

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 …

Member Avatar for Santanu.Das
0
292
Member Avatar for sashiksu

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.

Member Avatar for Santanu.Das
0
346
Member Avatar for Parth_3

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)

Member Avatar for Santanu.Das
0
368
Member Avatar for ctrl+s

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.

Member Avatar for ctrl+s
0
437
Member Avatar for sashiksu
Member Avatar for Joseph_20

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.

Member Avatar for Santanu.Das
0
143
Member Avatar for Ma Katrina

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.

Member Avatar for Raul Perez
0
1K
Member Avatar for meenasundar

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.

Member Avatar for AleMonteiro
-1
296
Member Avatar for imagetvr

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.

Member Avatar for Santanu.Das
0
920
Member Avatar for Lethugs

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 …

Member Avatar for Santanu.Das
0
926
Member Avatar for hallianonline
Member Avatar for Lethugs

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

Member Avatar for Santanu.Das
0
333
Member Avatar for Vicscript
Member Avatar for Mr.M
Member Avatar for Nawti

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

Member Avatar for Nawti
0
325
Member Avatar for abu taher

`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

Member Avatar for Santanu.Das
0
318
Member Avatar for johndohmen1963

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.

Member Avatar for johndohmen1963
0
154
Member Avatar for bayron209

It should be Server=myServerAddress;Port=3306;Database=myDataBase;Uid=myUsername; Pwd=myPassword;

Member Avatar for bayron209
0
351

The End.